Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(492)

Issue 6374065: Purge bitmaps from SkGPipe's shared heap. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 4 months ago by Leon
Modified:
12 years, 4 months ago
Reviewers:
reed1
CC:
skia-review_googlegroups.com
Base URL:
https://skia.googlecode.com/svn/trunk
Visibility:
Public.

Description

Purge bitmaps from SkGPipe's shared heap. BitmapInfo: Now in SkGPipePriv so it can be accessed by SkGPipeRead. Add the ability to essentially ref count BitmapInfos so that they can be purged to make room in the shared heap for a new one. SkGPipeWrite: Purge the least recently used bitmap if it has already been drawn by all readers. SkGPipeRead: Read the BitmapInfo (instead of the SkBitmap) and decrement its count after drawing. SkGPipeController: Added a method to tell how many readers will be used, so that when purging bitmaps each reader can be accounted for. Committed: https://code.google.com/p/skia/source/detail?r=4638

Patch Set 1 #

Total comments: 5

Patch Set 2 : Now uses sk_atomic_add #

Patch Set 3 : Use SkNEW(_ARGS) #

Total comments: 8

Patch Set 4 : #

Total comments: 2

Patch Set 5 : Added SK_OVERRIDE and const to numberOfReaders #

Patch Set 6 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+221 lines, -48 lines) Patch
M include/pipe/SkGPipe.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M src/pipe/SkGPipePriv.h View 1 2 3 1 chunk +46 lines, -0 lines 0 comments Download
M src/pipe/SkGPipeRead.cpp View 3 chunks +31 lines, -12 lines 0 comments Download
M src/pipe/SkGPipeWrite.cpp View 1 2 3 3 chunks +142 lines, -36 lines 0 comments Download
M src/pipe/utils/SamplePipeControllers.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 10
Leon
https://codereview.appspot.com/6374065/diff/1/include/core/SkThread_platform.h File include/core/SkThread_platform.h (right): https://codereview.appspot.com/6374065/diff/1/include/core/SkThread_platform.h#newcode58 include/core/SkThread_platform.h:58: #define sk_atomic_inc(addr, inc) android_atomic_add(inc, addr) Found this online, but ...
12 years, 4 months ago (2012-07-12 23:02:04 UTC) #1
reed1
Not sure we should remove atomic_inc, and cast it as atomic_add(ptr, inc = 1). Why ...
12 years, 4 months ago (2012-07-13 14:55:50 UTC) #2
Leon
On 2012/07/13 14:55:50, reed1 wrote: > Not sure we should remove atomic_inc, and cast it ...
12 years, 4 months ago (2012-07-13 19:15:18 UTC) #3
Leon
https://codereview.appspot.com/6374065/diff/1/src/pipe/SkGPipeWrite.cpp File src/pipe/SkGPipeWrite.cpp (right): https://codereview.appspot.com/6374065/diff/1/src/pipe/SkGPipeWrite.cpp#newcode204 src/pipe/SkGPipeWrite.cpp:204: BitmapInfo* Heap::bitmapToReplace(const SkBitmap& bm) const { On 2012/07/13 14:55:50, ...
12 years, 4 months ago (2012-07-13 19:15:33 UTC) #4
reed1
On 2012/07/13 19:15:33, scroggo-work wrote: > https://codereview.appspot.com/6374065/diff/1/src/pipe/SkGPipeWrite.cpp > File src/pipe/SkGPipeWrite.cpp (right): > > https://codereview.appspot.com/6374065/diff/1/src/pipe/SkGPipeWrite.cpp#newcode204 > ...
12 years, 4 months ago (2012-07-13 19:17:25 UTC) #5
Leon
Now uses sk_atomic_add, which was committed at https://code.google.com/p/skia/source/detail?r=4623# https://codereview.appspot.com/6374065/diff/1/src/pipe/SkGPipeWrite.cpp File src/pipe/SkGPipeWrite.cpp (right): https://codereview.appspot.com/6374065/diff/1/src/pipe/SkGPipeWrite.cpp#newcode204 src/pipe/SkGPipeWrite.cpp:204: BitmapInfo* ...
12 years, 4 months ago (2012-07-16 17:29:23 UTC) #6
reed1
Still a little opaque to me. Just looking for more dox (either explaining or as ...
12 years, 4 months ago (2012-07-16 18:19:13 UTC) #7
Leon
https://codereview.appspot.com/6374065/diff/12002/src/pipe/SkGPipeWrite.cpp File src/pipe/SkGPipeWrite.cpp (right): https://codereview.appspot.com/6374065/diff/12002/src/pipe/SkGPipeWrite.cpp#newcode165 src/pipe/SkGPipeWrite.cpp:165: On 2012/07/16 18:19:13, reed1 wrote: > // Is this ...
12 years, 4 months ago (2012-07-16 21:28:33 UTC) #8
reed1
lgtm w/ override comment https://codereview.appspot.com/6374065/diff/17001/src/pipe/utils/SamplePipeControllers.h File src/pipe/utils/SamplePipeControllers.h (left): https://codereview.appspot.com/6374065/diff/17001/src/pipe/utils/SamplePipeControllers.h#oldcode36 src/pipe/utils/SamplePipeControllers.h:36: virtual void notifyWritten(size_t bytes) SK_OVERRIDE; ...
12 years, 4 months ago (2012-07-17 12:20:03 UTC) #9
Leon
12 years, 4 months ago (2012-07-17 15:59:19 UTC) #10
https://codereview.appspot.com/6374065/diff/17001/src/pipe/utils/SamplePipeCo...
File src/pipe/utils/SamplePipeControllers.h (left):

https://codereview.appspot.com/6374065/diff/17001/src/pipe/utils/SamplePipeCo...
src/pipe/utils/SamplePipeControllers.h:36: virtual void notifyWritten(size_t
bytes) SK_OVERRIDE;
On 2012/07/17 12:20:03, reed1 wrote:
> SK_OVERRIDE

Done.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b