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

Unified Diff: cc/layer_tree_host_impl.cc

Issue 11419269: cc: Give ownership of render passes to the renderer when drawing a frame. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layer_tree_host_impl.h ('k') | cc/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer_tree_host_impl.cc
diff --git a/cc/layer_tree_host_impl.cc b/cc/layer_tree_host_impl.cc
index aa6dd27f089a7d119ac7e023924358c271e38761..e41ca0de6e04413bb827cceeeca257b5ccb3a3c5 100644
--- a/cc/layer_tree_host_impl.cc
+++ b/cc/layer_tree_host_impl.cc
@@ -816,7 +816,7 @@ void LayerTreeHostImpl::onVSyncParametersChanged(double monotonicTimebase, doubl
m_client->onVSyncParametersChanged(timebase, interval);
}
-void LayerTreeHostImpl::drawLayers(const FrameData& frame)
+void LayerTreeHostImpl::drawLayers(FrameData& frame)
{
TRACE_EVENT0("cc", "LayerTreeHostImpl::drawLayers");
DCHECK(canDraw());
@@ -837,10 +837,9 @@ void LayerTreeHostImpl::drawLayers(const FrameData& frame)
m_renderer->drawFrame(frame.renderPasses, frame.renderPassesById);
- // Once a RenderPass has been drawn, its damage should be cleared in
- // case the RenderPass will be reused next frame.
- for (unsigned int i = 0; i < frame.renderPasses.size(); i++)
- frame.renderPasses[i]->damage_rect = gfx::RectF();
+ // The render passes should be consumed by the renderer.
+ DCHECK(frame.renderPasses.empty());
+ DCHECK(frame.renderPassesById.empty());
// The next frame should start by assuming nothing has changed, and changes are noted as they occur.
for (unsigned int i = 0; i < frame.renderSurfaceLayerList->size(); i++)
« no previous file with comments | « cc/layer_tree_host_impl.h ('k') | cc/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698