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

Side by Side Diff: src/gpu/GrGpuObject.cpp

Issue 413523002: Remove unused enum value and member of GrGpuObject (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 5 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 | « include/gpu/GrGpuObject.h ('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 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 "GrGpuObject.h" 10 #include "GrGpuObject.h"
11 #include "GrGpu.h" 11 #include "GrGpu.h"
12 12
13 GrGpuObject::GrGpuObject(GrGpu* gpu, bool isWrapped) { 13 GrGpuObject::GrGpuObject(GrGpu* gpu, bool isWrapped) {
14 fGpu = gpu; 14 fGpu = gpu;
15 fDeferredRefCount = 0;
16 if (isWrapped) { 15 if (isWrapped) {
17 fFlags = kWrapped_FlagBit; 16 fFlags = kWrapped_FlagBit;
18 } else { 17 } else {
19 fFlags = 0; 18 fFlags = 0;
20 } 19 }
21 fGpu->insertObject(this); 20 fGpu->insertObject(this);
22 } 21 }
23 22
24 GrGpuObject::~GrGpuObject() { 23 GrGpuObject::~GrGpuObject() {
25 // subclass should have released this. 24 // subclass should have released this.
26 SkASSERT(0 == fDeferredRefCount);
27 SkASSERT(this->wasDestroyed()); 25 SkASSERT(this->wasDestroyed());
28 } 26 }
29 27
30 void GrGpuObject::release() { 28 void GrGpuObject::release() {
31 if (NULL != fGpu) { 29 if (NULL != fGpu) {
32 this->onRelease(); 30 this->onRelease();
33 fGpu->removeObject(this); 31 fGpu->removeObject(this);
34 fGpu = NULL; 32 fGpu = NULL;
35 } 33 }
36 } 34 }
(...skipping 14 matching lines...) Expand all
51 } 49 }
52 } 50 }
53 51
54 GrContext* GrGpuObject::getContext() { 52 GrContext* GrGpuObject::getContext() {
55 if (NULL != fGpu) { 53 if (NULL != fGpu) {
56 return fGpu->getContext(); 54 return fGpu->getContext();
57 } else { 55 } else {
58 return NULL; 56 return NULL;
59 } 57 }
60 } 58 }
OLDNEW
« no previous file with comments | « include/gpu/GrGpuObject.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698