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

Issue 1254383006: SkImage_Raster's pixels are always immutable. (Closed)

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

Description

SkImage_Raster's pixels are always immutable. To make this work, we tag their pixelrefs as temporarily immutable, allowing ourselves to restore the pixels to mutability only when the image drops away. This should allow us to wobble back and forth between writing to the Surface and reading from the Image without a COW, with the Surface seeing mutable pixels and the Image seeing immutable pixels. The big idea is, Image doesn't need forever-immutable pixels, it just needs pixels that are immutable as long as it's alive. BUG=skia: patch from issue 804523002 at patchset 40001 (http://crrev.com/804523002#ps40001) Committed: https://skia.googlesource.com/skia/+/26e0e587f76f2a9338652c100f835c2377c908d3

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 #

Patch Set 4 : #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+80 lines, -24 lines) Patch
M include/core/SkPixelRef.h View 3 chunks +12 lines, -3 lines 0 comments Download
M src/core/SkPixelRef.cpp View 4 chunks +14 lines, -4 lines 1 comment Download
M src/image/SkImage.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/image/SkImagePriv.h View 1 2 1 chunk +6 lines, -2 lines 0 comments Download
M src/image/SkImage_Raster.cpp View 1 2 5 chunks +10 lines, -6 lines 0 comments Download
M src/image/SkSurface.cpp View 2 chunks +9 lines, -1 line 0 comments Download
M src/image/SkSurface_Base.h View 1 chunk +8 lines, -0 lines 0 comments Download
M src/image/SkSurface_Raster.cpp View 1 2 3 chunks +18 lines, -3 lines 0 comments Download
M tests/DeferredCanvasTest.cpp View 1 2 1 chunk +1 line, -2 lines 0 comments Download
M tests/SkImageTest.cpp View 1 2 1 chunk +1 line, -2 lines 0 comments Download

Messages

Total messages: 15 (7 generated)
reed1
5 years, 4 months ago (2015-07-29 17:34:02 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1254383006/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1254383006/20001
5 years, 4 months ago (2015-07-29 17:34:26 UTC) #4
commit-bot: I haz the power
Note for Reviewers: The CQ is waiting for an approval. If you believe that the ...
5 years, 4 months ago (2015-07-29 17:34:27 UTC) #5
mtklein
lgtm % the segfault
5 years, 4 months ago (2015-07-29 17:58:23 UTC) #7
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1254383006/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1254383006/40001
5 years, 4 months ago (2015-07-29 18:26:52 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1254383006/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1254383006/60001
5 years, 4 months ago (2015-07-29 18:37:18 UTC) #12
commit-bot: I haz the power
Committed patchset #4 (id:60001) as https://skia.googlesource.com/skia/+/26e0e587f76f2a9338652c100f835c2377c908d3
5 years, 4 months ago (2015-07-29 18:44:55 UTC) #13
robertphillips
5 years, 4 months ago (2015-07-29 19:26:29 UTC) #15
Message was sent while issue was closed.
lgtm

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

https://codereview.chromium.org/1254383006/diff/60001/src/core/SkPixelRef.cpp...
src/core/SkPixelRef.cpp:367: fMutability = kMutable;
Hmmm .. can we get rid of the 'notifyPixelsChanged' ?

Powered by Google App Engine
This is Rietveld 408576698