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

Issue 1920423002: Prototype code that turns any/every flattenable into JSON (Closed)

Created:
4 years, 7 months ago by Brian Osman
Modified:
4 years, 7 months ago
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Prototype code that turns any/every flattenable into JSON This makes inspecting things in SkDebugger far more useful - any filter or other complex object on the paint is ultimately visible. You still have to do some guess work to figure out what the fields actually mean, but you can at least cross-reference with the code in flatten(). Screenshots: Before: https://screenshot.googleplex.com/a6JM5HBBe6G.png After : https://screenshot.googleplex.com/XQfr4YJ6mnH.png Changes to public API are just removals and changes to make some functions virtual. TBR=reed@google.com BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1920423002 Committed: https://skia.googlesource.com/skia/+/fad98562d8f9db63839a8d902a301b174320f27f

Patch Set 1 #

Patch Set 2 : Null check #

Patch Set 3 : Interfacification. Tweaks to SkPaint and ordering of name vs. fields #

Total comments: 2

Patch Set 4 : Fix compile errors #

Total comments: 16

Patch Set 5 : Rebase and review feedback #

Total comments: 1

Patch Set 6 : Whitespace fix #

Patch Set 7 : Share lots more code with SkDrawCommand #

Total comments: 28

Patch Set 8 : Move stateless shared API back to SkWriteBuffer #

Patch Set 9 : Rebase #

Patch Set 10 : Minor tweaks #

Total comments: 2

Patch Set 11 : Fix copyright dates in new files #

Unified diffs Side-by-side diffs Delta from patch set Stats (+445 lines, -174 lines) Patch
M gyp/debugger.gyp View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M gyp/dm.gypi View 1 chunk +1 line, -0 lines 0 comments Download
M gyp/gmslides.gypi View 1 chunk +2 lines, -0 lines 0 comments Download
M gyp/skiaserve.gyp View 1 chunk +2 lines, -0 lines 0 comments Download
M gyp/tests.gypi View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M include/core/SkBitmap.h View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M include/core/SkWriteBuffer.h View 1 2 3 4 5 6 7 8 2 chunks +71 lines, -33 lines 0 comments Download
M src/core/SkFlattenableSerialization.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/core/SkPaint.cpp View 1 2 3 4 6 chunks +12 lines, -12 lines 0 comments Download
M src/core/SkPictureData.cpp View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M src/core/SkWriteBuffer.cpp View 1 2 3 4 5 6 7 8 5 chunks +34 lines, -34 lines 0 comments Download
M tests/ColorFilterTest.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M tests/FlattenDrawableTest.cpp View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M tests/FlattenableCustomFactory.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M tests/ImageIsOpaqueTest.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M tests/PaintTest.cpp View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
M tests/SerializationTest.cpp View 1 2 4 chunks +4 lines, -4 lines 0 comments Download
M tools/debugger/SkDrawCommand.h View 1 2 3 4 5 6 7 8 9 1 chunk +14 lines, -0 lines 0 comments Download
M tools/debugger/SkDrawCommand.cpp View 1 2 3 4 5 6 46 chunks +86 lines, -80 lines 0 comments Download
A tools/debugger/SkJsonWriteBuffer.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +60 lines, -0 lines 0 comments Download
A tools/debugger/SkJsonWriteBuffer.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +144 lines, -0 lines 0 comments Download

Messages

