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

Unified Diff: cc/quads/shared_quad_state.cc

Issue 23455060: mix-blend-mode implementation for accelerated layers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: unittests fixed Created 7 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 | « cc/quads/shared_quad_state.h ('k') | cc/test/data/blending_and_filter.png » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/quads/shared_quad_state.cc
diff --git a/cc/quads/shared_quad_state.cc b/cc/quads/shared_quad_state.cc
index 6a53d9f6a9f8d1a410deacb6ae8fc44d745d28ed..565845779178a6cba1b1e6de2f0e60062bc99a1b 100644
--- a/cc/quads/shared_quad_state.cc
+++ b/cc/quads/shared_quad_state.cc
@@ -10,7 +10,8 @@
namespace cc {
-SharedQuadState::SharedQuadState() : is_clipped(false), opacity(0.f) {}
+SharedQuadState::SharedQuadState()
+ : is_clipped(false), opacity(0.f), blend_mode(SkXfermode::kSrcOver_Mode) {}
SharedQuadState::~SharedQuadState() {
TRACE_EVENT_OBJECT_DELETED_WITH_ID(
@@ -26,19 +27,20 @@ scoped_ptr<SharedQuadState> SharedQuadState::Copy() const {
return make_scoped_ptr(new SharedQuadState(*this));
}
-void SharedQuadState::SetAll(
- const gfx::Transform& content_to_target_transform,
- gfx::Size content_bounds,
- gfx::Rect visible_content_rect,
- gfx::Rect clip_rect,
- bool is_clipped,
- float opacity) {
+void SharedQuadState::SetAll(const gfx::Transform& content_to_target_transform,
+ gfx::Size content_bounds,
+ gfx::Rect visible_content_rect,
+ gfx::Rect clip_rect,
+ bool is_clipped,
+ float opacity,
+ SkXfermode::Mode blend_mode) {
this->content_to_target_transform = content_to_target_transform;
this->content_bounds = content_bounds;
this->visible_content_rect = visible_content_rect;
this->clip_rect = clip_rect;
this->is_clipped = is_clipped;
this->opacity = opacity;
+ this->blend_mode = blend_mode;
}
scoped_ptr<base::Value> SharedQuadState::AsValue() const {
@@ -52,6 +54,7 @@ scoped_ptr<base::Value> SharedQuadState::AsValue() const {
value->SetBoolean("is_clipped", is_clipped);
value->Set("clip_rect", MathUtil::AsValue(clip_rect).release());
value->SetDouble("opacity", opacity);
+ value->SetString("blend_mode", SkXfermode::ModeName(blend_mode));
TracedValue::MakeDictIntoImplicitSnapshotWithCategory(
TRACE_DISABLED_BY_DEFAULT("cc.debug.quads"),
value.get(), "cc::SharedQuadState", this);
« no previous file with comments | « cc/quads/shared_quad_state.h ('k') | cc/test/data/blending_and_filter.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698