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

Issue 194713008: De-virtualize SkCanvas save/restore. (Closed)

Created:
6 years, 9 months ago by f(malita)
Modified:
6 years, 9 months ago
Reviewers:
robertphillips, reed1
CC:
skia-review_googlegroups.com
Visibility:
Public.

Description

De-virtualize SkCanvas save/restore. This moves the state management logic into non-virtual SkCanvas methods, and turns the virtuals into protected notifiers. R=robertphillips@google.com, reed@google.com Committed: http://code.google.com/p/skia/source/detail?r=13776

Patch Set 1 #

Patch Set 2 : Cleanup. #

Patch Set 3 : Rebased. #

Patch Set 4 : SkDumpCanvas fix. #

Total comments: 12

Patch Set 5 : Updated per comments. #

Patch Set 6 : Move SkCanvas virtuals impl out of the header file. #

Patch Set 7 : Renamed "on*" virtuals to "will*". #

Patch Set 8 : Rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+185 lines, -149 lines) Patch
M experimental/PdfViewer/SkNulCanvas.h View 1 2 3 4 5 6 2 chunks +6 lines, -7 lines 0 comments Download
M include/core/SkCanvas.h View 1 2 3 4 5 6 7 5 chunks +16 lines, -5 lines 0 comments Download
M include/utils/SkDeferredCanvas.h View 1 2 3 4 5 6 7 2 chunks +4 lines, -4 lines 0 comments Download
M include/utils/SkDumpCanvas.h View 1 2 3 4 5 6 2 chunks +4 lines, -5 lines 0 comments Download
M include/utils/SkLuaCanvas.h View 1 2 3 4 5 6 2 chunks +4 lines, -5 lines 0 comments Download
M include/utils/SkNWayCanvas.h View 1 2 3 4 5 6 2 chunks +4 lines, -4 lines 0 comments Download
M include/utils/SkProxyCanvas.h View 1 2 3 4 5 6 2 chunks +4 lines, -5 lines 0 comments Download
M src/core/SkBBoxHierarchyRecord.h View 1 2 3 4 5 6 2 chunks +4 lines, -5 lines 0 comments Download
M src/core/SkBBoxHierarchyRecord.cpp View 1 2 3 4 5 6 1 chunk +8 lines, -7 lines 0 comments Download
M src/core/SkCanvas.cpp View 1 2 3 4 5 6 7 6 chunks +29 lines, -5 lines 0 comments Download
M src/core/SkPictureRecord.h View 1 2 3 4 5 6 2 chunks +5 lines, -3 lines 0 comments Download
M src/core/SkPictureRecord.cpp View 1 2 3 4 5 6 6 chunks +11 lines, -13 lines 0 comments Download
M src/pipe/SkGPipeWrite.cpp View 1 2 3 4 5 6 4 chunks +17 lines, -14 lines 0 comments Download
M src/utils/SkDeferredCanvas.cpp View 1 2 3 4 5 6 7 1 chunk +9 lines, -12 lines 0 comments Download
M src/utils/SkDumpCanvas.cpp View 1 2 3 4 5 6 2 chunks +7 lines, -7 lines 0 comments Download
M src/utils/SkLuaCanvas.cpp View 1 2 3 4 5 6 2 chunks +10 lines, -7 lines 0 comments Download
M src/utils/SkNWayCanvas.cpp View 1 2 3 4 5 6 1 chunk +11 lines, -7 lines 0 comments Download
M src/utils/SkNoSaveLayerCanvas.h View 1 2 3 4 5 6 1 chunk +5 lines, -13 lines 0 comments Download
M src/utils/SkProxyCanvas.cpp View 1 2 3 4 5 6 1 chunk +11 lines, -6 lines 0 comments Download
M src/utils/debugger/SkDebugCanvas.h View 1 2 3 4 5 6 2 chunks +4 lines, -6 lines 0 comments Download
M src/utils/debugger/SkDebugCanvas.cpp View 1 2 3 4 5 6 2 chunks +12 lines, -9 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
f(malita)
6 years, 9 months ago (2014-03-11 15:15:14 UTC) #1
f(malita)
Trying without guards.
6 years, 9 months ago (2014-03-11 15:16:31 UTC) #2
reed1
https://codereview.chromium.org/194713008/diff/60001/include/core/SkCanvas.h File include/core/SkCanvas.h (right): https://codereview.chromium.org/194713008/diff/60001/include/core/SkCanvas.h#newcode1185 include/core/SkCanvas.h:1185: virtual void onSave(SaveFlags) { } nit: lets always put ...
6 years, 9 months ago (2014-03-11 15:49:39 UTC) #3
robertphillips
lgtm https://codereview.chromium.org/194713008/diff/60001/experimental/PdfViewer/SkNulCanvas.h File experimental/PdfViewer/SkNulCanvas.h (right): https://codereview.chromium.org/194713008/diff/60001/experimental/PdfViewer/SkNulCanvas.h#newcode101 experimental/PdfViewer/SkNulCanvas.h:101: Do we even need this onSave here? https://codereview.chromium.org/194713008/diff/60001/experimental/PdfViewer/SkNulCanvas.h#newcode107 ...
6 years, 9 months ago (2014-03-11 15:49:43 UTC) #4
f(malita)
https://codereview.chromium.org/194713008/diff/60001/experimental/PdfViewer/SkNulCanvas.h File experimental/PdfViewer/SkNulCanvas.h (right): https://codereview.chromium.org/194713008/diff/60001/experimental/PdfViewer/SkNulCanvas.h#newcode101 experimental/PdfViewer/SkNulCanvas.h:101: On 2014/03/11 15:49:44, robertphillips wrote: > Do we even ...
6 years, 9 months ago (2014-03-11 16:38:07 UTC) #5
reed1
https://codereview.chromium.org/194713008/diff/60001/include/core/SkCanvas.h File include/core/SkCanvas.h (right): https://codereview.chromium.org/194713008/diff/60001/include/core/SkCanvas.h#newcode1185 include/core/SkCanvas.h:1185: virtual void onSave(SaveFlags) { } On 2014/03/11 16:38:08, Florin ...
6 years, 9 months ago (2014-03-11 16:53:37 UTC) #6
f(malita)
On 2014/03/11 16:53:37, reed1 wrote: > https://codereview.chromium.org/194713008/diff/60001/include/core/SkCanvas.h#newcode1288 > include/core/SkCanvas.h:1288: SaveFlags, bool justForImageFilter, bool > skipLayer); ...
6 years, 9 months ago (2014-03-11 17:12:08 UTC) #7
f(malita)
Committed patchset #6 manually as r13747.
6 years, 9 months ago (2014-03-11 21:04:55 UTC) #8
f(malita)
A revert of this CL has been created in https://codereview.chromium.org/195193005/ by fmalita@chromium.org. The reason for ...
6 years, 9 months ago (2014-03-11 21:39:15 UTC) #9
hal.canary
A revert of this CL has been created in https://codereview.chromium.org/195843002/ by halcanary@google.com. The reason for ...
6 years, 9 months ago (2014-03-11 21:45:06 UTC) #10
f(malita)
Re-opened: updated virtual names + enum willSaveLayer() ret value. PTAL.
6 years, 9 months ago (2014-03-12 19:12:17 UTC) #11
reed1
lgtm
6 years, 9 months ago (2014-03-12 19:13:30 UTC) #12
f(malita)
The CQ bit was checked by fmalita@chromium.org
6 years, 9 months ago (2014-03-12 20:13:24 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/fmalita@chromium.org/194713008/140001
6 years, 9 months ago (2014-03-12 20:13:26 UTC) #14
commit-bot: I haz the power
Change committed as 13776
6 years, 9 months ago (2014-03-12 20:21:56 UTC) #15
tomhudson
There's no BUG=; have we recorded the motivation anywhere?
6 years, 9 months ago (2014-03-13 11:37:43 UTC) #16
f(malita)
6 years, 9 months ago (2014-03-13 18:52:08 UTC) #17
Message was sent while issue was closed.
On 2014/03/13 11:37:43, tomhudson wrote:
> There's no BUG=; have we recorded the motivation anywhere?

I just created https://code.google.com/p/skia/issues/detail?id=2297

Powered by Google App Engine
This is Rietveld 408576698