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

Side by Side Diff: src/lazy/SkPurgeableMemoryBlock_common.cpp

Issue 12433020: Improvements/additions to SkImageCache/SkLazyPixelRef. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 /*
2 * Copyright 2013 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #include "SkPurgeableMemoryBlock.h"
9
10 SkPurgeableMemoryBlock* SkPurgeableMemoryBlock::CreatePurgeableMemoryBlock(size_ t size) {
11 SkASSERT(PlatformSupportsPurgeableMemory());
12 if (!PlatformSupportsPurgeableMemory()) {
13 return NULL;
14 }
15 SkPurgeableMemoryBlock* block = SkNEW_ARGS(SkPurgeableMemoryBlock, (size));
16 if (block->fPinned) {
17 return block;
18 }
19
20 SkDELETE(block);
21 return NULL;
22 }
23
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698