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_MOCK_QUAD_CULLER_H_ | 5 #ifndef CC_TEST_MOCK_QUAD_CULLER_H_ |
6 #define CC_TEST_MOCK_QUAD_CULLER_H_ | 6 #define CC_TEST_MOCK_QUAD_CULLER_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "cc/layers/quad_sink.h" | 9 #include "cc/layers/quad_sink.h" |
10 #include "cc/quads/draw_quad.h" | 10 #include "cc/quads/draw_quad.h" |
11 #include "cc/quads/render_pass.h" | 11 #include "cc/quads/render_pass.h" |
12 #include "cc/test/mock_occlusion_tracker.h" | 12 #include "cc/test/mock_occlusion_tracker.h" |
13 | 13 |
14 namespace cc { | 14 namespace cc { |
15 class LayerImpl; | 15 class LayerImpl; |
16 | 16 |
17 class MockQuadCuller : public QuadSink { | 17 class MockQuadCuller : public QuadSink { |
18 public: | 18 public: |
19 virtual ~MockQuadCuller(); | 19 virtual ~MockQuadCuller(); |
20 | 20 |
21 explicit MockQuadCuller(RenderPass* external_render_pass); | |
22 explicit MockQuadCuller(MockOcclusionTracker<LayerImpl>* occlusion_tracker); | |
23 MockQuadCuller(RenderPass* external_render_pass, | 21 MockQuadCuller(RenderPass* external_render_pass, |
24 MockOcclusionTracker<LayerImpl>* occlusion_tracker); | 22 MockOcclusionTracker<LayerImpl>* occlusion_tracker); |
25 MockQuadCuller(); | |
26 | |
27 // QuadSink interface. | 23 // QuadSink interface. |
28 virtual SharedQuadState* CreateSharedQuadState() OVERRIDE; | 24 virtual SharedQuadState* CreateSharedQuadState() OVERRIDE; |
29 virtual gfx::Rect UnoccludedContentRect(const gfx::Rect& content_rect, | 25 virtual gfx::Rect UnoccludedContentRect(const gfx::Rect& content_rect, |
30 const gfx::Transform& draw_transform) | 26 const gfx::Transform& draw_transform) |
31 OVERRIDE; | 27 OVERRIDE; |
32 virtual gfx::Rect UnoccludedContributingSurfaceContentRect( | 28 virtual gfx::Rect UnoccludedContributingSurfaceContentRect( |
33 const gfx::Rect& content_rect, | 29 const gfx::Rect& content_rect, |
34 const gfx::Transform& draw_transform) OVERRIDE; | 30 const gfx::Transform& draw_transform) OVERRIDE; |
35 virtual void Append(scoped_ptr<DrawQuad> draw_quad) OVERRIDE; | 31 virtual void Append(scoped_ptr<DrawQuad> draw_quad) OVERRIDE; |
36 | 32 |
(...skipping 23 matching lines...) Expand all Loading... |
60 scoped_ptr<MockOcclusionTracker<LayerImpl> > occlusion_tracker_storage_; | 56 scoped_ptr<MockOcclusionTracker<LayerImpl> > occlusion_tracker_storage_; |
61 MockOcclusionTracker<LayerImpl>* occlusion_tracker_; | 57 MockOcclusionTracker<LayerImpl>* occlusion_tracker_; |
62 | 58 |
63 gfx::Rect occluded_target_rect_; | 59 gfx::Rect occluded_target_rect_; |
64 gfx::Rect occluded_target_rect_for_contributing_surface_; | 60 gfx::Rect occluded_target_rect_for_contributing_surface_; |
65 }; | 61 }; |
66 | 62 |
67 } // namespace cc | 63 } // namespace cc |
68 | 64 |
69 #endif // CC_TEST_MOCK_QUAD_CULLER_H_ | 65 #endif // CC_TEST_MOCK_QUAD_CULLER_H_ |
OLD | NEW |