projects
/
platform
/
upstream
/
libSkiaSharp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6651a32
)
don't peek w/o first acquiring the lock
author
reed
<reed@google.com>
Wed, 9 Sep 2015 20:25:24 +0000
(13:25 -0700)
committer
Commit bot
<commit-bot@chromium.org>
Wed, 9 Sep 2015 20:25:24 +0000
(13:25 -0700)
BUG=skia:
Review URL: https://codereview.chromium.org/
1324503005
src/lazy/SkDiscardableMemoryPool.cpp
patch
|
blob
|
history
diff --git
a/src/lazy/SkDiscardableMemoryPool.cpp
b/src/lazy/SkDiscardableMemoryPool.cpp
index
78c48f5
..
1f3bcf9
100644
(file)
--- a/
src/lazy/SkDiscardableMemoryPool.cpp
+++ b/
src/lazy/SkDiscardableMemoryPool.cpp
@@
-202,13
+202,6
@@
void DiscardableMemoryPool::free(PoolDiscardableMemory* dm) {
bool DiscardableMemoryPool::lock(PoolDiscardableMemory* dm) {
SkASSERT(dm != nullptr);
- if (nullptr == dm->fPointer) {
- #if SK_LAZY_CACHE_STATS
- SkAutoMutexAcquire autoMutexAcquire(fMutex);
- ++fCacheMisses;
- #endif // SK_LAZY_CACHE_STATS
- return false;
- }
SkAutoMutexAcquire autoMutexAcquire(fMutex);
if (nullptr == dm->fPointer) {
// May have been purged while waiting for lock.