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

Unified Diff: components/exo/surface.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/exo/surface.h ('k') | components/exo/surface_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/exo/surface.cc
diff --git a/components/exo/surface.cc b/components/exo/surface.cc
index 76e1564ab97c5c4259f5639126e25058535f8af6..187e1e79a4bff8b63565270db63af7b495286fa0 100644
--- a/components/exo/surface.cc
+++ b/components/exo/surface.cc
@@ -420,8 +420,9 @@ 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) {
- TRACE_EVENT1("exo", "Surface::SetBlendMode", "blend_mode", blend_mode);
+void Surface::SetBlendMode(SkBlendMode blend_mode) {
+ TRACE_EVENT1("exo", "Surface::SetBlendMode", "blend_mode",
+ static_cast<int>(blend_mode));
pending_state_.blend_mode = blend_mode;
}
@@ -502,7 +503,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_))));
}
@@ -819,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()) {
« no previous file with comments | « components/exo/surface.h ('k') | components/exo/surface_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698