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

Issue 986623003: Implement support for non-scale/translate CTM in image filters.

Created:
5 years, 9 months ago by Stephen White
Modified:
5 years, 4 months ago
Reviewers:
robertphillips, reed1
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Implement support for non-scale/translate CTM in image filters. Implemented by extracting out the non-scale/translate components and applying that post-filter as an SkMatrixImageFilter.

Patch Set 1 #

Patch Set 2 : Move matrix mods to internalSaveLayer(). Use external save()/restore(). #

Patch Set 3 : Remove useless #include #

Patch Set 4 : Use an SkAutoCanvasRestore in internalSaveLayer() #

Patch Set 5 : Add calls to internalRestore() where needed #

Patch Set 6 : Stash the matrix on the DeviceCM instead of using internalSave/internalRestore #

Patch Set 7 : Changes per review comments #

Patch Set 8 : Update to ToT #

Patch Set 9 : Update to ToT #

Patch Set 10 : Add imagefilterstransformed GM #

Patch Set 11 : Fix copyright #

Patch Set 12 : Revert move of SkMatrixImageFilter (now depends on https://codereview.chromium.org/1011273003/) #

Patch Set 13 : Update to new SkImageFilter::CreateMatrixFilter() #

Patch Set 14 : Fix GM size #

Patch Set 15 : Switch to SkMatrix::decomposeScale(). #

Patch Set 16 : Revert changes to SkMatrix, SkPictureShader #

Patch Set 17 : cleanup #

Patch Set 18 : Update to latest rev of SkMatrixImageFilter move #

Total comments: 19

Patch Set 19 : Fixes per Robert's comments #

Patch Set 20 : Add some scaling to the CTM in the GM #

Patch Set 21 : Remove GM #

Total comments: 2

Patch Set 22 : Fixes per Robert's comments #

Patch Set 23 : Update to ToT #

Total comments: 6

Patch Set 24 : Fixes per review comments #

Patch Set 25 : Revert some inadvertent changes. #

Patch Set 26 : Only restore to stashed matrix if we have an MCRec #

Patch Set 27 : Go back to setting fMCRec->fMatrix directly, but also set dirty flags. #

Patch Set 28 : Alternate version with internalSetMatrix() refactor #

Patch Set 29 : Remove spurious whitespace #

Patch Set 30 : Update to ToT #

Patch Set 31 : Update to TOT #

Unified diffs Side-by-side diffs Delta from patch set Stats (+32 lines, -6 lines) Patch
M include/core/SkCanvas.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 chunk +1 line, -0 lines 0 comments Download
M src/core/SkCanvas.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 7 chunks +31 lines, -6 lines 0 comments Download

Messages

Total messages: 26 (4 generated)
Stephen White
New version up: stash the original matrix on the DeviceCM, instead of trying to use ...
5 years, 9 months ago (2015-03-16 18:19:11 UTC) #2
Stephen White
In order to eliminate the extra blit incurred by the non-scale/translate case, I think we'dhave ...
5 years, 9 months ago (2015-03-16 19:02:03 UTC) #3
reed1
not sure I'm convinced we need to land an intermediate cl, but that aside... 1. ...
5 years, 9 months ago (2015-03-16 21:18:11 UTC) #4
reed1
5 years, 9 months ago (2015-03-16 21:18:34 UTC) #6
Stephen White
On 2015/03/16 21:18:11, reed1 wrote: > not sure I'm convinced we need to land an ...
5 years, 9 months ago (2015-03-16 22:03:41 UTC) #7
Stephen White
BTW, I have an attempt at the blit optimization here: https://codereview.chromium.org/1016483003/ Raster-only, and it doesn't ...
5 years, 9 months ago (2015-03-16 22:05:13 UTC) #8
reed1
Seems much better, but I'd still like to split out the parts that are not ...
5 years, 9 months ago (2015-03-19 17:47:30 UTC) #9
Stephen White
On 2015/03/19 17:47:30, reed1 wrote: > Seems much better, but I'd still like to split ...
5 years, 9 months ago (2015-03-19 18:45:20 UTC) #10
Stephen White
Ok this patch now has just: > > 3. whatever is left
5 years, 9 months ago (2015-03-20 13:34:41 UTC) #11
robertphillips
first pass https://codereview.chromium.org/986623003/diff/340001/gm/imagefilterstransformed.cpp File gm/imagefilterstransformed.cpp (right): https://codereview.chromium.org/986623003/diff/340001/gm/imagefilterstransformed.cpp#newcode20 gm/imagefilterstransformed.cpp:20: // This GM checks that the scale ...
5 years, 9 months ago (2015-03-20 14:01:10 UTC) #12
reed1
Its great that its down to one file, but its still tricky :) I vote ...
5 years, 9 months ago (2015-03-20 14:09:42 UTC) #13
Stephen White
https://codereview.chromium.org/986623003/diff/340001/gm/imagefilterstransformed.cpp File gm/imagefilterstransformed.cpp (right): https://codereview.chromium.org/986623003/diff/340001/gm/imagefilterstransformed.cpp#newcode20 gm/imagefilterstransformed.cpp:20: On 2015/03/20 14:01:09, robertphillips wrote: > // This GM ...
5 years, 9 months ago (2015-03-20 14:19:08 UTC) #14
Stephen White
On 2015/03/20 14:09:42, reed1 wrote: > Its great that its down to one file, but ...
5 years, 9 months ago (2015-03-20 14:31:42 UTC) #16
Stephen White
https://codereview.chromium.org/986623003/diff/340001/src/core/SkCanvas.cpp File src/core/SkCanvas.cpp (right): https://codereview.chromium.org/986623003/diff/340001/src/core/SkCanvas.cpp#newcode442 src/core/SkCanvas.cpp:442: On 2015/03/20 14:01:09, robertphillips wrote: > overlength ? Done. ...
5 years, 9 months ago (2015-03-20 14:47:21 UTC) #17
Stephen White
BTW, one thing that occurred to me: if we implement the SkShader optimization where the ...
5 years, 9 months ago (2015-03-20 14:55:11 UTC) #18
robertphillips
https://codereview.chromium.org/986623003/diff/420001/src/core/SkCanvas.cpp File src/core/SkCanvas.cpp (right): https://codereview.chromium.org/986623003/diff/420001/src/core/SkCanvas.cpp#newcode920 src/core/SkCanvas.cpp:920: // that would invoke a possibly overridden virtual So, ...
5 years, 9 months ago (2015-03-20 15:02:26 UTC) #19
Stephen White
https://codereview.chromium.org/986623003/diff/420001/src/core/SkCanvas.cpp File src/core/SkCanvas.cpp (right): https://codereview.chromium.org/986623003/diff/420001/src/core/SkCanvas.cpp#newcode920 src/core/SkCanvas.cpp:920: // that would invoke a possibly overridden virtual On ...
5 years, 9 months ago (2015-03-20 15:07:33 UTC) #20
Stephen White
Ping? Are there any better ideas for solving this problem?
5 years, 9 months ago (2015-03-25 22:56:19 UTC) #22
reed1
https://codereview.chromium.org/986623003/diff/480001/src/core/SkCanvas.cpp File src/core/SkCanvas.cpp (right): https://codereview.chromium.org/986623003/diff/480001/src/core/SkCanvas.cpp#newcode911 src/core/SkCanvas.cpp:911: this->resetMatrix(); these two calls for matrix changes are virtual, ...
5 years, 9 months ago (2015-03-26 15:54:03 UTC) #23
Stephen White
Thanks for your review. New patch up. https://codereview.chromium.org/986623003/diff/480001/src/core/SkCanvas.cpp File src/core/SkCanvas.cpp (right): https://codereview.chromium.org/986623003/diff/480001/src/core/SkCanvas.cpp#newcode911 src/core/SkCanvas.cpp:911: this->resetMatrix(); On ...
5 years, 9 months ago (2015-03-26 16:18:34 UTC) #24
reed1
On 2015/03/26 16:18:34, Stephen White wrote: > Thanks for your review. New patch up. > ...
5 years, 9 months ago (2015-03-26 16:23:22 UTC) #25
Stephen White
5 years, 9 months ago (2015-03-26 16:33:19 UTC) #26
Ok new patch up: back to setting fMCRec->fMatrix directly, but we also set the
dirty flags as concat() and friends do.

Powered by Google App Engine
This is Rietveld 408576698