OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <stdint.h> | 5 #include <stdint.h> |
6 | 6 |
7 #include "cc/layers/picture_image_layer.h" | 7 #include "cc/layers/picture_image_layer.h" |
8 #include "cc/layers/solid_color_layer.h" | 8 #include "cc/layers/solid_color_layer.h" |
9 #include "cc/test/layer_tree_pixel_resource_test.h" | 9 #include "cc/test/layer_tree_pixel_resource_test.h" |
10 #include "cc/test/pixel_comparator.h" | 10 #include "cc/test/pixel_comparator.h" |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 opacity = 0.5f; | 209 opacity = 0.5f; |
210 } else if (i == kBlendModesCount + 3) { | 210 } else if (i == kBlendModesCount + 3) { |
211 blend_mode = kShaderBlendMode; | 211 blend_mode = kShaderBlendMode; |
212 color = kMiscTransparentColor; | 212 color = kMiscTransparentColor; |
213 } | 213 } |
214 | 214 |
215 scoped_refptr<SolidColorLayer> lane = | 215 scoped_refptr<SolidColorLayer> lane = |
216 CreateSolidColorLayer(child_rect, color); | 216 CreateSolidColorLayer(child_rect, color); |
217 lane->SetBlendMode(blend_mode); | 217 lane->SetBlendMode(blend_mode); |
218 lane->SetOpacity(opacity); | 218 lane->SetOpacity(opacity); |
219 lane->SetForceRenderSurface(true); | 219 lane->SetForceRenderSurfaceForTesting(true); |
220 if (flags & kUseMasks) | 220 if (flags & kUseMasks) |
221 SetupMaskLayer(lane); | 221 SetupMaskLayer(lane); |
222 if (flags & kUseColorMatrix) { | 222 if (flags & kUseColorMatrix) { |
223 SetupColorMatrix(lane); | 223 SetupColorMatrix(lane); |
224 } | 224 } |
225 background->AddChild(lane); | 225 background->AddChild(lane); |
226 } | 226 } |
227 } | 227 } |
228 | 228 |
229 void RunBlendingWithRenderPass(PixelResourceTestCase type, | 229 void RunBlendingWithRenderPass(PixelResourceTestCase type, |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
496 RunBlendingWithRenderPass( | 496 RunBlendingWithRenderPass( |
497 GL_ZERO_COPY_RECT_DRAW, | 497 GL_ZERO_COPY_RECT_DRAW, |
498 FILE_PATH_LITERAL("blending_render_pass_mask.png"), | 498 FILE_PATH_LITERAL("blending_render_pass_mask.png"), |
499 kUseMasks | kUseAntialiasing | kUseColorMatrix | kForceShaders); | 499 kUseMasks | kUseAntialiasing | kUseColorMatrix | kForceShaders); |
500 } | 500 } |
501 | 501 |
502 } // namespace | 502 } // namespace |
503 } // namespace cc | 503 } // namespace cc |
504 | 504 |
505 #endif // OS_ANDROID | 505 #endif // OS_ANDROID |
OLD | NEW |