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

Issue 1686163002: Allow client to force an SkImage snapshot to be unique (and uniquely own its backing store). (Closed)

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

Description

Allow client to force an SkImage snapshot to be unique (and uniquely own its backing store). GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1686163002 Committed: https://skia.googlesource.com/skia/+/f47b9a3b88a037a481eb70f01a4cf9f5be34dc28

Patch Set 1 #

Patch Set 2 : more #

Patch Set 3 : cleanup, more asserts #

Total comments: 1

Patch Set 4 : change API to require both enums #

Patch Set 5 : add bug number ot comment #

Patch Set 6 : Fix enum to bool warning #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+195 lines, -20 lines) Patch
M include/core/SkSurface.h View 1 2 3 4 1 chunk +12 lines, -0 lines 0 comments Download
M src/image/SkSurface.cpp View 1 2 3 1 chunk +7 lines, -3 lines 0 comments Download
M src/image/SkSurface_Base.h View 1 2 4 chunks +19 lines, -7 lines 0 comments Download
M src/image/SkSurface_Gpu.h View 1 chunk +1 line, -1 line 0 comments Download
M src/image/SkSurface_Gpu.cpp View 1 2 3 4 5 2 chunks +20 lines, -3 lines 2 comments Download
M src/image/SkSurface_Raster.cpp View 1 2 3 3 chunks +9 lines, -6 lines 0 comments Download
M tests/SurfaceTest.cpp View 1 2 1 chunk +127 lines, -0 lines 0 comments Download

Messages

Total messages: 22 (9 generated)
bsalomon
4 years, 10 months ago (2016-02-12 21:57:22 UTC) #3
bsalomon
Follow up that fixes the added TODO here: https://codereview.chromium.org/1694943002
4 years, 10 months ago (2016-02-12 22:17:16 UTC) #4
reed1
https://codereview.chromium.org/1686163002/diff/40001/include/core/SkSurface.h File include/core/SkSurface.h (right): https://codereview.chromium.org/1686163002/diff/40001/include/core/SkSurface.h#newcode248 include/core/SkSurface.h:248: SkImage* newImageSnapshot(Budgeted = kYes_Budgeted, ForceUnique = kNo_ForceUnique); Crud. I ...
4 years, 10 months ago (2016-02-15 21:32:14 UTC) #5
bsalomon
On 2016/02/15 21:32:14, reed1 wrote: > https://codereview.chromium.org/1686163002/diff/40001/include/core/SkSurface.h > File include/core/SkSurface.h (right): > > https://codereview.chromium.org/1686163002/diff/40001/include/core/SkSurface.h#newcode248 > ...
4 years, 10 months ago (2016-02-16 14:25:22 UTC) #6
bsalomon
PTAL, new version adds a overload that requires both enum values be specified.
4 years, 10 months ago (2016-02-16 15:26:37 UTC) #7
reed1
lgtm
4 years, 10 months ago (2016-02-16 16:01:51 UTC) #8
reed1
Actually, I think we should consider augmenting the dox to reference the exact bug we're ...
4 years, 10 months ago (2016-02-16 16:03:16 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1686163002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1686163002/80001
4 years, 10 months ago (2016-02-22 16:27:44 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: Build-Win-MSVC-x86_64-Debug-Trybot on client.skia.compile (JOB_FAILED, http://build.chromium.org/p/client.skia.compile/builders/Build-Win-MSVC-x86_64-Debug-Trybot/builds/6472)
4 years, 10 months ago (2016-02-22 16:30:23 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1686163002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1686163002/100001
4 years, 10 months ago (2016-02-22 18:35:07 UTC) #17
commit-bot: I haz the power
Committed patchset #6 (id:100001) as https://skia.googlesource.com/skia/+/f47b9a3b88a037a481eb70f01a4cf9f5be34dc28
4 years, 10 months ago (2016-02-22 19:03:01 UTC) #19
brucedawson
https://codereview.chromium.org/1686163002/diff/100001/src/image/SkSurface_Gpu.cpp File src/image/SkSurface_Gpu.cpp (right): https://codereview.chromium.org/1686163002/diff/100001/src/image/SkSurface_Gpu.cpp#newcode88 src/image/SkSurface_Gpu.cpp:88: desc.fFlags = desc.fFlags & !kRenderTarget_GrSurfaceFlag; This line looks odd ...
4 years, 10 months ago (2016-02-25 01:27:26 UTC) #21
bsalomon
4 years, 10 months ago (2016-02-25 01:37:41 UTC) #22
Message was sent while issue was closed.
https://codereview.chromium.org/1686163002/diff/100001/src/image/SkSurface_Gp...
File src/image/SkSurface_Gpu.cpp (right):

https://codereview.chromium.org/1686163002/diff/100001/src/image/SkSurface_Gp...
src/image/SkSurface_Gpu.cpp:88: desc.fFlags = desc.fFlags &
!kRenderTarget_GrSurfaceFlag;
On 2016/02/25 01:27:26, brucedawson wrote:
> This line looks odd (/analyze flagged it as odd). Why is a logical not of an
> enum value being done? Should this be ~ instead of !?
> 
> This works out to "& 0;"
> 
> The actual warning was:
>     third_party\skia\include\gpu\grtypes.h(410) : warning C6323: Use of
> arithmetic operator on Boolean type(s).
> with a pointer back to this line of code.

d'oh. Yes, should be ~, will fix.

Powered by Google App Engine
This is Rietveld 408576698