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

Issue 1112523006: Sketch splitting SkPicture into an interface and SkBigPicture. (Closed)

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

Description

Sketch splitting SkPicture into an interface and SkBigPicture. Adds small pictures for drawRect(), drawTextBlob(), and drawPath(). These cover about 89% of draw calls from Blink SKPs, and about 25% of draw calls from our GMs. SkPicture handles: - serialization and deserialization - unique IDs Everything else is left to the subclasses: - playback(), cullRect() - hasBitmap(), hasText(), suitableForGPU(), etc. - LayerInfo / AccelData if applicable. The time to record a 1-op picture improves a good chunk (2 mallocs to 1), and the time to record a 0-op picture greatly improves (2 mallocs to none): picture_overhead_draw: 450ns -> 350ns picture_overhead_nodraw: 300ns -> 90ns BUG=skia: Committed: https://skia.googlesource.com/skia/+/c92c129ff85b05a714bd1bf921c02d5e14651f8b Latest blink_linux_rel: http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/61248 Committed: https://skia.googlesource.com/skia/+/15877b6eae33a9282458bdb904a6d00440eca0ec http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/62015 Committed: https://skia.googlesource.com/skia/+/9db912c2ac2ab53bc24f2d50a3e5a80162051dcc

Patch Set 1 #

Patch Set 2 : compiles #

Patch Set 3 : slim down and move AccelData to SkBigPicture #

Patch Set 4 : move snapshot array #

Patch Set 5 : tests pass #

Patch Set 6 : nullptr #

Total comments: 12

Patch Set 7 : .get() #

Patch Set 8 : undo #

Patch Set 9 : rebase #

Patch Set 10 : demo hack #

Patch Set 11 : minirecorder sketch #

Patch Set 12 : working? #

Patch Set 13 : port to SkRecords #

Patch Set 14 : plumb cull #

Patch Set 15 : contract #

Patch Set 16 : tweaks #

Total comments: 6

Patch Set 17 : reed #

Patch Set 18 : final #

Patch Set 19 : check on all ops #

Total comments: 1

Patch Set 20 : size #

Patch Set 21 : Max<A,B> #

Patch Set 22 : unit test fixes #

Patch Set 23 : implement suitable-for-gpu for small pictures #

Patch Set 24 : Don't assume detachAsPicture() is called. #

Patch Set 25 : Rebase #

Patch Set 26 : try that #

Patch Set 27 : no singleton for now #

Patch Set 28 : no, that did not help #

Patch Set 29 : hack #

Patch Set 30 : note #

Unified diffs Side-by-side diffs Delta from patch set Stats (+771 lines, -690 lines) Patch
M gyp/core.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 3 chunks +2 lines, -1 line 0 comments Download
M gyp/utils.gypi View 1 chunk +0 lines, -1 line 0 comments Download
M include/core/SkPicture.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 8 chunks +48 lines, -164 lines 0 comments Download
M include/core/SkPictureRecorder.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -0 lines 0 comments Download
M include/utils/SkPictureUtils.h View 1 2 chunks +5 lines, -1 line 0 comments Download
A src/core/SkBigPicture.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +88 lines, -0 lines 0 comments Download
A src/core/SkBigPicture.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +98 lines, -0 lines 0 comments Download
M src/core/SkLayerInfo.h View 1 2 4 chunks +7 lines, -11 lines 0 comments Download
D src/core/SkLayerInfo.cpp View 1 2 1 chunk +0 lines, -15 lines 0 comments Download
A src/core/SkMiniRecorder.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +44 lines, -0 lines 0 comments Download
A src/core/SkMiniRecorder.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 1 chunk +104 lines, -0 lines 0 comments Download
M src/core/SkPicture.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 5 chunks +69 lines, -357 lines 0 comments Download
A src/core/SkPictureCommon.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +136 lines, -0 lines 0 comments Download
M src/core/SkPictureRecorder.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 8 chunks +31 lines, -24 lines 0 comments Download
M src/core/SkRecordDraw.h View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M src/core/SkRecordDraw.cpp View 1 2 3 4 chunks +7 lines, -7 lines 0 comments Download
M src/core/SkRecorder.h View 1 2 3 4 5 6 7 8 9 10 5 chunks +10 lines, -4 lines 0 comments Download
M src/core/SkRecorder.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 9 chunks +28 lines, -8 lines 0 comments Download
M src/core/SkRecords.h View 1 2 3 4 5 6 7 8 9 10 11 12 12 chunks +12 lines, -0 lines 0 comments Download
M src/gpu/GrLayerHoister.cpp View 1 2 9 chunks +23 lines, -19 lines 0 comments Download
M src/gpu/GrRecordReplaceDraw.cpp View 1 8 chunks +29 lines, -18 lines 0 comments Download
M src/gpu/SkGpuDevice.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 18 1 chunk +0 lines, -2 lines 0 comments Download
M src/gpu/SkGpuDevice.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +4 lines, -3 lines 0 comments Download
D src/utils/SkPictureUtils.cpp View 1 chunk +0 lines, -25 lines 0 comments Download
M tests/GpuLayerCacheTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +4 lines, -1 line 0 comments Download
M tests/PictureTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 6 chunks +18 lines, -28 lines 0 comments Download

