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 <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 23 matching lines...) Expand all Loading... |
34 | 34 |
35 namespace gfx { class Rect; } | 35 namespace gfx { class Rect; } |
36 | 36 |
37 namespace cc { | 37 namespace cc { |
38 class LayerImpl; | 38 class LayerImpl; |
39 class CompositorFrameSink; | 39 class CompositorFrameSink; |
40 class QuadList; | 40 class QuadList; |
41 class RenderSurfaceImpl; | 41 class RenderSurfaceImpl; |
42 class ResourceProvider; | 42 class ResourceProvider; |
43 | 43 |
| 44 // Returns the RenderSurfaceImpl into which the given layer draws. |
44 RenderSurfaceImpl* GetRenderSurface(LayerImpl* layer_impl); | 45 RenderSurfaceImpl* GetRenderSurface(LayerImpl* layer_impl); |
45 const RenderSurfaceImpl* GetRenderSurface(const LayerImpl* layer_impl); | 46 float OpacityForLayer(LayerImpl* layer_impl); |
46 | 47 |
47 class LayerTestCommon { | 48 class LayerTestCommon { |
48 public: | 49 public: |
49 static const char* quad_string; | 50 static const char* quad_string; |
50 | 51 |
51 static void VerifyQuadsExactlyCoverRect(const QuadList& quads, | 52 static void VerifyQuadsExactlyCoverRect(const QuadList& quads, |
52 const gfx::Rect& rect); | 53 const gfx::Rect& rect); |
53 | 54 |
54 static void VerifyQuadsAreOccluded(const QuadList& quads, | 55 static void VerifyQuadsAreOccluded(const QuadList& quads, |
55 const gfx::Rect& occluded, | 56 const gfx::Rect& occluded, |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 std::unique_ptr<RenderPass> render_pass_; | 208 std::unique_ptr<RenderPass> render_pass_; |
208 scoped_refptr<AnimationTimeline> timeline_; | 209 scoped_refptr<AnimationTimeline> timeline_; |
209 scoped_refptr<AnimationTimeline> timeline_impl_; | 210 scoped_refptr<AnimationTimeline> timeline_impl_; |
210 int layer_impl_id_; | 211 int layer_impl_id_; |
211 }; | 212 }; |
212 }; | 213 }; |
213 | 214 |
214 } // namespace cc | 215 } // namespace cc |
215 | 216 |
216 #endif // CC_TEST_LAYER_TEST_COMMON_H_ | 217 #endif // CC_TEST_LAYER_TEST_COMMON_H_ |
OLD | NEW |