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

Unified Diff: src/lazy/SkDiscardableMemoryPool.cpp

Issue 1945343003: Revert of Modernize SkMutex and SkSemaphore. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 7 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 | « src/lazy/SkDiscardableMemoryPool.h ('k') | 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 2be4c755f1e0c3196fbc13a439333c7cdeadd55f..1f3bcf93e92bc1cfa784a70330c2e6721b87d2bb 100644
--- a/src/lazy/SkDiscardableMemoryPool.cpp
+++ b/src/lazy/SkDiscardableMemoryPool.cpp
@@ -29,7 +29,7 @@
/**
* Without mutex, will be not be thread safe.
*/
- DiscardableMemoryPool(size_t budget, SkMutex* mutex = nullptr);
+ DiscardableMemoryPool(size_t budget, SkBaseMutex* mutex = nullptr);
virtual ~DiscardableMemoryPool();
SkDiscardableMemory* create(size_t bytes) override;
@@ -52,9 +52,9 @@
#endif // SK_LAZY_CACHE_STATS
private:
- SkMutex* fMutex;
- size_t fBudget;
- size_t fUsed;
+ SkBaseMutex* fMutex;
+ size_t fBudget;
+ size_t fUsed;
SkTInternalLList<PoolDiscardableMemory> fList;
/** Function called to free memory if needed */
@@ -128,7 +128,8 @@
////////////////////////////////////////////////////////////////////////////////
-DiscardableMemoryPool::DiscardableMemoryPool(size_t budget, SkMutex* mutex)
+DiscardableMemoryPool::DiscardableMemoryPool(size_t budget,
+ SkBaseMutex* mutex)
: fMutex(mutex)
, fBudget(budget)
, fUsed(0) {
@@ -240,7 +241,7 @@
} // namespace
-SkDiscardableMemoryPool* SkDiscardableMemoryPool::Create(size_t size, SkMutex* mutex) {
+SkDiscardableMemoryPool* SkDiscardableMemoryPool::Create(size_t size, SkBaseMutex* mutex) {
return new DiscardableMemoryPool(size, mutex);
}
« no previous file with comments | « src/lazy/SkDiscardableMemoryPool.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698