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

Issue 592843003: Add SkCachedData and use it for SkMipMap (Closed)

Created:
6 years, 3 months ago by reed1
Modified:
6 years, 2 months ago
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Project:
skia
Visibility:
Public.

Description

Add SkCachedData and use it for SkMipMap Committed: https://skia.googlesource.com/skia/+/92561a0b99ad6c08ab7a11dd1872f028199392e9

Patch Set 1 #

Patch Set 2 : now with (simple) test #

Patch Set 3 : uses low-bit of refcnt to known when we're in the cache #

Total comments: 2

Patch Set 4 : updated test and documentation #

Patch Set 5 : use explicit runtime flag to recognize Discardable, to allow clients to subclass #

Total comments: 1

Patch Set 6 : try subclassing for mipmaps #

Patch Set 7 : mipmaps now can be discardable #

Patch Set 8 : #

Patch Set 9 : add CachedDataTest.cpp #

Patch Set 10 : remove MaskCache work (too soon) #

Patch Set 11 : now with mutex power #

Patch Set 12 : #

Patch Set 13 : #

Patch Set 14 : #

Total comments: 4

Patch Set 15 : use natural bools for state tracking #

Total comments: 11

Patch Set 16 : address comments from #15 #

Patch Set 17 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+522 lines, -46 lines) Patch
M gyp/core.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download
M gyp/tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download
M src/core/SkBitmapCache.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -2 lines 0 comments Download
M src/core/SkBitmapCache.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +25 lines, -13 lines 0 comments Download
M src/core/SkBitmapProcState.cpp View 1 2 3 4 5 1 chunk +1 line, -2 lines 0 comments Download
A src/core/SkCachedData.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +107 lines, -0 lines 0 comments Download
A src/core/SkCachedData.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +175 lines, -0 lines 0 comments Download
M src/core/SkMipMap.h View 1 2 3 4 5 6 2 chunks +15 lines, -8 lines 0 comments Download
M src/core/SkMipMap.cpp View 1 2 3 4 5 6 4 chunks +28 lines, -20 lines 0 comments Download
M src/core/SkResourceCache.h View 1 3 chunks +5 lines, -0 lines 0 comments Download
M src/core/SkResourceCache.cpp View 1 2 3 4 3 chunks +15 lines, -0 lines 0 comments Download
A tests/CachedDataTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +95 lines, -0 lines 0 comments Download
M tests/MipMapTest.cpp View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M tests/SkResourceCacheTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +51 lines, -0 lines 0 comments Download

Messages

