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

Side by Side Diff: cc/output/ca_layer_overlay.cc

Issue 2502373003: stop using SkXfermode -- use SkBlendMode instead (Closed)
Patch Set: rebase Created 4 years 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
« no previous file with comments | « cc/layers/solid_color_layer_impl_unittest.cc ('k') | cc/output/gl_renderer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/output/ca_layer_overlay.h" 5 #include "cc/output/ca_layer_overlay.h"
6 6
7 #include "base/metrics/histogram_macros.h" 7 #include "base/metrics/histogram_macros.h"
8 #include "cc/quads/render_pass_draw_quad.h" 8 #include "cc/quads/render_pass_draw_quad.h"
9 #include "cc/quads/solid_color_draw_quad.h" 9 #include "cc/quads/solid_color_draw_quad.h"
10 #include "cc/quads/stream_video_draw_quad.h" 10 #include "cc/quads/stream_video_draw_quad.h"
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 } 162 }
163 163
164 class CALayerOverlayProcessor { 164 class CALayerOverlayProcessor {
165 public: 165 public:
166 CALayerResult FromDrawQuad(ResourceProvider* resource_provider, 166 CALayerResult FromDrawQuad(ResourceProvider* resource_provider,
167 const gfx::RectF& display_rect, 167 const gfx::RectF& display_rect,
168 const DrawQuad* quad, 168 const DrawQuad* quad,
169 CALayerOverlay* ca_layer_overlay, 169 CALayerOverlay* ca_layer_overlay,
170 bool* skip, 170 bool* skip,
171 bool* render_pass_draw_quad) { 171 bool* render_pass_draw_quad) {
172 if (quad->shared_quad_state->blend_mode != SkXfermode::kSrcOver_Mode) 172 if (quad->shared_quad_state->blend_mode != SkBlendMode::kSrcOver)
173 return CA_LAYER_FAILED_QUAD_BLEND_MODE; 173 return CA_LAYER_FAILED_QUAD_BLEND_MODE;
174 174
175 // Early-out for invisible quads. 175 // Early-out for invisible quads.
176 if (quad->shared_quad_state->opacity == 0.f) { 176 if (quad->shared_quad_state->opacity == 0.f) {
177 *skip = true; 177 *skip = true;
178 return CA_LAYER_SUCCESS; 178 return CA_LAYER_SUCCESS;
179 } 179 }
180 180
181 // Enable edge anti-aliasing only on layer boundaries. 181 // Enable edge anti-aliasing only on layer boundaries.
182 ca_layer_overlay->edge_aa_mask = 0; 182 ca_layer_overlay->edge_aa_mask = 0;
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 CA_LAYER_FAILED_COUNT); 312 CA_LAYER_FAILED_COUNT);
313 313
314 if (result != CA_LAYER_SUCCESS) { 314 if (result != CA_LAYER_SUCCESS) {
315 ca_layer_overlays->clear(); 315 ca_layer_overlays->clear();
316 return false; 316 return false;
317 } 317 }
318 return true; 318 return true;
319 } 319 }
320 320
321 } // namespace cc 321 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/solid_color_layer_impl_unittest.cc ('k') | cc/output/gl_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698