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

Issue 1229933003: add runtime option to provide data->imagegenerator factory (Closed)

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

Description

add runtime option to provide data->imagegenerator factory BUG=skia: Committed: https://skia.googlesource.com/skia/+/1c84634454aa78fb26f23875b86a243aa4596c59

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : add test #

Patch Set 4 : no need to guard older api name #

Patch Set 5 : rebase #

Total comments: 7
Unified diffs Side-by-side diffs Delta from patch set Stats (+82 lines, -13 lines) Patch
M gm/factory.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M gm/mipmap.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M include/core/SkGraphics.h View 1 2 chunks +13 lines, -0 lines 3 comments Download
M include/core/SkImageGenerator.h View 1 2 3 4 2 chunks +3 lines, -1 line 2 comments Download
M src/core/SkImageGenerator.cpp View 1 2 3 4 1 chunk +26 lines, -0 lines 0 comments Download
M src/image/SkImage.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M src/lazy/SkDiscardablePixelRef.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M src/ports/SkImageGenerator_none.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M src/ports/SkImageGenerator_skia.cpp View 1 2 3 4 1 chunk +1 line, -5 lines 0 comments Download
M tests/CachedDecodingPixelRefTest.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M tests/ImageGeneratorTest.cpp View 1 2 2 chunks +32 lines, -0 lines 2 comments Download
M tools/LazyDecodeBitmap.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 20 (8 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1229933003/40001
5 years, 5 months ago (2015-07-09 17:41:53 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1229933003/60001
5 years, 5 months ago (2015-07-09 17:49:51 UTC) #5
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot on client.skia (JOB_FAILED, http://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot/builds/1874) Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Shared-Trybot on ...
5 years, 5 months ago (2015-07-09 17:50:40 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/1229933003/80001
5 years, 5 months ago (2015-07-09 18:10:14 UTC) #9
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 5 months ago (2015-07-09 18:24:16 UTC) #11
reed1
ptal This was inspired by the desire to have skia get access to blink's imagegenerator, ...
5 years, 5 months ago (2015-07-09 18:27:02 UTC) #13
mtklein
lgtm
5 years, 5 months ago (2015-07-09 18:46:16 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1229933003/80001
5 years, 5 months ago (2015-07-09 18:46:37 UTC) #16
commit-bot: I haz the power
Committed patchset #5 (id:80001) as https://skia.googlesource.com/skia/+/1c84634454aa78fb26f23875b86a243aa4596c59
5 years, 5 months ago (2015-07-09 18:47:40 UTC) #17
scroggo
https://codereview.chromium.org/1229933003/diff/80001/include/core/SkGraphics.h File include/core/SkGraphics.h (right): https://codereview.chromium.org/1229933003/diff/80001/include/core/SkGraphics.h#newcode154 include/core/SkGraphics.h:154: static ImageGeneratorFromEncodedFactory GetImageGeneratorFromEncodedFactory(); I do not understand the need ...
5 years, 5 months ago (2015-07-09 19:01:15 UTC) #18
mtklein
https://codereview.chromium.org/1229933003/diff/80001/include/core/SkGraphics.h File include/core/SkGraphics.h (right): https://codereview.chromium.org/1229933003/diff/80001/include/core/SkGraphics.h#newcode154 include/core/SkGraphics.h:154: static ImageGeneratorFromEncodedFactory GetImageGeneratorFromEncodedFactory(); On 2015/07/09 19:01:15, scroggo wrote: > ...
5 years, 5 months ago (2015-07-09 19:04:57 UTC) #19
reed1
5 years, 5 months ago (2015-07-09 19:05:46 UTC) #20
Message was sent while issue was closed.
https://codereview.chromium.org/1229933003/diff/80001/include/core/SkGraphics.h
File include/core/SkGraphics.h (right):

https://codereview.chromium.org/1229933003/diff/80001/include/core/SkGraphics...
include/core/SkGraphics.h:154: static ImageGeneratorFromEncodedFactory
GetImageGeneratorFromEncodedFactory();
On 2015/07/09 19:01:15, scroggo wrote:
> I do not understand the need for this accessor. Why not just call
> NewFromEncoded?
> 
> (Ah, it appears the the test uses it to set it back. Is this useful outside of
> tests? Even inside the tests, it seems less than ideal, as other tests might
> change or use it, as you acknowledge when you mention it's racy.)

Not sure what to do here. Having a global is just a pain no matter how you spin
it.

https://codereview.chromium.org/1229933003/diff/80001/include/core/SkImageGen...
File include/core/SkImageGenerator.h (right):

https://codereview.chromium.org/1229933003/diff/80001/include/core/SkImageGen...
include/core/SkImageGenerator.h:224: static SkImageGenerator*
NewFromEncodedImpl(SkData*);
On 2015/07/09 19:01:15, scroggo wrote:
> Maybe add a comment that the implementation does not need to check for NULL?

Will do

https://codereview.chromium.org/1229933003/diff/80001/tests/ImageGeneratorTes...
File tests/ImageGeneratorTest.cpp (right):

https://codereview.chromium.org/1229933003/diff/80001/tests/ImageGeneratorTes...
tests/ImageGeneratorTest.cpp:19: static void
test_imagegenerator_factory(skiatest::Reporter* reporter) {
On 2015/07/09 19:01:15, scroggo wrote:
> Why not make this its own test, with DEF_TEST?

Just style difference. When I see the output from running the tool, I'm ok with
fewer lines, so just "ImageGenerator" instead of N lines for N different ideas,
seems ok.

Powered by Google App Engine
This is Rietveld 408576698