Total messages: 60 (19 generated)
reed1
6 years, 3 months ago (2014-09-22 20:48:44 UTC) #2
reed1
ptal -- though more tests to come
6 years, 3 months ago (2014-09-23 13:46:31 UTC) #3
reed1
PTAL
6 years, 3 months ago (2014-09-23 20:30:42 UTC) #4
mtklein
https://codereview.chromium.org/592843003/diff/40001/src/core/SkCachedData.cpp File src/core/SkCachedData.cpp (right): https://codereview.chromium.org/592843003/diff/40001/src/core/SkCachedData.cpp#newcode27 src/core/SkCachedData.cpp:27: if (in_cache) { So, if I add SkASSERT(in_cache) just ...
6 years, 3 months ago (2014-09-23 22:16:55 UTC) #5
reed2
https://codereview.chromium.org/592843003/diff/40001/src/core/SkCachedData.cpp File src/core/SkCachedData.cpp (right): https://codereview.chromium.org/592843003/diff/40001/src/core/SkCachedData.cpp#newcode27 src/core/SkCachedData.cpp:27: if (in_cache) { On 2014/09/23 22:16:55, mtklein wrote: > ...
6 years, 3 months ago (2014-09-24 01:23:58 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/592843003/40001
6 years, 3 months ago (2014-09-24 01:24:48 UTC) #9
commit-bot: I haz the power
Note for Reviewers: The CQ is waiting for an approval. If you believe that the ...
6 years, 3 months ago (2014-09-24 01:24:49 UTC) #10
mtklein
On 2014/09/24 01:23:58, reed2 wrote: > https://codereview.chromium.org/592843003/diff/40001/src/core/SkCachedData.cpp > File src/core/SkCachedData.cpp (right): > > https://codereview.chromium.org/592843003/diff/40001/src/core/SkCachedData.cpp#newcode27 > ...
6 years, 3 months ago (2014-09-24 01:26:24 UTC) #12
reed1
PTAL
6 years, 3 months ago (2014-09-24 16:04:07 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/592843003/60001
6 years, 3 months ago (2014-09-24 16:04:37 UTC) #15
commit-bot: I haz the power
Note for Reviewers: The CQ is waiting for an approval. If you believe that the ...
6 years, 3 months ago (2014-09-24 16:04:38 UTC) #16
reed1
latest test exercises all branches in ref/unref.
6 years, 3 months ago (2014-09-24 16:06:02 UTC) #17
qiankun
https://codereview.chromium.org/592843003/diff/80001/src/core/SkCachedData.cpp File src/core/SkCachedData.cpp (right): https://codereview.chromium.org/592843003/diff/80001/src/core/SkCachedData.cpp#newcode56 src/core/SkCachedData.cpp:56: if (2 == owners) { In some cases, owners ...
6 years, 2 months ago (2014-09-25 07:15:12 UTC) #19
reed1
On 2014/09/25 07:15:12, qiankun wrote: > https://codereview.chromium.org/592843003/diff/80001/src/core/SkCachedData.cpp > File src/core/SkCachedData.cpp (right): > > https://codereview.chromium.org/592843003/diff/80001/src/core/SkCachedData.cpp#newcode56 > ...
6 years, 2 months ago (2014-09-25 18:57:46 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/592843003/140001
6 years, 2 months ago (2014-09-25 18:58:48 UTC) #22
commit-bot: I haz the power
Note for Reviewers: The CQ is waiting for an approval. If you believe that the ...
6 years, 2 months ago (2014-09-25 18:58:50 UTC) #23
commit-bot: I haz the power
Try jobs failed on following builders: Build-Win-VS2013-x86-Debug-Trybot on tryserver.skia (http://108.170.220.76:10117/builders/Build-Win-VS2013-x86-Debug-Trybot/builds/1958)
6 years, 2 months ago (2014-09-25 19:02:37 UTC) #25
reed1
ptal
6 years, 2 months ago (2014-09-25 19:59:06 UTC) #26
reed1
BTW -- it is possible (likely?) that after this lands, we may want to retool ...
6 years, 2 months ago (2014-09-25 20:00:04 UTC) #27
reed1
removed MaskCache work (too soon since I didn't try to use it in the mask ...
6 years, 2 months ago (2014-09-26 14:40:02 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/592843003/180001
6 years, 2 months ago (2014-09-26 14:40:36 UTC) #30
commit-bot: I haz the power
Note for Reviewers: The CQ is waiting for an approval. If you believe that the ...
6 years, 2 months ago (2014-09-26 14:40:37 UTC) #31
commit-bot: I haz the power
Try jobs failed on following builders: Test-Ubuntu13.10-GCE-NoGPU-x86_64-Debug-Trybot on tryserver.skia (http://108.170.220.120:10117/builders/Test-Ubuntu13.10-GCE-NoGPU-x86_64-Debug-Trybot/builds/878)
6 years, 2 months ago (2014-09-26 14:44:30 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/592843003/220001
6 years, 2 months ago (2014-09-26 17:39:28 UTC) #35
commit-bot: I haz the power
Note for Reviewers: The CQ is waiting for an approval. If you believe that the ...
6 years, 2 months ago (2014-09-26 17:39:29 UTC) #36
commit-bot: I haz the power
Try jobs failed on following builders: Test-Ubuntu13.10-GCE-NoGPU-x86_64-Release-Shared-Trybot on tryserver.skia (http://108.170.220.120:10117/builders/Test-Ubuntu13.10-GCE-NoGPU-x86_64-Release-Shared-Trybot/builds/823)
6 years, 2 months ago (2014-09-26 17:46:08 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/592843003/240001
6 years, 2 months ago (2014-09-26 17:49:30 UTC) #40
commit-bot: I haz the power
Note for Reviewers: The CQ is waiting for an approval. If you believe that the ...
6 years, 2 months ago (2014-09-26 17:49:35 UTC) #41
commit-bot: I haz the power
Try jobs failed on following builders: Test-Ubuntu13.10-GCE-NoGPU-x86_64-Debug-Trybot on tryserver.skia (http://108.170.220.120:10117/builders/Test-Ubuntu13.10-GCE-NoGPU-x86_64-Debug-Trybot/builds/883)
6 years, 2 months ago (2014-09-26 17:54:15 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/592843003/200002
6 years, 2 months ago (2014-09-26 17:59:36 UTC) #45
commit-bot: I haz the power
Note for Reviewers: The CQ is waiting for an approval. If you believe that the ...
6 years, 2 months ago (2014-09-26 17:59:39 UTC) #46
mtklein
https://codereview.chromium.org/592843003/diff/200002/src/core/SkBitmapCache.h File src/core/SkBitmapCache.h (right): https://codereview.chromium.org/592843003/diff/200002/src/core/SkBitmapCache.h#newcode55 src/core/SkBitmapCache.h:55: static SkMipMap* FindAndRef(const SkBitmap& src, SkResourceCache* localCache = NULL); ...
6 years, 2 months ago (2014-09-26 19:06:33 UTC) #47
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/592843003/270001
6 years, 2 months ago (2014-09-26 21:13:37 UTC) #50
commit-bot: I haz the power
Note for Reviewers: The CQ is waiting for an approval. If you believe that the ...
6 years, 2 months ago (2014-09-26 21:13:40 UTC) #51
reed1
https://codereview.chromium.org/592843003/diff/200002/src/core/SkBitmapCache.h File src/core/SkBitmapCache.h (right): https://codereview.chromium.org/592843003/diff/200002/src/core/SkBitmapCache.h#newcode55 src/core/SkBitmapCache.h:55: static SkMipMap* FindAndRef(const SkBitmap& src, SkResourceCache* localCache = NULL); ...
6 years, 2 months ago (2014-09-26 21:33:51 UTC) #52
commit-bot: I haz the power
No LGTM from a valid reviewer yet. Please ask for an LGTM from a full ...
6 years, 2 months ago (2014-09-27 03:13:47 UTC) #54
mtklein
A few nits and things but the meat lgtm. https://codereview.chromium.org/592843003/diff/270001/src/core/SkCachedData.cpp File src/core/SkCachedData.cpp (right): https://codereview.chromium.org/592843003/diff/270001/src/core/SkCachedData.cpp#newcode64 src/core/SkCachedData.cpp:64: ...
6 years, 2 months ago (2014-09-27 14:47:50 UTC) #55
reed1
grrr, I don't like this. When we're not using discardable, I still have a mutex ...
6 years, 2 months ago (2014-09-27 17:09:06 UTC) #56
reed1
https://codereview.chromium.org/592843003/diff/270001/src/core/SkCachedData.cpp File src/core/SkCachedData.cpp (right): https://codereview.chromium.org/592843003/diff/270001/src/core/SkCachedData.cpp#newcode73 src/core/SkCachedData.cpp:73: writable->fInCache |= fromCache; On 2014/09/27 14:47:49, mtklein wrote: > ...
6 years, 2 months ago (2014-09-27 17:25:59 UTC) #57
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/592843003/310001
6 years, 2 months ago (2014-10-02 20:25:28 UTC) #59
commit-bot: I haz the power
6 years, 2 months ago (2014-10-02 20:47:12 UTC) #60
Message was sent while issue was closed.
Committed patchset #17 (id:310001) as 92561a0b99ad6c08ab7a11dd1872f028199392e9

Powered by Google App Engine
This is Rietveld 408576698