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

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

Issue 1094433002: base: Rename DiscardableMemory::Memory() to ::data(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mojo unittest Created 5 years, 8 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
« no previous file with comments | « mojo/services/html_viewer/discardable_memory_allocator_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "SkDiscardableMemory_chrome.h" 5 #include "SkDiscardableMemory_chrome.h"
6 6
7 #include "base/memory/discardable_memory.h" 7 #include "base/memory/discardable_memory.h"
8 #include "base/memory/discardable_memory_allocator.h" 8 #include "base/memory/discardable_memory_allocator.h"
9 9
10 SkDiscardableMemoryChrome::~SkDiscardableMemoryChrome() {} 10 SkDiscardableMemoryChrome::~SkDiscardableMemoryChrome() {}
11 11
12 bool SkDiscardableMemoryChrome::lock() { 12 bool SkDiscardableMemoryChrome::lock() {
13 return discardable_->Lock(); 13 return discardable_->Lock();
14 } 14 }
15 15
16 void* SkDiscardableMemoryChrome::data() { 16 void* SkDiscardableMemoryChrome::data() {
17 return discardable_->Memory(); 17 return discardable_->data();
18 } 18 }
19 19
20 void SkDiscardableMemoryChrome::unlock() { 20 void SkDiscardableMemoryChrome::unlock() {
21 discardable_->Unlock(); 21 discardable_->Unlock();
22 } 22 }
23 23
24 SkDiscardableMemoryChrome::SkDiscardableMemoryChrome( 24 SkDiscardableMemoryChrome::SkDiscardableMemoryChrome(
25 scoped_ptr<base::DiscardableMemory> memory) 25 scoped_ptr<base::DiscardableMemory> memory)
26 : discardable_(memory.Pass()) { 26 : discardable_(memory.Pass()) {
27 } 27 }
28 28
29 SkDiscardableMemory* SkDiscardableMemory::Create(size_t bytes) { 29 SkDiscardableMemory* SkDiscardableMemory::Create(size_t bytes) {
30 return new SkDiscardableMemoryChrome( 30 return new SkDiscardableMemoryChrome(
31 base::DiscardableMemoryAllocator::GetInstance() 31 base::DiscardableMemoryAllocator::GetInstance()
32 ->AllocateLockedDiscardableMemory(bytes)); 32 ->AllocateLockedDiscardableMemory(bytes));
33 } 33 }
OLDNEW
« no previous file with comments | « mojo/services/html_viewer/discardable_memory_allocator_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698