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

Unified Diff: cc/output/gl_renderer.cc

Issue 1961553002: cc: optimize color matrix application for more complex filter DAGs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix comment Created 4 years, 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/gl_renderer.cc
diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc
index 5b1463351437bf71f87ab0cf517654bbf1ecd379..bc35463d638258bd480bcdb9675796d2a258805d 100644
--- a/cc/output/gl_renderer.cc
+++ b/cc/output/gl_renderer.cc
@@ -1008,11 +1008,14 @@ void GLRenderer::DrawRenderPassQuad(DrawingFrame* frame,
filter->asColorFilter(&colorfilter_rawptr);
sk_sp<SkColorFilter> cf(colorfilter_rawptr);
- if (cf && cf->asColorMatrix(color_matrix) && !filter->getInput(0)) {
- // We have a single color matrix as a filter; apply it locally
- // in the compositor.
+ if (cf && cf->asColorMatrix(color_matrix)) {
+ // We have a color matrix at the root of the filter DAG; apply it
+ // locally in the compositor and process the rest of the DAG (if any)
+ // in Skia.
use_color_matrix = true;
- } else {
+ filter = sk_ref_sp(filter->getInput(0));
+ }
+ if (filter) {
gfx::Vector2dF scale = quad->filters_scale;
SkMatrix scale_matrix;
scale_matrix.setScale(scale.x(), scale.y());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698