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 gfx::Vector2dF(), | 105 gfx::Vector2dF(), |
108 FilterOperations()); | 106 FilterOperations()); |
109 } | 107 } |
110 | 108 |
111 void AddRenderPassQuad(TestRenderPass* to_pass, | 109 void AddRenderPassQuad(TestRenderPass* to_pass, |
112 TestRenderPass* contributing_pass, | 110 TestRenderPass* contributing_pass, |
113 ResourceProvider::ResourceId mask_resource_id, | 111 ResourceProvider::ResourceId mask_resource_id, |
114 const FilterOperations& filters, | 112 const FilterOperations& filters, |
115 gfx::Transform transform) { | 113 gfx::Transform transform) { |
116 gfx::Rect output_rect = contributing_pass->output_rect; | 114 gfx::Rect output_rect = contributing_pass->output_rect; |
117 SharedQuadState* shared_state = to_pass->CreateAndAppendSharedQuadState(); | 115 SharedQuadState* shared_state = to_pass->CreateAndAppendSharedQuadState(); |
118 shared_state->SetAll(transform, | 116 shared_state->SetAll(transform, |
119 output_rect.size(), | 117 output_rect.size(), |
120 output_rect, | 118 output_rect, |
121 output_rect, | 119 output_rect, |
122 false, | 120 false, |
123 1, | 121 1, |
124 SkXfermode::kSrcOver_Mode, | 122 SkXfermode::kSrcOver_Mode, |
125 0); | 123 0); |
126 RenderPassDrawQuad* quad = | 124 RenderPassDrawQuad* quad = |
127 to_pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>(); | 125 to_pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>(); |
128 quad->SetNew(shared_state, | 126 quad->SetNew(shared_state, |
129 output_rect, | 127 output_rect, |
130 output_rect, | 128 output_rect, |
131 contributing_pass->id, | 129 contributing_pass->id, |
132 false, | |
133 mask_resource_id, | 130 mask_resource_id, |
134 output_rect, | |
135 gfx::RectF(), | 131 gfx::RectF(), |
136 filters, | 132 filters, |
137 gfx::Vector2dF(), | 133 gfx::Vector2dF(), |
138 FilterOperations()); | 134 FilterOperations()); |
139 } | 135 } |
140 | 136 |
141 } // namespace cc | 137 } // namespace cc |
OLD | NEW |