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

Unified Diff: src/lazy/SkDiscardableMemoryPool.cpp

Issue 1324503005: don't peek w/o first acquiring the lock (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/lazy/SkDiscardableMemoryPool.cpp
diff --git a/src/lazy/SkDiscardableMemoryPool.cpp b/src/lazy/SkDiscardableMemoryPool.cpp
index 78c48f50c158f25ea90a87300e9c6bddc9816d3d..1f3bcf93e92bc1cfa784a70330c2e6721b87d2bb 100644
--- 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.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698