1 // Copyright 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.
5 #ifndef SKIA_EXT_SK_DISCARDABLE_MEMORY_CHROME_H_
6 #define SKIA_EXT_SK_DISCARDABLE_MEMORY_CHROME_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "third_party/skia/src/core/SkDiscardableMemory.h"
12 class DiscardableMemory
;
15 // This class implements the SkDiscardableMemory interface using
16 // base::DiscardableMemory.
17 class SK_API SkDiscardableMemoryChrome
: public SkDiscardableMemory
{
19 ~SkDiscardableMemoryChrome() override
;
21 // SkDiscardableMemory:
23 void* data() override
;
24 void unlock() override
;
27 friend class SkDiscardableMemory
;
29 SkDiscardableMemoryChrome(scoped_ptr
<base::DiscardableMemory
> memory
);
31 scoped_ptr
<base::DiscardableMemory
> discardable_
;
34 #endif // SKIA_EXT_SK_DISCARDABLE_MEMORY_CHROME_H_