summaryrefslogtreecommitdiffstats
path: root/cc/output/software_renderer.cc
diff options
context:
space:
mode:
authorrosca <rosca@adobe.com>2014-10-22 02:54:12 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-22 09:55:42 +0000
commit7b73f83a1d6c212c3f4bc915f495baf1b4671dbf (patch)
treeb5aab8594d131c702f314455b03c89b2d7396c14 /cc/output/software_renderer.cc
parent547c1dd78570986435140b5f632ef927fd5168f8 (diff)
downloadchromium_src-7b73f83a1d6c212c3f4bc915f495baf1b4671dbf.zip
chromium_src-7b73f83a1d6c212c3f4bc915f495baf1b4671dbf.tar.gz
chromium_src-7b73f83a1d6c212c3f4bc915f495baf1b4671dbf.tar.bz2
Implement mix-blend-mode in GL renderer using shaders.
This implementation brings in several improvements for blending: - it's done faster, due to reducing the number of readbacks. - the backdrop doesn't suffer any transformation, so the result is more correct. - the results are similar to the ones obtained using the software paths. - blending is always applied after filters, even when the filters can be expressed using a color matrix. The initial experiment: https://codereview.chromium.org/555133002/. BUG=243223 Review URL: https://codereview.chromium.org/658483003 Cr-Commit-Position: refs/heads/master@{#300657}
Diffstat (limited to 'cc/output/software_renderer.cc')
-rw-r--r--cc/output/software_renderer.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/cc/output/software_renderer.cc b/cc/output/software_renderer.cc
index c3cb828..acc897f 100644
--- a/cc/output/software_renderer.cc
+++ b/cc/output/software_renderer.cc
@@ -239,14 +239,16 @@ void SoftwareRenderer::DoDrawQuad(DrawingFrame* frame, const DrawQuad* quad) {
current_canvas_->setMatrix(sk_device_matrix);
current_paint_.reset();
- if (!IsScaleAndIntegerTranslate(sk_device_matrix)) {
+ if (settings_->force_antialiasing ||
+ !IsScaleAndIntegerTranslate(sk_device_matrix)) {
// TODO(danakj): Until we can enable AA only on exterior edges of the
// layer, disable AA if any interior edges are present. crbug.com/248175
bool all_four_edges_are_exterior = quad->IsTopEdge() &&
quad->IsLeftEdge() &&
quad->IsBottomEdge() &&
quad->IsRightEdge();
- if (settings_->allow_antialiasing && all_four_edges_are_exterior)
+ if (settings_->allow_antialiasing &&
+ (settings_->force_antialiasing || all_four_edges_are_exterior))
current_paint_.setAntiAlias(true);
current_paint_.setFilterLevel(SkPaint::kLow_FilterLevel);
}