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

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

Issue 23904003: Remove GrRefCnt.h in favor of SkRefCnt.h (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rm GrRefCnt.h Created 7 years, 3 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
« no previous file with comments | « src/gpu/GrGpu.h ('k') | src/gpu/GrInOrderDrawBuffer.h » ('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 2010 Google Inc. 3 * Copyright 2010 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 "GrGpu.h" 10 #include "GrGpu.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 void GrGpu::abandonResources() { 60 void GrGpu::abandonResources() {
61 61
62 fClipMaskManager.releaseResources(); 62 fClipMaskManager.releaseResources();
63 63
64 while (NULL != fResourceList.head()) { 64 while (NULL != fResourceList.head()) {
65 fResourceList.head()->abandon(); 65 fResourceList.head()->abandon();
66 } 66 }
67 67
68 SkASSERT(NULL == fQuadIndexBuffer || !fQuadIndexBuffer->isValid()); 68 SkASSERT(NULL == fQuadIndexBuffer || !fQuadIndexBuffer->isValid());
69 GrSafeSetNull(fQuadIndexBuffer); 69 SkSafeSetNull(fQuadIndexBuffer);
70 delete fVertexPool; 70 delete fVertexPool;
71 fVertexPool = NULL; 71 fVertexPool = NULL;
72 delete fIndexPool; 72 delete fIndexPool;
73 fIndexPool = NULL; 73 fIndexPool = NULL;
74 } 74 }
75 75
76 void GrGpu::releaseResources() { 76 void GrGpu::releaseResources() {
77 77
78 fClipMaskManager.releaseResources(); 78 fClipMaskManager.releaseResources();
79 79
80 while (NULL != fResourceList.head()) { 80 while (NULL != fResourceList.head()) {
81 fResourceList.head()->release(); 81 fResourceList.head()->release();
82 } 82 }
83 83
84 SkASSERT(NULL == fQuadIndexBuffer || !fQuadIndexBuffer->isValid()); 84 SkASSERT(NULL == fQuadIndexBuffer || !fQuadIndexBuffer->isValid());
85 GrSafeSetNull(fQuadIndexBuffer); 85 SkSafeSetNull(fQuadIndexBuffer);
86 delete fVertexPool; 86 delete fVertexPool;
87 fVertexPool = NULL; 87 fVertexPool = NULL;
88 delete fIndexPool; 88 delete fIndexPool;
89 fIndexPool = NULL; 89 fIndexPool = NULL;
90 } 90 }
91 91
92 void GrGpu::insertResource(GrResource* resource) { 92 void GrGpu::insertResource(GrResource* resource) {
93 SkASSERT(NULL != resource); 93 SkASSERT(NULL != resource);
94 SkASSERT(this == resource->getGpu()); 94 SkASSERT(this == resource->getGpu());
95 95
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 } 491 }
492 492
493 void GrGpu::releaseIndexArray() { 493 void GrGpu::releaseIndexArray() {
494 // if index source was array, we stowed data in the pool 494 // if index source was array, we stowed data in the pool
495 const GeometrySrcState& geoSrc = this->getGeomSrc(); 495 const GeometrySrcState& geoSrc = this->getGeomSrc();
496 SkASSERT(kArray_GeometrySrcType == geoSrc.fIndexSrc); 496 SkASSERT(kArray_GeometrySrcType == geoSrc.fIndexSrc);
497 size_t bytes = geoSrc.fIndexCount * sizeof(uint16_t); 497 size_t bytes = geoSrc.fIndexCount * sizeof(uint16_t);
498 fIndexPool->putBack(bytes); 498 fIndexPool->putBack(bytes);
499 --fIndexPoolUseCnt; 499 --fIndexPoolUseCnt;
500 } 500 }
OLDNEW
« no previous file with comments | « src/gpu/GrGpu.h ('k') | src/gpu/GrInOrderDrawBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698