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

Side by Side Diff: cc/layers/render_surface_impl.cc

Issue 2502373003: stop using SkXfermode -- use SkBlendMode instead (Closed)
Patch Set: rebase Created 4 years, 1 month 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/render_surface_impl.h ('k') | cc/layers/render_surface_unittest.cc » ('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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/layers/render_surface_impl.h" 5 #include "cc/layers/render_surface_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 // functions (for example, gfx::ToEnclosedRect) that are called on this rect. 97 // functions (for example, gfx::ToEnclosedRect) that are called on this rect.
98 if (std::isnan(drawable_content_rect.x()) || 98 if (std::isnan(drawable_content_rect.x()) ||
99 std::isnan(drawable_content_rect.y()) || 99 std::isnan(drawable_content_rect.y()) ||
100 std::isnan(drawable_content_rect.right()) || 100 std::isnan(drawable_content_rect.right()) ||
101 std::isnan(drawable_content_rect.bottom())) 101 std::isnan(drawable_content_rect.bottom()))
102 return gfx::RectF(); 102 return gfx::RectF();
103 103
104 return drawable_content_rect; 104 return drawable_content_rect;
105 } 105 }
106 106
107 SkXfermode::Mode RenderSurfaceImpl::BlendMode() const { 107 SkBlendMode RenderSurfaceImpl::BlendMode() const {
108 return OwningEffectNode()->blend_mode; 108 return OwningEffectNode()->blend_mode;
109 } 109 }
110 110
111 bool RenderSurfaceImpl::UsesDefaultBlendMode() const { 111 bool RenderSurfaceImpl::UsesDefaultBlendMode() const {
112 return BlendMode() == SkXfermode::kSrcOver_Mode; 112 return BlendMode() == SkBlendMode::kSrcOver;
113 } 113 }
114 114
115 SkColor RenderSurfaceImpl::GetDebugBorderColor() const { 115 SkColor RenderSurfaceImpl::GetDebugBorderColor() const {
116 return DebugColors::SurfaceBorderColor(); 116 return DebugColors::SurfaceBorderColor();
117 } 117 }
118 118
119 float RenderSurfaceImpl::GetDebugBorderWidth() const { 119 float RenderSurfaceImpl::GetDebugBorderWidth() const {
120 return DebugColors::SurfaceBorderWidth(owning_layer_->layer_tree_impl()); 120 return DebugColors::SurfaceBorderWidth(owning_layer_->layer_tree_impl());
121 } 121 }
122 122
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 404
405 RenderPassDrawQuad* quad = 405 RenderPassDrawQuad* quad =
406 render_pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>(); 406 render_pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>();
407 quad->SetNew(shared_quad_state, content_rect(), visible_layer_rect, 407 quad->SetNew(shared_quad_state, content_rect(), visible_layer_rect,
408 render_pass_id, mask_resource_id, mask_uv_scale, 408 render_pass_id, mask_resource_id, mask_uv_scale,
409 mask_texture_size, Filters(), owning_layer_to_target_scale, 409 mask_texture_size, Filters(), owning_layer_to_target_scale,
410 FiltersOrigin(), BackgroundFilters()); 410 FiltersOrigin(), BackgroundFilters());
411 } 411 }
412 412
413 } // namespace cc 413 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/render_surface_impl.h ('k') | cc/layers/render_surface_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698