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 #include "cc/test/render_pass_test_utils.h" | 5 #include "cc/test/render_pass_test_utils.h" |
6 | 6 |
7 #include "cc/quads/render_pass_draw_quad.h" | 7 #include "cc/quads/render_pass_draw_quad.h" |
8 #include "cc/quads/shared_quad_state.h" | 8 #include "cc/quads/shared_quad_state.h" |
9 #include "cc/quads/solid_color_draw_quad.h" | 9 #include "cc/quads/solid_color_draw_quad.h" |
10 #include "cc/resources/resource_provider.h" | 10 #include "cc/resources/resource_provider.h" |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 0, | 102 0, |
103 gfx::Vector2dF(), | 103 gfx::Vector2dF(), |
104 gfx::Size(), | 104 gfx::Size(), |
105 FilterOperations(), | 105 FilterOperations(), |
106 gfx::Vector2dF(), | 106 gfx::Vector2dF(), |
107 FilterOperations()); | 107 FilterOperations()); |
108 } | 108 } |
109 | 109 |
110 void AddRenderPassQuad(TestRenderPass* to_pass, | 110 void AddRenderPassQuad(TestRenderPass* to_pass, |
111 TestRenderPass* contributing_pass, | 111 TestRenderPass* contributing_pass, |
112 ResourceProvider::ResourceId mask_resource_id, | 112 ResourceId mask_resource_id, |
113 const FilterOperations& filters, | 113 const FilterOperations& filters, |
114 gfx::Transform transform, | 114 gfx::Transform transform, |
115 SkXfermode::Mode blend_mode) { | 115 SkXfermode::Mode blend_mode) { |
116 gfx::Rect output_rect = contributing_pass->output_rect; | 116 gfx::Rect output_rect = contributing_pass->output_rect; |
117 SharedQuadState* shared_state = to_pass->CreateAndAppendSharedQuadState(); | 117 SharedQuadState* shared_state = to_pass->CreateAndAppendSharedQuadState(); |
118 shared_state->SetAll(transform, | 118 shared_state->SetAll(transform, |
119 output_rect.size(), | 119 output_rect.size(), |
120 output_rect, | 120 output_rect, |
121 output_rect, | 121 output_rect, |
122 false, | 122 false, |
123 1, | 123 1, |
124 blend_mode, | 124 blend_mode, |
125 0); | 125 0); |
126 RenderPassDrawQuad* quad = | 126 RenderPassDrawQuad* quad = |
127 to_pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>(); | 127 to_pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>(); |
128 gfx::Size arbitrary_nonzero_size(1, 1); | 128 gfx::Size arbitrary_nonzero_size(1, 1); |
129 quad->SetNew(shared_state, | 129 quad->SetNew(shared_state, |
130 output_rect, | 130 output_rect, |
131 output_rect, | 131 output_rect, |
132 contributing_pass->id, | 132 contributing_pass->id, |
133 mask_resource_id, | 133 mask_resource_id, |
134 gfx::Vector2dF(1.f, 1.f), | 134 gfx::Vector2dF(1.f, 1.f), |
135 arbitrary_nonzero_size, | 135 arbitrary_nonzero_size, |
136 filters, | 136 filters, |
137 gfx::Vector2dF(), | 137 gfx::Vector2dF(), |
138 FilterOperations()); | 138 FilterOperations()); |
139 } | 139 } |
140 | 140 |
141 } // namespace cc | 141 } // namespace cc |
OLD | NEW |