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

Issue 267863002: 4x allocation in PipeController is probably overkill. (Closed)

Created:
6 years, 7 months ago by mtklein_C
Modified:
6 years, 7 months ago
CC:
skia-review_googlegroups.com
Base URL:
https://skia.googlesource.com/skia.git@master
Visibility:
Public.

Description

4x allocation in PipeController is probably overkill. When verylargebitmap GM runs in cross-process pipe mode, we're requestBlock()ing ~200M to carry the bitmaps. The current implementation ends up allocating ~800M, which is a bit wasteful. SkGPipeWrite already rounds up to 16K, so just rely on that. This change exposed several bugs in pipe: - we don't reserve enough space in drawVertices - we don't reserve enough space for factory names in cross-process mode - we don't quite have the right check in needOpBytes to see if we needed to send off the current block and allocate a new one SETUP_NOTIFY and generally calling doNotify() more often than necessary made things hard to debug and understand. Now the pipe always waits to send off its current block until it needs more space than that block can provide, or it's the final block. We can put these back if we need the proactive flushing, but it seems not necessary? Removed an assert in DeferredCanvasTest, which is somtimes 2 (Debug), sometimes 3 (Release). It seemed like the other asserts were more essential, and this one was more of a white-box assertion. Still sound if we remove it? BUG=skia:2478 Committed: http://code.google.com/p/skia/source/detail?r=14613

Patch Set 1 #

Patch Set 2 : 128 bytes #

Patch Set 3 : move #

Total comments: 1

Patch Set 4 : exact in debug #

Patch Set 5 : remove AUTO_NOTIFY #

Patch Set 6 : sometimes 2, sometimes 3 #

Total comments: 2

Patch Set 7 : update comment #

Total comments: 2

Patch Set 8 : keep test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+58 lines, -79 lines) Patch
M src/pipe/SkGPipeWrite.cpp View 1 2 3 4 5 6 39 chunks +46 lines, -64 lines 0 comments Download
M src/pipe/utils/SamplePipeControllers.h View 1 chunk +3 lines, -3 lines 0 comments Download
M src/pipe/utils/SamplePipeControllers.cpp View 1 2 1 chunk +5 lines, -12 lines 0 comments Download
M tests/DeferredCanvasTest.cpp View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
mtklein
6 years, 7 months ago (2014-05-02 14:50:04 UTC) #1
mtklein
On 2014/05/02 14:50:04, mtklein wrote: Actually, 4 extra bytes doesn't look like it's enough. Digging ...
6 years, 7 months ago (2014-05-02 15:01:42 UTC) #2
mtklein
On 2014/05/02 15:01:42, mtklein wrote: > On 2014/05/02 14:50:04, mtklein wrote: > > Actually, 4 ...
6 years, 7 months ago (2014-05-02 15:24:28 UTC) #3
mtklein
6 years, 7 months ago (2014-05-02 15:44:29 UTC) #4
scroggo
lgtm https://codereview.chromium.org/267863002/diff/40001/src/pipe/SkGPipeWrite.cpp File src/pipe/SkGPipeWrite.cpp (right): https://codereview.chromium.org/267863002/diff/40001/src/pipe/SkGPipeWrite.cpp#newcode482 src/pipe/SkGPipeWrite.cpp:482: blockSize += 128; // TODO(mtklein, scroggo): why do ...
6 years, 7 months ago (2014-05-02 16:15:42 UTC) #5
mtklein
Please take (another) look. I've got ASAN happy now.
6 years, 7 months ago (2014-05-02 19:02:01 UTC) #6
scroggo
> SETUP_NOTIFY and generally calling doNotify() more often > than necessary made things hard to ...
6 years, 7 months ago (2014-05-02 20:02:59 UTC) #7
mtklein
https://codereview.chromium.org/267863002/diff/100001/src/pipe/SkGPipeWrite.cpp File src/pipe/SkGPipeWrite.cpp (right): https://codereview.chromium.org/267863002/diff/100001/src/pipe/SkGPipeWrite.cpp#newcode751 src/pipe/SkGPipeWrite.cpp:751: // This needs to run first so it's calls ...
6 years, 7 months ago (2014-05-02 20:20:55 UTC) #8
Justin Novosad
https://codereview.chromium.org/267863002/diff/120001/tests/DeferredCanvasTest.cpp File tests/DeferredCanvasTest.cpp (left): https://codereview.chromium.org/267863002/diff/120001/tests/DeferredCanvasTest.cpp#oldcode550 tests/DeferredCanvasTest.cpp:550: REPORTER_ASSERT(reporter, 2 == notificationCounter.fStorageAllocatedChangedCount); Could we keep this assert ...
6 years, 7 months ago (2014-05-06 17:08:13 UTC) #9
mtklein
https://codereview.chromium.org/267863002/diff/120001/tests/DeferredCanvasTest.cpp File tests/DeferredCanvasTest.cpp (left): https://codereview.chromium.org/267863002/diff/120001/tests/DeferredCanvasTest.cpp#oldcode550 tests/DeferredCanvasTest.cpp:550: REPORTER_ASSERT(reporter, 2 == notificationCounter.fStorageAllocatedChangedCount); On 2014/05/06 17:08:14, junov wrote: ...
6 years, 7 months ago (2014-05-06 17:36:42 UTC) #10
mtklein
The CQ bit was checked by mtklein@google.com
6 years, 7 months ago (2014-05-07 15:16:39 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/mtklein@chromium.org/267863002/140001
6 years, 7 months ago (2014-05-07 15:17:42 UTC) #12
commit-bot: I haz the power
Change committed as 14613
6 years, 7 months ago (2014-05-07 15:27:12 UTC) #13
mtklein
6 years, 7 months ago (2014-05-14 13:33:01 UTC) #14
Message was sent while issue was closed.
A revert of this CL has been created in
https://codereview.chromium.org/285943002/ by mtklein@google.com.

The reason for reverting is: ~29% perf regression in Chrome's
Animation_balls-canvas bench on Macs.  Going to cut up and reland in pieces.

https://code.google.com/p/chromium/issues/detail?id=372671.

Powered by Google App Engine
This is Rietveld 408576698