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

Unified Diff: skia/ext/SkDiscardableMemory_chrome.h

Issue 24988003: Refactor DiscardableMemory for the upcoming DiscardableMemoryAllocator. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix linux clang build Created 7 years, 2 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 | « base/memory/discardable_memory_unittest.cc ('k') | skia/ext/SkDiscardableMemory_chrome.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/SkDiscardableMemory_chrome.h
diff --git a/skia/ext/SkDiscardableMemory_chrome.h b/skia/ext/SkDiscardableMemory_chrome.h
index 13dfef83dc8476c475149f4e6937d06775af146d..b251dc452db6179c8c02a8670e9ea7df3b8b0ce4 100644
--- a/skia/ext/SkDiscardableMemory_chrome.h
+++ b/skia/ext/SkDiscardableMemory_chrome.h
@@ -13,20 +13,18 @@
// base::DiscardableMemory.
class SK_API SkDiscardableMemoryChrome : public SkDiscardableMemory {
public:
- SkDiscardableMemoryChrome();
virtual ~SkDiscardableMemoryChrome();
- // Initialize the SkDiscardableMemoryChrome object and lock the memory.
- // Returns true on success. No memory is allocated if this call returns
- // false. This call should only be called once.
- bool InitializeAndLock(size_t bytes);
-
- // Implementation of SkDiscardableMemory interface.
+ // SkDiscardableMemory:
virtual bool lock() OVERRIDE;
virtual void* data() OVERRIDE;
virtual void unlock() OVERRIDE;
private:
+ friend class SkDiscardableMemory;
+
+ SkDiscardableMemoryChrome(scoped_ptr<base::DiscardableMemory> memory);
+
scoped_ptr<base::DiscardableMemory> discardable_;
};
« no previous file with comments | « base/memory/discardable_memory_unittest.cc ('k') | skia/ext/SkDiscardableMemory_chrome.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698