Messages

Total messages: 72 (34 generated)
mtklein
Just thought I'd get this stewing in your minds. The thing to imagine coming next ...
5 years, 7 months ago (2015-04-29 20:11:48 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/1112523006/80001
5 years, 7 months ago (2015-04-29 20:12:23 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1112523006/100001
5 years, 7 months ago (2015-04-29 20:15:07 UTC) #6
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1112523006/120001
5 years, 7 months ago (2015-04-29 20:17:12 UTC) #8
reed1
1. I think this is an exciting idea/direction 2. I wonder if we should try ...
5 years, 7 months ago (2015-04-29 20:21:53 UTC) #9
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 7 months ago (2015-04-29 20:21:59 UTC) #11
mtklein
Yep, agree, I'm shooting for tomorrow morning to have a small picture class plumbed into ...
5 years, 7 months ago (2015-04-29 20:46:22 UTC) #12
mtklein
https://codereview.chromium.org/1112523006/diff/100001/include/core/SkPicture.h File include/core/SkPicture.h (right): https://codereview.chromium.org/1112523006/diff/100001/include/core/SkPicture.h#newcode78 include/core/SkPicture.h:78: struct SK_API AbortCallback { On 2015/04/29 20:46:22, mtklein wrote: ...
5 years, 7 months ago (2015-04-30 16:17:03 UTC) #13
mtklein
I think it'd look something like this.
5 years, 7 months ago (2015-05-01 22:23:10 UTC) #14
reed1
it may be time for a src/picture/... directory to group these many files (as we ...
5 years, 7 months ago (2015-05-04 13:26:34 UTC) #15
mtklein
Adding another src/ directory is a pain in the butt to roll. https://codereview.chromium.org/1112523006/diff/300001/src/core/SkMiniRecorder.cpp File src/core/SkMiniRecorder.cpp ...
5 years, 7 months ago (2015-05-04 15:52:45 UTC) #16
mtklein
Have another look guys? out/Debug/dm --config sp-8888 now shows no diffs against head.
5 years, 7 months ago (2015-05-06 17:56:29 UTC) #17
reed1
lgtm
5 years, 7 months ago (2015-05-06 18:13:49 UTC) #18
commit-bot: I haz the power
COMMIT=false detected. CQ is abandoning the patch.
5 years, 7 months ago (2015-05-07 18:58:40 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1112523006/360001
5 years, 7 months ago (2015-05-07 19:09:51 UTC) #23
commit-bot: I haz the power
Try jobs failed on following builders: Build-Ubuntu-GCC-Arm7-Debug-Android-Trybot on client.skia.compile (JOB_FAILED, http://build.chromium.org/p/client.skia.compile/builders/Build-Ubuntu-GCC-Arm7-Debug-Android-Trybot/builds/934) Build-Ubuntu-GCC-Mips-Debug-Android-Trybot on client.skia.compile (JOB_FAILED, ...
5 years, 7 months ago (2015-05-07 19:11:54 UTC) #25
jbroman
https://codereview.chromium.org/1112523006/diff/360001/src/core/SkMiniRecorder.h File src/core/SkMiniRecorder.h (right): https://codereview.chromium.org/1112523006/diff/360001/src/core/SkMiniRecorder.h#newcode34 src/core/SkMiniRecorder.h:34: SkAlignedSStorage<sizeof(SkRecords::DrawPath)> fBuffer; Lacking constexpr std::max, maybe a trick like ...
5 years, 7 months ago (2015-05-07 19:38:26 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1112523006/380001
5 years, 7 months ago (2015-05-07 19:47:59 UTC) #29
mtklein
On 2015/05/07 19:38:26, jbroman wrote: > https://codereview.chromium.org/1112523006/diff/360001/src/core/SkMiniRecorder.h > File src/core/SkMiniRecorder.h (right): > > https://codereview.chromium.org/1112523006/diff/360001/src/core/SkMiniRecorder.h#newcode34 > ...
5 years, 7 months ago (2015-05-07 19:48:04 UTC) #30
commit-bot: I haz the power
Try jobs failed on following builders: Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Shared-Trybot on client.skia (JOB_FAILED, http://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Shared-Trybot/builds/763)
5 years, 7 months ago (2015-05-07 19:51:22 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1112523006/400001
5 years, 7 months ago (2015-05-07 19:52:59 UTC) #35
commit-bot: I haz the power
Try jobs failed on following builders: Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Shared-Trybot on client.skia (JOB_FAILED, http://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Shared-Trybot/builds/766)
5 years, 7 months ago (2015-05-07 19:56:38 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1112523006/420001
5 years, 7 months ago (2015-05-07 20:34:16 UTC) #40
commit-bot: I haz the power
Committed patchset #22 (id:420001) as https://skia.googlesource.com/skia/+/c92c129ff85b05a714bd1bf921c02d5e14651f8b
5 years, 7 months ago (2015-05-07 20:41:13 UTC) #41
reed2
A revert of this CL (patchset #22 id:420001) has been created in https://codereview.chromium.org/1130333002/ by reed@chromium.org. ...
5 years, 7 months ago (2015-05-08 00:29:32 UTC) #42
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1112523006/440001
5 years, 7 months ago (2015-05-11 14:33:58 UTC) #45
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 7 months ago (2015-05-11 14:40:18 UTC) #47
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1112523006/460001
5 years, 7 months ago (2015-05-11 16:07:15 UTC) #50
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 7 months ago (2015-05-11 18:21:11 UTC) #52
mtklein
5 years, 7 months ago (2015-05-18 17:13:43 UTC) #54
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1112523006/480001
5 years, 7 months ago (2015-05-18 18:31:18 UTC) #57
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 7 months ago (2015-05-18 20:01:02 UTC) #59
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1112523006/480001
5 years, 7 months ago (2015-05-18 20:46:22 UTC) #61
commit-bot: I haz the power
Committed patchset #25 (id:480001) as https://skia.googlesource.com/skia/+/15877b6eae33a9282458bdb904a6d00440eca0ec
5 years, 7 months ago (2015-05-18 20:47:23 UTC) #62
mtklein
A revert of this CL (patchset #25 id:480001) has been created in https://codereview.chromium.org/1130283004/ by mtklein@google.com. ...
5 years, 7 months ago (2015-05-18 21:53:07 UTC) #63
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1112523006/510001
5 years, 7 months ago (2015-05-19 17:41:00 UTC) #66
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1112523006/570001
5 years, 7 months ago (2015-05-19 18:04:48 UTC) #71
commit-bot: I haz the power
5 years, 7 months ago (2015-05-19 18:11:30 UTC) #72
Message was sent while issue was closed.
Committed patchset #30 (id:570001) as
https://skia.googlesource.com/skia/+/9db912c2ac2ab53bc24f2d50a3e5a80162051dcc

Powered by Google App Engine
This is Rietveld 408576698