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

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

Issue 98703002: Fix compilation with SK_ENABLE_INST_COUNT=1 (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years 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
« no previous file with comments | « src/images/SkMovie.cpp ('k') | src/lazy/SkLruImageCache.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkBitmapFactory.h" 8 #include "SkBitmapFactory.h"
9 9
10 #include "SkBitmap.h" 10 #include "SkBitmap.h"
11 #include "SkData.h" 11 #include "SkData.h"
12 #include "SkImageCache.h" 12 #include "SkImageCache.h"
13 #include "SkImagePriv.h" 13 #include "SkImagePriv.h"
14 #include "SkLazyPixelRef.h" 14 #include "SkLazyPixelRef.h"
15 15
16 SK_DEFINE_INST_COUNT(SkBitmapFactory::CacheSelector)
17
18 SkBitmapFactory::SkBitmapFactory(SkBitmapFactory::DecodeProc proc) 16 SkBitmapFactory::SkBitmapFactory(SkBitmapFactory::DecodeProc proc)
19 : fDecodeProc(proc) 17 : fDecodeProc(proc)
20 , fImageCache(NULL) 18 , fImageCache(NULL)
21 , fCacheSelector(NULL) { 19 , fCacheSelector(NULL) {
22 SkASSERT(fDecodeProc != NULL); 20 SkASSERT(fDecodeProc != NULL);
23 } 21 }
24 22
25 SkBitmapFactory::~SkBitmapFactory() { 23 SkBitmapFactory::~SkBitmapFactory() {
26 SkSafeUnref(fImageCache); 24 SkSafeUnref(fImageCache);
27 SkSafeUnref(fCacheSelector); 25 SkSafeUnref(fCacheSelector);
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 SkAutoTUnref<SkLazyPixelRef> lazyRef(SkNEW_ARGS(SkLazyPixelRef, 69 SkAutoTUnref<SkLazyPixelRef> lazyRef(SkNEW_ARGS(SkLazyPixelRef,
72 (data, fDecodeProc, cach e))); 70 (data, fDecodeProc, cach e)));
73 dst->setPixelRef(lazyRef); 71 dst->setPixelRef(lazyRef);
74 return true; 72 return true;
75 } else { 73 } else {
76 dst->allocPixels(); 74 dst->allocPixels();
77 target.fAddr = dst->getPixels(); 75 target.fAddr = dst->getPixels();
78 return fDecodeProc(data->data(), data->size(), &info, &target); 76 return fDecodeProc(data->data(), data->size(), &info, &target);
79 } 77 }
80 } 78 }
OLDNEW
« no previous file with comments | « src/images/SkMovie.cpp ('k') | src/lazy/SkLruImageCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698