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

Issue 1236023004: have canvas send discard instead of retain if the draw would overwrite everything (Closed)

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

Description

have canvas send discard instead of retain if the draw would overwrite everything Motivation: - perf win for clients that overwrite the surface after a snapshot. - may allow us to eliminate SkDeferredCanvas, as this was its primary advantage. BUG=skia: Committed: https://skia.googlesource.com/skia/+/c83a29759a5c2966da5ab973e4fd90763e4c962b

Patch Set 1 #

Patch Set 2 : wip #

Total comments: 3

Patch Set 3 : use SkPaintPriv #

Patch Set 4 : #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+136 lines, -25 lines) Patch
M include/core/SkCanvas.h View 1 2 3 chunks +22 lines, -2 lines 1 comment Download
M src/core/SkCanvas.cpp View 1 2 9 chunks +90 lines, -7 lines 2 comments Download
M src/core/SkPaintPriv.h View 1 2 1 chunk +11 lines, -1 line 0 comments Download
M src/core/SkPaintPriv.cpp View 1 2 2 chunks +4 lines, -15 lines 0 comments Download
M src/image/SkSurface.cpp View 1 1 chunk +4 lines, -0 lines 0 comments Download
M src/image/SkSurface_Base.h View 1 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 19 (6 generated)
reed1
5 years, 5 months ago (2015-07-15 15:19:57 UTC) #2
reed1
incomplete, but wanted reviewers to see the architecture
5 years, 5 months ago (2015-07-15 15:20:14 UTC) #3
Justin Novosad
https://codereview.chromium.org/1236023004/diff/20001/src/core/SkCanvas.cpp File src/core/SkCanvas.cpp (right): https://codereview.chromium.org/1236023004/diff/20001/src/core/SkCanvas.cpp#newcode48 src/core/SkCanvas.cpp:48: bool SkCanvas::willOverwriteAllPixels(const SkRect* rect, const SkPaint* paint, "will" is ...
5 years, 5 months ago (2015-07-15 18:00:46 UTC) #5
reed1
Justin, do you think this sort of change will allow us to remove SkDeferredCanvas (and ...
5 years, 5 months ago (2015-07-15 21:41:02 UTC) #6
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1236023004/60001
5 years, 5 months ago (2015-07-15 21:56:25 UTC) #8
reed1
ptal
5 years, 5 months ago (2015-07-15 21:59:05 UTC) #9
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 5 months ago (2015-07-15 22:03:59 UTC) #11
reed1
ptal
5 years, 5 months ago (2015-07-16 13:43:26 UTC) #12
reed1
5 years, 5 months ago (2015-07-16 14:11:15 UTC) #14
Justin Novosad
On 2015/07/16 14:11:15, reed1 wrote: lgtm
5 years, 5 months ago (2015-07-16 14:34:32 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1236023004/60001
5 years, 5 months ago (2015-07-16 14:39:56 UTC) #17
commit-bot: I haz the power
Committed patchset #4 (id:60001) as https://skia.googlesource.com/skia/+/c83a29759a5c2966da5ab973e4fd90763e4c962b
5 years, 5 months ago (2015-07-16 14:40:49 UTC) #18
robertphillips
5 years, 5 months ago (2015-07-20 15:15:30 UTC) #19
Message was sent while issue was closed.
posthumous typos

https://codereview.chromium.org/1236023004/diff/60001/include/core/SkCanvas.h
File include/core/SkCanvas.h (right):

https://codereview.chromium.org/1236023004/diff/60001/include/core/SkCanvas.h...
include/core/SkCanvas.h:1366: // can perform copy-on-write or invalidate any
cached images
willOverwriteEntireSurface (no extra 's') ?

https://codereview.chromium.org/1236023004/diff/60001/src/core/SkCanvas.cpp
File src/core/SkCanvas.cpp (right):

https://codereview.chromium.org/1236023004/diff/60001/src/core/SkCanvas.cpp#n...
src/core/SkCanvas.cpp:137: 
same typo here

https://codereview.chromium.org/1236023004/diff/60001/src/core/SkCanvas.cpp#n...
src/core/SkCanvas.cpp:149: SkSurface::ContentChangeMode mode =
SkSurface::kRetain_ContentChangeMode;
complete -> completely

Powered by Google App Engine
This is Rietveld 408576698