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_RENDER_PASS_TEST_UTILS_H_ | 5 #ifndef CC_TEST_RENDER_PASS_TEST_UTILS_H_ |
6 #define CC_TEST_RENDER_PASS_TEST_UTILS_H_ | 6 #define CC_TEST_RENDER_PASS_TEST_UTILS_H_ |
7 | 7 |
8 #include "cc/base/scoped_ptr_vector.h" | 8 #include "cc/base/scoped_ptr_vector.h" |
9 #include "cc/output/filter_operations.h" | 9 #include "cc/output/filter_operations.h" |
10 #include "cc/quads/render_pass.h" | 10 #include "cc/quads/render_pass.h" |
11 #include "cc/resources/resource_provider.h" | 11 #include "cc/resources/resource_provider.h" |
12 #include "third_party/skia/include/core/SkColor.h" | 12 #include "third_party/skia/include/core/SkColor.h" |
13 | 13 |
14 namespace gfx { | 14 namespace gfx { |
15 class Rect; | 15 class Rect; |
16 class Transform; | 16 class Transform; |
17 } | 17 } |
18 | 18 |
19 namespace cc { | 19 namespace cc { |
20 | 20 |
21 class SolidColorDrawQuad; | 21 class SolidColorDrawQuad; |
22 class TestRenderPass; | 22 class TestRenderPass; |
23 | 23 |
24 // Adds a new render pass with the provided properties to the given | 24 // Adds a new render pass with the provided properties to the given |
25 // render pass list. | 25 // render pass list. |
26 TestRenderPass* AddRenderPass( | 26 TestRenderPass* AddRenderPass(RenderPassList* pass_list, |
27 RenderPassList* pass_list, | 27 RenderPassId id, |
28 RenderPass::Id id, | 28 const gfx::Rect& output_rect, |
29 const gfx::Rect& output_rect, | 29 const gfx::Transform& root_transform); |
30 const gfx::Transform& root_transform); | |
31 | 30 |
32 // Adds a solid quad to a given render pass. | 31 // Adds a solid quad to a given render pass. |
33 SolidColorDrawQuad* AddQuad(TestRenderPass* pass, | 32 SolidColorDrawQuad* AddQuad(TestRenderPass* pass, |
34 const gfx::Rect& rect, | 33 const gfx::Rect& rect, |
35 SkColor color); | 34 SkColor color); |
36 | 35 |
37 // Adds a solid quad to a given render pass and sets is_clipped=true. | 36 // Adds a solid quad to a given render pass and sets is_clipped=true. |
38 SolidColorDrawQuad* AddClippedQuad(TestRenderPass* pass, | 37 SolidColorDrawQuad* AddClippedQuad(TestRenderPass* pass, |
39 const gfx::Rect& rect, | 38 const gfx::Rect& rect, |
40 SkColor color); | 39 SkColor color); |
(...skipping 11 matching lines...) Expand all Loading... |
52 // Adds a render pass quad with the given mask resource, filter, and transform. | 51 // Adds a render pass quad with the given mask resource, filter, and transform. |
53 void AddRenderPassQuad(TestRenderPass* toPass, | 52 void AddRenderPassQuad(TestRenderPass* toPass, |
54 TestRenderPass* contributing_pass, | 53 TestRenderPass* contributing_pass, |
55 ResourceProvider::ResourceId mask_resource_id, | 54 ResourceProvider::ResourceId mask_resource_id, |
56 const FilterOperations& filters, | 55 const FilterOperations& filters, |
57 gfx::Transform transform); | 56 gfx::Transform transform); |
58 | 57 |
59 } // namespace cc | 58 } // namespace cc |
60 | 59 |
61 #endif // CC_TEST_RENDER_PASS_TEST_UTILS_H_ | 60 #endif // CC_TEST_RENDER_PASS_TEST_UTILS_H_ |
OLD | NEW |