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

Unified Diff: cc/test/fake_delegated_renderer_layer_impl.cc

Issue 24078024: cc: Return resources to child compositor via a Callback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: deletechild: No AndReceiveAck needed, change STP Created 7 years, 3 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/fake_delegated_renderer_layer_impl.h ('k') | cc/test/layer_tree_test.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/fake_delegated_renderer_layer_impl.cc
diff --git a/cc/test/fake_delegated_renderer_layer_impl.cc b/cc/test/fake_delegated_renderer_layer_impl.cc
index 782bc1c5499dc0630aa3af194fd16b641499cd17..1420ae2e7b2cbf197d7242dafdb5058f87615d4c 100644
--- a/cc/test/fake_delegated_renderer_layer_impl.cc
+++ b/cc/test/fake_delegated_renderer_layer_impl.cc
@@ -32,6 +32,18 @@ static ResourceProvider::ResourceId AddResourceToFrame(
return resource_id;
}
+ResourceProvider::ResourceIdSet FakeDelegatedRendererLayerImpl::Resources()
+ const {
+ ResourceProvider::ResourceIdSet set;
+ ResourceProvider::ResourceIdArray array;
+ array = ResourcesForTesting();
+ for (size_t i = 0; i < array.size(); ++i)
+ set.insert(array[i]);
+ return set;
+}
+
+void NoopReturnCallback(const ReturnedResourceArray& returned) {}
+
void FakeDelegatedRendererLayerImpl::SetFrameDataForRenderPasses(
ScopedPtrVector<RenderPass>* pass_list) {
scoped_ptr<DelegatedFrameData> delegated_frame(new DelegatedFrameData);
@@ -46,9 +58,8 @@ void FakeDelegatedRendererLayerImpl::SetFrameDataForRenderPasses(
pass->quad_list[j]->IterateResources(add_resource_to_frame_callback);
}
- ReturnedResourceArray resources_for_ack;
+ CreateChildIdIfNeeded(base::Bind(&NoopReturnCallback));
SetFrameData(delegated_frame.Pass(), gfx::RectF());
- CollectUnusedResources(&resources_for_ack);
}
} // namespace cc
« no previous file with comments | « cc/test/fake_delegated_renderer_layer_impl.h ('k') | cc/test/layer_tree_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698