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

Side by Side Diff: cc/delegated_renderer_layer_impl.h

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, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/delegated_renderer_layer.cc ('k') | cc/delegated_renderer_layer_impl.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 #ifndef CC_DELEGATED_RENDERER_LAYER_IMPL_H_ 5 #ifndef CC_DELEGATED_RENDERER_LAYER_IMPL_H_
6 #define CC_DELEGATED_RENDERER_LAYER_IMPL_H_ 6 #define CC_DELEGATED_RENDERER_LAYER_IMPL_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "cc/cc_export.h" 9 #include "cc/cc_export.h"
10 #include "cc/layer_impl.h" 10 #include "cc/layer_impl.h"
(...skipping 25 matching lines...) Expand all
36 void ClearRenderPasses(); 36 void ClearRenderPasses();
37 37
38 // Set the size at which the frame should be displayed, with the origin at the 38 // Set the size at which the frame should be displayed, with the origin at the
39 // layer's origin. This must always contain at least the layer's bounds. A 39 // layer's origin. This must always contain at least the layer's bounds. A
40 // value of (0, 0) implies that the frame should be displayed to fit exactly 40 // value of (0, 0) implies that the frame should be displayed to fit exactly
41 // in the layer's bounds. 41 // in the layer's bounds.
42 void set_display_size(gfx::Size size) { display_size_ = size; } 42 void set_display_size(gfx::Size size) { display_size_ = size; }
43 43
44 void AppendContributingRenderPasses(RenderPassSink* render_pass_sink); 44 void AppendContributingRenderPasses(RenderPassSink* render_pass_sink);
45 45
46 // Creates an ID with the resource provider for the child renderer
47 // that will be sending quads to the layer.
48 void CreateChildIdIfNeeded();
49 int child_id() const { return child_id_; }
50
46 private: 51 private:
47 DelegatedRendererLayerImpl(LayerTreeImpl* tree_impl, int id); 52 DelegatedRendererLayerImpl(LayerTreeImpl* tree_impl, int id);
48 53
54 void ClearChildId();
55
49 RenderPass::Id ConvertDelegatedRenderPassId( 56 RenderPass::Id ConvertDelegatedRenderPassId(
50 RenderPass::Id delegated_render_pass_id) const; 57 RenderPass::Id delegated_render_pass_id) const;
51 58
52 void AppendRenderPassQuads( 59 void AppendRenderPassQuads(
53 QuadSink* quad_sink, 60 QuadSink* quad_sink,
54 AppendQuadsData* append_quads_data, 61 AppendQuadsData* append_quads_data,
55 const RenderPass* delegated_render_pass, 62 const RenderPass* delegated_render_pass,
56 gfx::Size frame_size) const; 63 gfx::Size frame_size) const;
57 64
58 // LayerImpl overrides. 65 // LayerImpl overrides.
59 virtual const char* layerTypeAsString() const OVERRIDE; 66 virtual const char* layerTypeAsString() const OVERRIDE;
60 67
61 ScopedPtrVector<RenderPass> render_passes_in_draw_order_; 68 ScopedPtrVector<RenderPass> render_passes_in_draw_order_;
62 base::hash_map<RenderPass::Id, int> render_passes_index_by_id_; 69 base::hash_map<RenderPass::Id, int> render_passes_index_by_id_;
63 gfx::Size display_size_; 70 gfx::Size display_size_;
71 int child_id_;
64 }; 72 };
65 73
66 } 74 }
67 75
68 #endif // CC_DELEGATED_RENDERER_LAYER_IMPL_H_ 76 #endif // CC_DELEGATED_RENDERER_LAYER_IMPL_H_
OLDNEW
« no previous file with comments | « cc/delegated_renderer_layer.cc ('k') | cc/delegated_renderer_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698