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

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: address comments 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
« no previous file with comments | « cc/output/renderer_pixeltest.cc ('k') | cc/test/pixel_comparator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/software_renderer.cc
diff --git a/cc/output/software_renderer.cc b/cc/output/software_renderer.cc
index 88b9c646c924956c054074ad6d7c804442a2fdd5..60eb22f147179e6243abddc9d80306444d117a6c 100644
--- a/cc/output/software_renderer.cc
+++ b/cc/output/software_renderer.cc
@@ -254,9 +254,10 @@ void SoftwareRenderer::DoDrawQuad(DrawingFrame* frame, const DrawQuad* quad) {
current_paint_.setFilterLevel(SkPaint::kLow_FilterLevel);
}
- if (quad->ShouldDrawWithBlending()) {
+ if (quad->ShouldDrawWithBlending() ||
+ quad->shared_quad_state->blend_mode != SkXfermode::kSrcOver_Mode) {
current_paint_.setAlpha(quad->opacity() * 255);
- current_paint_.setXfermodeMode(SkXfermode::kSrcOver_Mode);
+ current_paint_.setXfermodeMode(quad->shared_quad_state->blend_mode);
} else {
current_paint_.setXfermodeMode(SkXfermode::kSrc_Mode);
}
@@ -545,7 +546,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 | « cc/output/renderer_pixeltest.cc ('k') | cc/test/pixel_comparator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698