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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 false, | 92 false, |
93 1, | 93 1, |
94 SkXfermode::kSrcOver_Mode, | 94 SkXfermode::kSrcOver_Mode, |
95 0); | 95 0); |
96 RenderPassDrawQuad* quad = | 96 RenderPassDrawQuad* quad = |
97 to_pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>(); | 97 to_pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>(); |
98 quad->SetNew(shared_state, | 98 quad->SetNew(shared_state, |
99 output_rect, | 99 output_rect, |
100 output_rect, | 100 output_rect, |
101 contributing_pass->id, | 101 contributing_pass->id, |
102 false, | |
103 0, | 102 0, |
104 output_rect, | |
105 gfx::RectF(), | 103 gfx::RectF(), |
106 FilterOperations(), | 104 FilterOperations(), |
107 FilterOperations()); | 105 FilterOperations()); |
108 } | 106 } |
109 | 107 |
110 void AddRenderPassQuad(TestRenderPass* to_pass, | 108 void AddRenderPassQuad(TestRenderPass* to_pass, |
111 TestRenderPass* contributing_pass, | 109 TestRenderPass* contributing_pass, |
112 ResourceProvider::ResourceId mask_resource_id, | 110 ResourceProvider::ResourceId mask_resource_id, |
113 const FilterOperations& filters, | 111 const FilterOperations& filters, |
114 gfx::Transform transform) { | 112 gfx::Transform transform) { |
115 gfx::Rect output_rect = contributing_pass->output_rect; | 113 gfx::Rect output_rect = contributing_pass->output_rect; |
116 SharedQuadState* shared_state = to_pass->CreateAndAppendSharedQuadState(); | 114 SharedQuadState* shared_state = to_pass->CreateAndAppendSharedQuadState(); |
117 shared_state->SetAll(transform, | 115 shared_state->SetAll(transform, |
118 output_rect.size(), | 116 output_rect.size(), |
119 output_rect, | 117 output_rect, |
120 output_rect, | 118 output_rect, |
121 false, | 119 false, |
122 1, | 120 1, |
123 SkXfermode::kSrcOver_Mode, | 121 SkXfermode::kSrcOver_Mode, |
124 0); | 122 0); |
125 RenderPassDrawQuad* quad = | 123 RenderPassDrawQuad* quad = |
126 to_pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>(); | 124 to_pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>(); |
127 quad->SetNew(shared_state, | 125 quad->SetNew(shared_state, |
128 output_rect, | 126 output_rect, |
129 output_rect, | 127 output_rect, |
130 contributing_pass->id, | 128 contributing_pass->id, |
131 false, | |
132 mask_resource_id, | 129 mask_resource_id, |
133 output_rect, | |
134 gfx::RectF(), | 130 gfx::RectF(), |
135 filters, | 131 filters, |
136 FilterOperations()); | 132 FilterOperations()); |
137 } | 133 } |
138 | 134 |
139 } // namespace cc | 135 } // namespace cc |
OLD | NEW |