Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(356)

Side by Side Diff: cc/layer_tree_host.cc

Issue 11362054: Use message passing for BeginFrameAndCommitState and clean up forced commit logic (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix windows signed/unsigned warning Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | cc/layer_tree_host_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/layer_tree_host.h" 5 #include "cc/layer_tree_host.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "cc/font_atlas.h" 9 #include "cc/font_atlas.h"
10 #include "cc/graphics_context.h" 10 #include "cc/graphics_context.h"
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 if (m_contextLost) { 493 if (m_contextLost) {
494 if (recreateContext() != RecreateSucceeded) 494 if (recreateContext() != RecreateSucceeded)
495 return false; 495 return false;
496 } 496 }
497 return true; 497 return true;
498 } 498 }
499 499
500 void LayerTreeHost::updateLayers(ResourceUpdateQueue& queue, size_t memoryAlloca tionLimitBytes) 500 void LayerTreeHost::updateLayers(ResourceUpdateQueue& queue, size_t memoryAlloca tionLimitBytes)
501 { 501 {
502 DCHECK(m_rendererInitialized); 502 DCHECK(m_rendererInitialized);
503 DCHECK(memoryAllocationLimitBytes);
504 503
505 if (!rootLayer()) 504 if (!rootLayer())
506 return; 505 return;
507 506
508 if (layoutViewportSize().IsEmpty()) 507 if (layoutViewportSize().IsEmpty())
509 return; 508 return;
510 509
511 m_contentsTextureManager->setMaxMemoryLimitBytes(memoryAllocationLimitBytes) ; 510 if (memoryAllocationLimitBytes)
511 m_contentsTextureManager->setMaxMemoryLimitBytes(memoryAllocationLimitBy tes);
512 512
513 updateLayers(rootLayer(), queue); 513 updateLayers(rootLayer(), queue);
514 } 514 }
515 515
516 static Layer* findFirstScrollableLayer(Layer* layer) 516 static Layer* findFirstScrollableLayer(Layer* layer)
517 { 517 {
518 if (!layer) 518 if (!layer)
519 return 0; 519 return 0;
520 520
521 if (layer->scrollable()) 521 if (layer->scrollable())
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
836 else 836 else
837 layer->notifyAnimationFinished(wallClockTime.ToDoubleT()); 837 layer->notifyAnimationFinished(wallClockTime.ToDoubleT());
838 } 838 }
839 } 839 }
840 840
841 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn dex) 841 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn dex)
842 setAnimationEventsRecursive(events, layer->children()[childIndex].get(), wallClockTime); 842 setAnimationEventsRecursive(events, layer->children()[childIndex].get(), wallClockTime);
843 } 843 }
844 844
845 } // namespace cc 845 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698