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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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 0, | 102 0, |
103 gfx::RectF(), | 103 gfx::Vector2dF(), |
104 gfx::Size(), | |
104 FilterOperations(), | 105 FilterOperations(), |
105 gfx::Vector2dF(), | 106 gfx::Vector2dF(), |
106 FilterOperations()); | 107 FilterOperations()); |
107 } | 108 } |
108 | 109 |
109 void AddRenderPassQuad(TestRenderPass* to_pass, | 110 void AddRenderPassQuad(TestRenderPass* to_pass, |
110 TestRenderPass* contributing_pass, | 111 TestRenderPass* contributing_pass, |
111 ResourceProvider::ResourceId mask_resource_id, | 112 ResourceProvider::ResourceId mask_resource_id, |
112 const FilterOperations& filters, | 113 const FilterOperations& filters, |
113 gfx::Transform transform) { | 114 gfx::Transform transform) { |
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 SkXfermode::kSrcOver_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::Vector2dF(), |
133 gfx::Size(), | |
danakj
2014/10/15 15:33:35
this would be a divide by 0 when we try to use the
enne (OOO)
2014/10/15 19:10:55
I'll make it 1, 1.
| |
132 filters, | 134 filters, |
133 gfx::Vector2dF(), | 135 gfx::Vector2dF(), |
134 FilterOperations()); | 136 FilterOperations()); |
135 } | 137 } |
136 | 138 |
137 } // namespace cc | 139 } // namespace cc |
OLD | NEW |