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

Unified Diff: cc/output/software_renderer.cc

Issue 532003003: Adding support for blending in cc::SoftwareRenderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
Index: cc/output/software_renderer.cc
diff --git a/cc/output/software_renderer.cc b/cc/output/software_renderer.cc
index 88b9c646c924956c054074ad6d7c804442a2fdd5..48ce440b2d61d598325cbfc7102e363bb1470405 100644
--- a/cc/output/software_renderer.cc
+++ b/cc/output/software_renderer.cc
@@ -510,6 +510,9 @@ void SoftwareRenderer::DrawRenderPassQuad(const DrawingFrame* frame,
}
current_paint_.setShader(shader.get());
+ if (quad->shared_quad_state->blend_mode != SkXfermode::kSrcOver_Mode)
+ current_paint_.setXfermodeMode(quad->shared_quad_state->blend_mode);
Erik Dahlström (inactive) 2014/09/05 09:19:23 It's a little confusing that xfermode is set in Do
rosca 2014/09/05 09:35:31 Indeed, DoDrawQuad would be the right place where
enne (OOO) 2014/09/05 17:49:08 It seems like maybe the owning layer shouldn't hav
rosca 2014/09/05 20:52:27 I'll do it with another patch, including some unit
enne (OOO) 2014/09/05 21:03:04 DrawProperties doesn't seem like the right place f
rosca 2014/09/06 00:25:47 Now, all the blending layers get their own render
+
if (quad->mask_resource_id) {
ResourceProvider::ScopedReadLockSoftware mask_lock(resource_provider_,
quad->mask_resource_id);
@@ -545,7 +548,7 @@ void SoftwareRenderer::DrawRenderPassQuad(const DrawingFrame* frame,
current_paint_.setRasterizer(mask_rasterizer.get());
current_canvas_->drawRect(dest_visible_rect, current_paint_);
} else {
- // TODO(skaslev): Apply background filters and blend with content
+ // TODO(skaslev): Apply background filters
current_canvas_->drawRect(dest_visible_rect, current_paint_);
}
}
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_pixeltest_blending.cc » ('j') | cc/trees/layer_tree_host_pixeltest_blending.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698