OLD | NEW |
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_TEST_LAYER_TEST_COMMON_H_ | 5 #ifndef CC_TEST_LAYER_TEST_COMMON_H_ |
6 #define CC_TEST_LAYER_TEST_COMMON_H_ | 6 #define CC_TEST_LAYER_TEST_COMMON_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "cc/quads/render_pass.h" | 10 #include "cc/quads/render_pass.h" |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 T::Create(host_->host_impl()->active_tree(), 2, a, b, c, d, e); | 100 T::Create(host_->host_impl()->active_tree(), 2, a, b, c, d, e); |
101 T* ptr = layer.get(); | 101 T* ptr = layer.get(); |
102 root_layer_impl_->AddChild(layer.Pass()); | 102 root_layer_impl_->AddChild(layer.Pass()); |
103 return ptr; | 103 return ptr; |
104 } | 104 } |
105 | 105 |
106 void CalcDrawProps(const gfx::Size& viewport_size); | 106 void CalcDrawProps(const gfx::Size& viewport_size); |
107 void AppendQuadsWithOcclusion(LayerImpl* layer_impl, | 107 void AppendQuadsWithOcclusion(LayerImpl* layer_impl, |
108 const gfx::Rect& occluded); | 108 const gfx::Rect& occluded); |
109 void AppendQuadsForPassWithOcclusion(LayerImpl* layer_impl, | 109 void AppendQuadsForPassWithOcclusion(LayerImpl* layer_impl, |
110 const RenderPassId& id, | 110 RenderPass* given_render_pass, |
111 const gfx::Rect& occluded); | 111 const gfx::Rect& occluded); |
112 void AppendSurfaceQuadsWithOcclusion(RenderSurfaceImpl* surface_impl, | 112 void AppendSurfaceQuadsWithOcclusion(RenderSurfaceImpl* surface_impl, |
113 const gfx::Rect& occluded); | 113 const gfx::Rect& occluded); |
114 | 114 |
115 OutputSurface* output_surface() const { | 115 OutputSurface* output_surface() const { |
116 return host_->host_impl()->output_surface(); | 116 return host_->host_impl()->output_surface(); |
117 } | 117 } |
118 ResourceProvider* resource_provider() const { | 118 ResourceProvider* resource_provider() const { |
119 return host_->host_impl()->resource_provider(); | 119 return host_->host_impl()->resource_provider(); |
120 } | 120 } |
121 LayerImpl* root_layer() const { return root_layer_impl_.get(); } | 121 LayerImpl* root_layer() const { return root_layer_impl_.get(); } |
122 FakeLayerTreeHostImpl* host_impl() const { return host_->host_impl(); } | 122 FakeLayerTreeHostImpl* host_impl() const { return host_->host_impl(); } |
123 Proxy* proxy() const { return host_->host_impl()->proxy(); } | 123 Proxy* proxy() const { return host_->host_impl()->proxy(); } |
124 const QuadList& quad_list() const { return render_pass_->quad_list; } | 124 const QuadList& quad_list() const { return render_pass_->quad_list; } |
125 | 125 |
126 private: | 126 private: |
127 FakeLayerTreeHostClient client_; | 127 FakeLayerTreeHostClient client_; |
128 scoped_ptr<FakeLayerTreeHost> host_; | 128 scoped_ptr<FakeLayerTreeHost> host_; |
129 scoped_ptr<LayerImpl> root_layer_impl_; | 129 scoped_ptr<LayerImpl> root_layer_impl_; |
130 scoped_ptr<RenderPass> render_pass_; | 130 scoped_ptr<RenderPass> render_pass_; |
131 MockOcclusionTracker<LayerImpl> occlusion_tracker_; | 131 MockOcclusionTracker<LayerImpl> occlusion_tracker_; |
132 }; | 132 }; |
133 }; | 133 }; |
134 | 134 |
135 } // namespace cc | 135 } // namespace cc |
136 | 136 |
137 #endif // CC_TEST_LAYER_TEST_COMMON_H_ | 137 #endif // CC_TEST_LAYER_TEST_COMMON_H_ |
OLD | NEW |