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