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

Unified Diff: cc/layers/delegated_renderer_layer_impl.h

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/layers/delegated_renderer_layer.cc ('k') | cc/layers/delegated_renderer_layer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/delegated_renderer_layer_impl.h
diff --git a/cc/layers/delegated_renderer_layer_impl.h b/cc/layers/delegated_renderer_layer_impl.h
index 5f5505081a2fe1895683f2914a7cf7875e187e17..7d774f1c3575119fce158d2384ae59d63699edd1 100644
--- a/cc/layers/delegated_renderer_layer_impl.h
+++ b/cc/layers/delegated_renderer_layer_impl.h
@@ -40,11 +40,14 @@ class CC_EXPORT DelegatedRendererLayerImpl : public LayerImpl {
void AppendContributingRenderPasses(RenderPassSink* render_pass_sink);
+ // Creates an ID with the resource provider for the child renderer
+ // that will be sending quads to the layer. Registers the callback to
+ // inform when resources are no longer in use.
+ void CreateChildIdIfNeeded(const ReturnCallback& return_callback);
+
void SetFrameData(scoped_ptr<DelegatedFrameData> frame_data,
gfx::RectF damage_in_frame);
- void CollectUnusedResources(ReturnedResourceArray* resources_for_ack);
-
void SetDisplaySize(gfx::Size size);
protected:
@@ -54,14 +57,11 @@ class CC_EXPORT DelegatedRendererLayerImpl : public LayerImpl {
const ScopedPtrVector<RenderPass>& RenderPassesInDrawOrderForTesting() const {
return render_passes_in_draw_order_;
}
- const ResourceProvider::ResourceIdSet& ResourcesForTesting() const {
+ const ResourceProvider::ResourceIdArray& ResourcesForTesting() const {
return resources_;
}
private:
- // Creates an ID with the resource provider for the child renderer
- // that will be sending quads to the layer.
- void CreateChildIdIfNeeded();
void ClearChildId();
void AppendRainbowDebugBorder(QuadSink* quad_sink,
@@ -92,7 +92,7 @@ class CC_EXPORT DelegatedRendererLayerImpl : public LayerImpl {
bool have_render_passes_to_push_;
ScopedPtrVector<RenderPass> render_passes_in_draw_order_;
base::hash_map<RenderPass::Id, int> render_passes_index_by_id_;
- ResourceProvider::ResourceIdSet resources_;
+ ResourceProvider::ResourceIdArray resources_;
gfx::Size display_size_;
int child_id_;
« no previous file with comments | « cc/layers/delegated_renderer_layer.cc ('k') | cc/layers/delegated_renderer_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698