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

Unified Diff: components/exo/surface.cc

Issue 2502373003: stop using SkXfermode -- use SkBlendMode instead (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: components/exo/surface.cc
diff --git a/components/exo/surface.cc b/components/exo/surface.cc
index eda22743a678d08f7d042eeeff16d8bfefd0286d..54fae08435fd626f29af6f1b1dc42ba830145731 100644
--- a/components/exo/surface.cc
+++ b/components/exo/surface.cc
@@ -420,7 +420,7 @@ void Surface::SetOnlyVisibleOnSecureOutput(bool only_visible_on_secure_output) {
pending_state_.only_visible_on_secure_output = only_visible_on_secure_output;
}
-void Surface::SetBlendMode(SkXfermode::Mode blend_mode) {
+void Surface::SetBlendMode(SkBlendMode blend_mode) {
TRACE_EVENT1("exo", "Surface::SetBlendMode", "blend_mode", blend_mode);
pending_state_.blend_mode = blend_mode;
@@ -502,7 +502,7 @@ void Surface::CommitSurfaceHierarchy() {
base::Bind(&RequireCallback, base::Unretained(surface_manager_)),
content_size_, contents_surface_to_layer_scale, content_size_);
window_->layer()->SetFillsBoundsOpaquely(
- state_.blend_mode == SkXfermode::kSrc_Mode ||
+ state_.blend_mode == SkBlendMode::kSrc ||
state_.opaque_region.contains(
gfx::RectToSkIRect(gfx::Rect(content_size_))));
}
@@ -820,7 +820,7 @@ void Surface::UpdateSurface(bool full_damage) {
render_pass->CreateAndAppendDrawQuad<cc::TextureDrawQuad>();
float vertex_opacity[4] = {1.0, 1.0, 1.0, 1.0};
gfx::Rect opaque_rect;
- if (state_.blend_mode == SkXfermode::kSrc_Mode ||
+ if (state_.blend_mode == SkBlendMode::kSrc ||
state_.opaque_region.contains(gfx::RectToSkIRect(quad_rect))) {
opaque_rect = quad_rect;
} else if (state_.opaque_region.isRect()) {

Powered by Google App Engine
This is Rietveld 408576698