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

Issue 1613053006: SkValue: to/from SkImage (Closed)

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

Description

Patch Set 1 #

Total comments: 13

Patch Set 2 : comments from mtklein@ #

Patch Set 3 : 2016-01-21 (Thursday) 17:16:30 EST #

Patch Set 4 : 2016-01-21 (Thursday) 17:20:39 EST #

Unified diffs Side-by-side diffs Delta from patch set Stats (+59 lines, -6 lines) Patch
M src/core/SkValue.h View 1 3 chunks +7 lines, -6 lines 0 comments Download
M src/core/SkValueKeys.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M src/effects/SkToFromValue.cpp View 1 3 chunks +31 lines, -0 lines 0 comments Download
M tests/ValueTest.cpp View 2 chunks +20 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (5 generated)
hal.canary
trying to keep the next few CLs small.
4 years, 11 months ago (2016-01-21 21:02:30 UTC) #3
mtklein
https://codereview.chromium.org/1613053006/diff/1/src/effects/SkToFromValue.cpp File src/effects/SkToFromValue.cpp (right): https://codereview.chromium.org/1613053006/diff/1/src/effects/SkToFromValue.cpp#newcode47 src/effects/SkToFromValue.cpp:47: REQUIRE( val.type() == SkValue::Bytes Guess we'd better put isData() ...
4 years, 11 months ago (2016-01-21 21:21:30 UTC) #4
hal.canary
https://codereview.chromium.org/1613053006/diff/1/src/effects/SkToFromValue.cpp File src/effects/SkToFromValue.cpp (right): https://codereview.chromium.org/1613053006/diff/1/src/effects/SkToFromValue.cpp#newcode47 src/effects/SkToFromValue.cpp:47: REQUIRE( val.type() == SkValue::Bytes On 2016/01/21 at 21:21:30, mtklein ...
4 years, 11 months ago (2016-01-21 22:03:23 UTC) #5
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1613053006/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1613053006/60001
4 years, 11 months ago (2016-01-21 22:27:16 UTC) #7
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: Test-Ubuntu-GCC-ShuttleA-GPU-GTX660-x86_64-Release-Trybot on client.skia (JOB_TIMED_OUT, no build URL)
4 years, 11 months ago (2016-01-22 00:27:34 UTC) #9
mtklein
4 years, 11 months ago (2016-01-22 14:09:18 UTC) #11
https://codereview.chromium.org/1613053006/diff/1/src/effects/SkToFromValue.cpp
File src/effects/SkToFromValue.cpp (right):

https://codereview.chromium.org/1613053006/diff/1/src/effects/SkToFromValue.c...
src/effects/SkToFromValue.cpp:144: SkAutoTUnref<SkData>
encoded(image->encode());
you know, this is probably the most controversial line of the whole CL.
it's not clear to me that we should be encoding these images.
that means,
   1) they must be encoded and decoded if you're going to use SkValues, which
may not be necessary
   2) the client gets no choice in how that encoding or decoding happens

Let's leave images for later to think more about.

https://codereview.chromium.org/1613053006/diff/1/src/effects/SkToFromValue.c...
src/effects/SkToFromValue.cpp:150: val.set(kUniqueID,
SkValue::FromU32(image->uniqueID()));
On 2016/01/21 22:03:23, Hal Canary wrote:
> On 2016/01/21 at 21:21:30, mtklein wrote:
> > This seems like a bad idea, especially if we ignore it in SkFromValue().
> > 
> > Those uniqueIDs are unique to the current process, but have nothing to do
with
> the image itself.
> 
> a serializer can use them to de-dup images.  Or anything else with a uniqueID.

this unique ID is not part of the value of the image.  it does not belong in its
value.

https://codereview.chromium.org/1613053006/diff/1/src/effects/SkToFromValue.c...
src/effects/SkToFromValue.cpp:154: template<> bool SkFromValue<
SkAutoTUnref<SkImage> >(
On 2016/01/21 22:03:23, Hal Canary wrote:
> On 2016/01/21 at 21:21:30, mtklein wrote:
> > template<> bool SkFromValue<SkAutoTUnref<SkImage>>(const SkValue& val,
> SkAutoTUnref<SkImage>* dst) {
> > 
> > is 100 columns.
> 
> yes but my *editor* doesn't know about how C++11 allows >> to sometimes not be
a
> shift operator.

are you seriously proposing that we write code strangely to coddle the
eccentricities of the editor you have chosen to use?

Powered by Google App Engine
This is Rietveld 408576698