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

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

Issue 2873593002: Force use of and cache render surface. (Closed)
Patch Set: Created 3 years, 7 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/paint/paint_image.h" 9 #include "cc/paint/paint_image.h"
10 #include "cc/test/layer_tree_pixel_resource_test.h" 10 #include "cc/test/layer_tree_pixel_resource_test.h"
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 opacity = 0.5f; 213 opacity = 0.5f;
214 } else if (i == kBlendModesCount + 5) { 214 } else if (i == kBlendModesCount + 5) {
215 blend_mode = SkBlendMode::kDstIn; 215 blend_mode = SkBlendMode::kDstIn;
216 color = kMiscTransparentColor; 216 color = kMiscTransparentColor;
217 } 217 }
218 218
219 scoped_refptr<SolidColorLayer> lane = 219 scoped_refptr<SolidColorLayer> lane =
220 CreateSolidColorLayer(child_rect, color); 220 CreateSolidColorLayer(child_rect, color);
221 lane->SetBlendMode(blend_mode); 221 lane->SetBlendMode(blend_mode);
222 lane->SetOpacity(opacity); 222 lane->SetOpacity(opacity);
223 lane->SetForceRenderSurfaceForTesting(true); 223 lane->SetForceRenderSurface(true);
224 // Layers with kDstIn blend mode with a mask is not supported. 224 // Layers with kDstIn blend mode with a mask is not supported.
225 if (flags & kUseMasks && blend_mode != SkBlendMode::kDstIn) 225 if (flags & kUseMasks && blend_mode != SkBlendMode::kDstIn)
226 SetupMaskLayer(lane); 226 SetupMaskLayer(lane);
227 if (flags & kUseColorMatrix) { 227 if (flags & kUseColorMatrix) {
228 SetupColorMatrix(lane); 228 SetupColorMatrix(lane);
229 } 229 }
230 background->AddChild(lane); 230 background->AddChild(lane);
231 } 231 }
232 } 232 }
233 233
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 RunBlendingWithRenderPass( 501 RunBlendingWithRenderPass(
502 GL_ZERO_COPY_RECT_DRAW, 502 GL_ZERO_COPY_RECT_DRAW,
503 FILE_PATH_LITERAL("blending_render_pass_mask.png"), 503 FILE_PATH_LITERAL("blending_render_pass_mask.png"),
504 kUseMasks | kUseAntialiasing | kUseColorMatrix | kForceShaders); 504 kUseMasks | kUseAntialiasing | kUseColorMatrix | kForceShaders);
505 } 505 }
506 506
507 } // namespace 507 } // namespace
508 } // namespace cc 508 } // namespace cc
509 509
510 #endif // OS_ANDROID 510 #endif // OS_ANDROID
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698