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

Unified Diff: cc/test/layer_tree_test_common.cc

Issue 12328118: cc: DelegatedRendererLayer creates a ChildId with the ResourceProvider (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 months 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/test/layer_tree_test_common.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/layer_tree_test_common.cc
diff --git a/cc/test/layer_tree_test_common.cc b/cc/test/layer_tree_test_common.cc
index 0100135ded1710a24dbcb1e466aa6f7f9bfd8d67..2240279769602a02326b67e08d14edddd7989334 100644
--- a/cc/test/layer_tree_test_common.cc
+++ b/cc/test/layer_tree_test_common.cc
@@ -78,6 +78,10 @@ void MockLayerTreeHostImpl::commitComplete()
{
LayerTreeHostImpl::commitComplete();
m_testHooks->commitCompleteOnThread(this);
+
+ if (!settings().implSidePainting)
+ m_testHooks->treeActivatedOnThread(this);
+
}
bool MockLayerTreeHostImpl::prepareToDraw(FrameData& frame)
@@ -94,13 +98,25 @@ void MockLayerTreeHostImpl::drawLayers(FrameData& frame)
m_testHooks->drawLayersOnThread(this);
}
-void MockLayerTreeHostImpl::activatePendingTreeIfNeeded()
+bool MockLayerTreeHostImpl::activatePendingTreeIfNeeded()
{
if (!pendingTree())
- return;
+ return false;
+
+ if (!m_testHooks->canActivatePendingTree())
+ return false;
- if (m_testHooks->canActivatePendingTree())
- activatePendingTree();
+ bool activated = LayerTreeHostImpl::activatePendingTreeIfNeeded();
+ if (activated)
+ m_testHooks->treeActivatedOnThread(this);
+ return activated;
+}
+
+bool MockLayerTreeHostImpl::initializeRenderer(scoped_ptr<OutputSurface> outputSurface)
+{
+ bool success = LayerTreeHostImpl::initializeRenderer(outputSurface.Pass());
+ m_testHooks->initializedRendererOnThread(this, success);
+ return success;
}
void MockLayerTreeHostImpl::animateLayers(base::TimeTicks monotonicTime, base::Time wallClockTime)
« no previous file with comments | « cc/test/layer_tree_test_common.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698