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

Unified Diff: cc/quads/shared_quad_state.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: cc/quads/shared_quad_state.cc
diff --git a/cc/quads/shared_quad_state.cc b/cc/quads/shared_quad_state.cc
index cd75f947396c4f99271c47bbcc25aa0bad0bd4f8..8bdaf8834aa370aaa0ca8c15aa1513d3a3d957b8 100644
--- a/cc/quads/shared_quad_state.cc
+++ b/cc/quads/shared_quad_state.cc
@@ -10,14 +10,15 @@
#include "cc/base/math_util.h"
#include "cc/debug/traced_value.h"
+extern const char* SkBlendMode_Name(SkBlendMode);
f(malita) 2016/11/16 21:10:58 Is this not declared in a public Skia header?
reed1 2016/11/16 21:31:17 Just a placeholder until skia roll updates. Will b
+
namespace cc {
SharedQuadState::SharedQuadState()
: is_clipped(false),
opacity(0.f),
- blend_mode(SkXfermode::kSrcOver_Mode),
- sorting_context_id(0) {
-}
+ blend_mode(SkBlendMode::kSrcOver),
+ sorting_context_id(0) {}
SharedQuadState::SharedQuadState(const SharedQuadState& other) = default;
@@ -33,7 +34,7 @@ void SharedQuadState::SetAll(const gfx::Transform& quad_to_target_transform,
const gfx::Rect& clip_rect,
bool is_clipped,
float opacity,
- SkXfermode::Mode blend_mode,
+ SkBlendMode blend_mode,
int sorting_context_id) {
this->quad_to_target_transform = quad_to_target_transform;
this->quad_layer_bounds = quad_layer_bounds;
@@ -56,7 +57,7 @@ void SharedQuadState::AsValueInto(base::trace_event::TracedValue* value) const {
MathUtil::AddToTracedValue("clip_rect", clip_rect, value);
value->SetDouble("opacity", opacity);
- value->SetString("blend_mode", SkXfermode::ModeName(blend_mode));
+ value->SetString("blend_mode", SkBlendMode_Name(blend_mode));
TracedValue::MakeDictIntoImplicitSnapshotWithCategory(
TRACE_DISABLED_BY_DEFAULT("cc.debug.quads"),
value,

Powered by Google App Engine
This is Rietveld 408576698