Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(772)

Side by Side Diff: cc/trees/layer_tree_host_pixeltest_blending.cc

Issue 1912893002: cc : Stop pushing properties not used by LayerImpl to LayerImpl. (2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/layer_tree_host_pixeltest_filters.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698