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

Unified Diff: cc/layers/layer.cc

Issue 2659023003: [cc] Add SkBlendMode::kDstIn support to cc::Layer (Closed)
Patch Set: Created 3 years, 11 months 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 | « no previous file | cc/layers/render_surface_impl.cc » ('j') | cc/layers/render_surface_impl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer.cc
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
index e878a2020fb46732a3fd02938e91947f1fb818ab..f458f5d4bf137278c7b277cdea8101091b5c050f 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -501,10 +501,12 @@ void Layer::SetBlendMode(SkBlendMode blend_mode) {
if (inputs_.blend_mode == blend_mode)
return;
- // Allowing only blend modes that are defined in the CSS Compositing standard:
+ // Allowing only blend modes that are defined in the CSS Compositing standard,
+ // plus destination-in which is used to implement masks.
// http://dev.w3.org/fxtf/compositing-1/#blending
switch (blend_mode) {
case SkBlendMode::kSrcOver:
+ case SkBlendMode::kDstIn:
case SkBlendMode::kScreen:
case SkBlendMode::kOverlay:
case SkBlendMode::kDarken:
@@ -527,7 +529,6 @@ void Layer::SetBlendMode(SkBlendMode blend_mode) {
case SkBlendMode::kDst:
case SkBlendMode::kDstOver:
case SkBlendMode::kSrcIn:
- case SkBlendMode::kDstIn:
case SkBlendMode::kSrcOut:
case SkBlendMode::kDstOut:
case SkBlendMode::kSrcATop:
« no previous file with comments | « no previous file | cc/layers/render_surface_impl.cc » ('j') | cc/layers/render_surface_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698