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

Side by Side Diff: skia/ext/SkDiscardableMemory_chrome.h

Issue 23206002: skia: Added chrome implementation of SkDiscardableMemory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Capitalized name of static factory method. Created 7 years, 4 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef SKIA_EXT_SK_DISCARDABLE_MEMORY_CHROME_H_
6 #define SKIA_EXT_SK_DISCARDABLE_MEMORY_CHROME_H_
7
8 #include "base/memory/discardable_memory.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "third_party/skia/src/core/SkDiscardableMemory.h"
11
12 // This class implements the SkDiscardableMemory interface using
13 // base::DiscardableMemory.
14 class SK_API SkDiscardableMemoryChrome : public SkDiscardableMemory {
15 public:
16 SkDiscardableMemoryChrome();
17
18 // Initialize the SkDiscardableMemoryChrome object and lock the memory.
19 // Returns true on success. No memory is allocated if this call returns
20 // false. This call should only be called once.
21 bool InitializeAndLock(size_t bytes);
22
23 // Implementation of SkDiscardableMemory interface.
24 bool lock();
reed1 2013/08/20 15:23:47 Do you not say virtual and/or override for these m
ernstm 2013/08/21 23:00:22 We do. Done.
25 void* data();
26 void unlock();
27
28 private:
29 scoped_ptr<base::DiscardableMemory> discardable_;
30 };
31
32 #endif // SKIA_EXT_SK_DISCARDABLE_MEMORY_CHROME_H_
OLDNEW
« no previous file with comments | « no previous file | skia/ext/SkDiscardableMemory_chrome.cc » ('j') | skia/ext/SkDiscardableMemory_chrome.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698