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

Side by Side Diff: src/gpu/GrResource.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/gpu/GrRenderTarget.cpp ('k') | src/gpu/GrStencilBuffer.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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "GrResource.h" 10 #include "GrResource.h"
11 #include "GrGpu.h" 11 #include "GrGpu.h"
12 12
13 SK_DEFINE_INST_COUNT(GrResource)
14
15 GrResource::GrResource(GrGpu* gpu, bool isWrapped) { 13 GrResource::GrResource(GrGpu* gpu, bool isWrapped) {
16 fGpu = gpu; 14 fGpu = gpu;
17 fCacheEntry = NULL; 15 fCacheEntry = NULL;
18 fDeferredRefCount = 0; 16 fDeferredRefCount = 0;
19 if (isWrapped) { 17 if (isWrapped) {
20 fFlags = kWrapped_FlagBit; 18 fFlags = kWrapped_FlagBit;
21 } else { 19 } else {
22 fFlags = 0; 20 fFlags = 0;
23 } 21 }
24 fGpu->insertResource(this); 22 fGpu->insertResource(this);
(...skipping 29 matching lines...) Expand all
54 } 52 }
55 } 53 }
56 54
57 GrContext* GrResource::getContext() { 55 GrContext* GrResource::getContext() {
58 if (NULL != fGpu) { 56 if (NULL != fGpu) {
59 return fGpu->getContext(); 57 return fGpu->getContext();
60 } else { 58 } else {
61 return NULL; 59 return NULL;
62 } 60 }
63 } 61 }
OLDNEW
« no previous file with comments | « src/gpu/GrRenderTarget.cpp ('k') | src/gpu/GrStencilBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698