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

Issue 74793011: Add SkImageGenerator Interface (Closed)

Created:
7 years, 1 month ago by hal.canary
Modified:
7 years, 1 month ago
CC:
skia-review_googlegroups.com
Visibility:
Public.

Description

Add SkImageGenerator Interface - Add SkDiscardablePixelRef class that uses SkDiscardableMemory and a SkImageGenerator. - Add SkDecodingImageGenerator class as an example of a SkImageGenerator. - Add DecodingImageGenerator unit test. - Add SkBasicDiscardableMemory implmentation for unit tests only. R=reed@google.com, scroggo@google.com Committed: https://code.google.com/p/skia/source/detail?r=12341

Patch Set 1 #

Total comments: 5

Patch Set 2 : SkDiscardablePixelRef #

Total comments: 2

Patch Set 3 : unit tests #

Patch Set 4 : protected destructor #

Total comments: 34

Patch Set 5 : changes from scroggo #

Total comments: 2

Patch Set 6 : SkImageGenerator.h comments #

Patch Set 7 : whitespace #

Unified diffs Side-by-side diffs Delta from patch set Stats (+381 lines, -1 line) Patch
M gyp/core.gypi View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M gyp/images.gyp View 1 2 2 chunks +2 lines, -0 lines 0 comments Download
M gyp/tests.gyp View 1 2 1 chunk +1 line, -0 lines 0 comments Download
A include/core/SkImageGenerator.h View 1 2 3 4 5 1 chunk +65 lines, -0 lines 0 comments Download
A src/images/SkDecodingImageGenerator.h View 1 2 3 4 1 chunk +45 lines, -0 lines 0 comments Download
A src/images/SkDecodingImageGenerator.cpp View 1 1 chunk +52 lines, -0 lines 0 comments Download
A src/lazy/SkDiscardablePixelRef.h View 1 2 3 4 5 6 1 chunk +64 lines, -0 lines 0 comments Download
A src/lazy/SkDiscardablePixelRef.cpp View 1 2 3 4 5 6 1 chunk +68 lines, -0 lines 0 comments Download
M src/ports/SkDiscardableMemory_none.cpp View 1 2 3 4 1 chunk +50 lines, -1 line 0 comments Download
M tests/CachedDecodingPixelRefTest.cpp View 1 2 3 4 2 chunks +33 lines, -0 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
hal.canary
7 years, 1 month ago (2013-11-18 21:42:19 UTC) #1
reed1
likely SkImageGenerate.h will need to be public. https://codereview.chromium.org/74793011/diff/1/src/images/SkImageGenerator.h File src/images/SkImageGenerator.h (right): https://codereview.chromium.org/74793011/diff/1/src/images/SkImageGenerator.h#newcode15 src/images/SkImageGenerator.h:15: #include "SkBitmap.h" ...
7 years, 1 month ago (2013-11-18 21:56:10 UTC) #2
reed1
7 years, 1 month ago (2013-11-18 21:56:38 UTC) #3
Alpha Left Google
https://codereview.chromium.org/74793011/diff/1/src/images/SkDecodingImageGenerator.h File src/images/SkDecodingImageGenerator.h (right): https://codereview.chromium.org/74793011/diff/1/src/images/SkDecodingImageGenerator.h#newcode54 src/images/SkDecodingImageGenerator.h:54: virtual bool getPixels(const SkImageInfo& info, There should be a ...
7 years, 1 month ago (2013-11-19 02:00:48 UTC) #4
hal.canary
https://codereview.chromium.org/74793011/diff/1/src/images/SkDecodingImageGenerator.h File src/images/SkDecodingImageGenerator.h (right): https://codereview.chromium.org/74793011/diff/1/src/images/SkDecodingImageGenerator.h#newcode54 src/images/SkDecodingImageGenerator.h:54: virtual bool getPixels(const SkImageInfo& info, On 2013/11/19 02:00:48, Alpha ...
7 years, 1 month ago (2013-11-19 02:06:28 UTC) #5
Alpha Left Google
On 2013/11/19 02:06:28, Hal Canary wrote: > https://codereview.chromium.org/74793011/diff/1/src/images/SkDecodingImageGenerator.h > File src/images/SkDecodingImageGenerator.h (right): > > https://codereview.chromium.org/74793011/diff/1/src/images/SkDecodingImageGenerator.h#newcode54 ...
7 years, 1 month ago (2013-11-19 02:12:22 UTC) #6
hal.canary
On 2013/11/19 02:12:22, Alpha wrote: > I see. SkDecodingImageGenerator.h is for using Skia's internal decoders. ...
7 years, 1 month ago (2013-11-19 02:45:37 UTC) #7
reed1
https://codereview.chromium.org/74793011/diff/110001/src/lazy/SkDiscardablePixelRef.h File src/lazy/SkDiscardablePixelRef.h (right): https://codereview.chromium.org/74793011/diff/110001/src/lazy/SkDiscardablePixelRef.h#newcode29 src/lazy/SkDiscardablePixelRef.h:29: ~SkDiscardablePixelRef(); this can be protected (or private I think)
7 years, 1 month ago (2013-11-19 15:51:53 UTC) #8
hal.canary
On 2013/11/19 02:12:22, Alpha wrote: > Can you show me how should a SkImageGenerator.h be ...
7 years, 1 month ago (2013-11-19 18:23:14 UTC) #9
reed1
I think the plan would be that, once you have a blink_subclass of SkImageGenerator, you ...
7 years, 1 month ago (2013-11-19 18:36:48 UTC) #10
hal.canary
Okay, please take a look. https://codereview.chromium.org/74793011/diff/110001/src/lazy/SkDiscardablePixelRef.h File src/lazy/SkDiscardablePixelRef.h (right): https://codereview.chromium.org/74793011/diff/110001/src/lazy/SkDiscardablePixelRef.h#newcode29 src/lazy/SkDiscardablePixelRef.h:29: ~SkDiscardablePixelRef(); On 2013/11/19 15:51:54, ...
7 years, 1 month ago (2013-11-19 21:38:19 UTC) #11
Alpha Left Google
On 2013/11/19 21:38:19, Hal Canary wrote: > Okay, please take a look. > > https://codereview.chromium.org/74793011/diff/110001/src/lazy/SkDiscardablePixelRef.h ...
7 years, 1 month ago (2013-11-19 21:57:27 UTC) #12
reed1
some dox comments, but lgtm enough to land for me. https://codereview.chromium.org/74793011/diff/210001/src/core/SkBasicDiscardableMemory.h File src/core/SkBasicDiscardableMemory.h (right): https://codereview.chromium.org/74793011/diff/210001/src/core/SkBasicDiscardableMemory.h#newcode16 ...
7 years, 1 month ago (2013-11-19 22:01:17 UTC) #13
scroggo
https://codereview.chromium.org/74793011/diff/210001/gyp/ports.gyp File gyp/ports.gyp (right): https://codereview.chromium.org/74793011/diff/210001/gyp/ports.gyp#newcode40 gyp/ports.gyp:40: '../src/core/SkBasicDiscardableMemory.cpp', If this is only used for tests, why ...
7 years, 1 month ago (2013-11-19 22:19:26 UTC) #14
hal.canary
https://codereview.chromium.org/74793011/diff/210001/gyp/ports.gyp File gyp/ports.gyp (right): https://codereview.chromium.org/74793011/diff/210001/gyp/ports.gyp#newcode40 gyp/ports.gyp:40: '../src/core/SkBasicDiscardableMemory.cpp', On 2013/11/19 22:19:27, scroggo wrote: > If this ...
7 years, 1 month ago (2013-11-20 00:07:09 UTC) #15
scroggo
Aside from a couple of comments, this lgtm https://codereview.chromium.org/74793011/diff/210001/src/ports/SkDiscardableMemory_none.cpp File src/ports/SkDiscardableMemory_none.cpp (right): https://codereview.chromium.org/74793011/diff/210001/src/ports/SkDiscardableMemory_none.cpp#newcode11 src/ports/SkDiscardableMemory_none.cpp:11: return ...
7 years, 1 month ago (2013-11-20 14:21:53 UTC) #16
hal.canary
7 years, 1 month ago (2013-11-21 15:32:17 UTC) #17
Message was sent while issue was closed.
Committed patchset #7 manually as r12341 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698