Total messages: 49 (20 generated)
Brian Osman
Something I tinkered with last week, and wanted to get opinions on. (I showed this ...
4 years, 7 months ago (2016-04-27 01:01:08 UTC) #4
ethannicholas
lgtm
4 years, 7 months ago (2016-04-27 13:54:41 UTC) #6
mtklein
I like both approaches, and while I like the other better, I do agree this ...
4 years, 7 months ago (2016-04-27 13:54:54 UTC) #7
reed1
My guess is the virtuals are fine too. Do we have good nanobenches that time ...
4 years, 7 months ago (2016-04-27 13:59:57 UTC) #8
Brian Osman
On 2016/04/27 13:54:54, mtklein wrote: > I like both approaches, and while I like the ...
4 years, 7 months ago (2016-04-27 14:06:32 UTC) #9
mtklein
On 2016/04/27 at 14:06:32, brianosman wrote: > On 2016/04/27 13:54:54, mtklein wrote: > > I ...
4 years, 7 months ago (2016-04-27 14:15:57 UTC) #10
mtklein
On 2016/04/27 at 13:59:57, reed wrote: > My guess is the virtuals are fine too. ...
4 years, 7 months ago (2016-04-27 14:17:09 UTC) #11
Brian Osman
Converted to an interface, made a few changes to get the output more human-readable. Updated ...
4 years, 7 months ago (2016-04-28 14:22:33 UTC) #13
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1920423002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1920423002/40001
4 years, 7 months ago (2016-04-28 14:22:48 UTC) #15
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/8180) Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Shared-Trybot on ...
4 years, 7 months ago (2016-04-28 14:24:21 UTC) #17
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1920423002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1920423002/60001
4 years, 7 months ago (2016-04-28 14:49:42 UTC) #19
mtklein
https://codereview.chromium.org/1920423002/diff/60001/include/core/SkWriteBuffer.h File include/core/SkWriteBuffer.h (right): https://codereview.chromium.org/1920423002/diff/60001/include/core/SkWriteBuffer.h#newcode71 include/core/SkWriteBuffer.h:71: class SkBinaryWriteBuffer : public SkWriteBuffer { final? https://codereview.chromium.org/1920423002/diff/60001/include/core/SkWriteBuffer.h#newcode95 include/core/SkWriteBuffer.h:95: ...
4 years, 7 months ago (2016-04-29 17:55:43 UTC) #21
Brian Osman
Addressed most of the feedback. I think there's definitely still room to fine-tune the json ...
4 years, 7 months ago (2016-04-29 19:59:48 UTC) #22
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1920423002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1920423002/80001
4 years, 7 months ago (2016-04-29 20:00:08 UTC) #24
mtklein
https://codereview.chromium.org/1920423002/diff/80001/tools/debugger/SkJsonWriteBuffer.cpp File tools/debugger/SkJsonWriteBuffer.cpp (right): https://codereview.chromium.org/1920423002/diff/80001/tools/debugger/SkJsonWriteBuffer.cpp#newcode190 tools/debugger/SkJsonWriteBuffer.cpp:190: extern bool flatten(const SkImage& image, Json::Value* target, UrlDataManager& urlDataManager); ...
4 years, 7 months ago (2016-04-29 20:05:13 UTC) #25
reed1
https://codereview.chromium.org/1920423002/diff/120001/include/core/SkWriteBuffer.h File include/core/SkWriteBuffer.h (right): https://codereview.chromium.org/1920423002/diff/120001/include/core/SkWriteBuffer.h#newcode32 include/core/SkWriteBuffer.h:32: virtual bool isCrossProcess() const = 0; Can/should we consider ...
4 years, 7 months ago (2016-05-02 12:44:39 UTC) #26
mtklein
https://codereview.chromium.org/1920423002/diff/120001/include/core/SkWriteBuffer.h File include/core/SkWriteBuffer.h (right): https://codereview.chromium.org/1920423002/diff/120001/include/core/SkWriteBuffer.h#newcode26 include/core/SkWriteBuffer.h:26: We might try moving this whole file to include/private? ...
4 years, 7 months ago (2016-05-02 13:55:15 UTC) #27
reed1
https://codereview.chromium.org/1920423002/diff/120001/include/core/SkWriteBuffer.h File include/core/SkWriteBuffer.h (right): https://codereview.chromium.org/1920423002/diff/120001/include/core/SkWriteBuffer.h#newcode32 include/core/SkWriteBuffer.h:32: virtual bool isCrossProcess() const = 0; On 2016/05/02 13:55:15, ...
4 years, 7 months ago (2016-05-02 14:04:42 UTC) #28
Brian Osman
Klein hit on most of my responses before I could finish writing them. Just wanted ...
4 years, 7 months ago (2016-05-02 14:49:12 UTC) #29
mtklein
https://codereview.chromium.org/1920423002/diff/120001/include/core/SkWriteBuffer.h File include/core/SkWriteBuffer.h (right): https://codereview.chromium.org/1920423002/diff/120001/include/core/SkWriteBuffer.h#newcode35 include/core/SkWriteBuffer.h:35: virtual void writeDataAsByteArray(SkData* data) = 0; On 2016/05/02 at ...
4 years, 7 months ago (2016-05-02 15:04:43 UTC) #30
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1920423002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1920423002/180001
4 years, 7 months ago (2016-05-03 13:50:52 UTC) #32
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-03 14:09:16 UTC) #34
Brian Osman
I think this version is better. I actually moved several of the static functions from ...
4 years, 7 months ago (2016-05-03 14:16:07 UTC) #36
mtklein
This way still lgtm. https://codereview.chromium.org/1920423002/diff/180001/include/core/SkWriteBuffer.h File include/core/SkWriteBuffer.h (right): https://codereview.chromium.org/1920423002/diff/180001/include/core/SkWriteBuffer.h#newcode31 include/core/SkWriteBuffer.h:31: virtual bool isCrossProcess() const = ...
4 years, 7 months ago (2016-05-04 15:35:09 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1920423002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1920423002/200001
4 years, 7 months ago (2016-05-04 17:22:18 UTC) #40
commit-bot: I haz the power
Try jobs failed on following builders: skia_presubmit-Trybot on client.skia.fyi (JOB_FAILED, http://build.chromium.org/p/client.skia.fyi/builders/skia_presubmit-Trybot/builds/9393)
4 years, 7 months ago (2016-05-04 17:23:49 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1920423002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1920423002/200001
4 years, 7 months ago (2016-05-04 17:59:10 UTC) #45
commit-bot: I haz the power
Committed patchset #11 (id:200001) as https://skia.googlesource.com/skia/+/fad98562d8f9db63839a8d902a301b174320f27f
4 years, 7 months ago (2016-05-04 18:06:32 UTC) #47
hal.canary
4 years, 7 months ago (2016-05-04 18:17:57 UTC) #49
Message was sent while issue was closed.
++awesome.

Powered by Google App Engine
This is Rietveld 408576698