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/test/fake_layer_tree_host.h" | 10 #include "cc/test/fake_layer_tree_host.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 void CalcDrawProps(const gfx::Size& viewport_size); | 69 void CalcDrawProps(const gfx::Size& viewport_size); |
70 void AppendQuadsWithOcclusion(LayerImpl* layer_impl, | 70 void AppendQuadsWithOcclusion(LayerImpl* layer_impl, |
71 const gfx::Rect& occluded); | 71 const gfx::Rect& occluded); |
72 | 72 |
73 OutputSurface* output_surface() const { | 73 OutputSurface* output_surface() const { |
74 return host_->host_impl()->output_surface(); | 74 return host_->host_impl()->output_surface(); |
75 } | 75 } |
76 ResourceProvider* resource_provider() const { | 76 ResourceProvider* resource_provider() const { |
77 return host_->host_impl()->resource_provider(); | 77 return host_->host_impl()->resource_provider(); |
78 } | 78 } |
| 79 FakeLayerTreeHostImpl* host_impl() const { return host_->host_impl(); } |
79 const QuadList& quad_list() const { return quad_culler_.quad_list(); } | 80 const QuadList& quad_list() const { return quad_culler_.quad_list(); } |
80 | 81 |
81 private: | 82 private: |
82 scoped_ptr<FakeLayerTreeHost> host_; | 83 scoped_ptr<FakeLayerTreeHost> host_; |
83 scoped_ptr<LayerImpl> root_layer_impl_; | 84 scoped_ptr<LayerImpl> root_layer_impl_; |
84 MockQuadCuller quad_culler_; | 85 MockQuadCuller quad_culler_; |
85 }; | 86 }; |
86 }; | 87 }; |
87 | 88 |
88 } // namespace cc | 89 } // namespace cc |
89 | 90 |
90 #endif // CC_TEST_LAYER_TEST_COMMON_H_ | 91 #endif // CC_TEST_LAYER_TEST_COMMON_H_ |
OLD | NEW |