| OLD | NEW |
| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 } | 78 } |
| 79 | 79 |
| 80 SkASSERT(NULL == fQuadIndexBuffer || fQuadIndexBuffer->wasDestroyed()); | 80 SkASSERT(NULL == fQuadIndexBuffer || fQuadIndexBuffer->wasDestroyed()); |
| 81 SkSafeSetNull(fQuadIndexBuffer); | 81 SkSafeSetNull(fQuadIndexBuffer); |
| 82 delete fVertexPool; | 82 delete fVertexPool; |
| 83 fVertexPool = NULL; | 83 fVertexPool = NULL; |
| 84 delete fIndexPool; | 84 delete fIndexPool; |
| 85 fIndexPool = NULL; | 85 fIndexPool = NULL; |
| 86 } | 86 } |
| 87 | 87 |
| 88 void GrGpu::insertObject(GrGpuObject* object) { | 88 void GrGpu::insertObject(GrGpuResource* object) { |
| 89 SkASSERT(NULL != object); | 89 SkASSERT(NULL != object); |
| 90 SkASSERT(this == object->getGpu()); | 90 SkASSERT(this == object->getGpu()); |
| 91 | 91 |
| 92 fObjectList.addToHead(object); | 92 fObjectList.addToHead(object); |
| 93 } | 93 } |
| 94 | 94 |
| 95 void GrGpu::removeObject(GrGpuObject* object) { | 95 void GrGpu::removeObject(GrGpuResource* object) { |
| 96 SkASSERT(NULL != object); | 96 SkASSERT(NULL != object); |
| 97 SkASSERT(this == object->getGpu()); | 97 SkASSERT(this == object->getGpu()); |
| 98 | 98 |
| 99 fObjectList.remove(object); | 99 fObjectList.remove(object); |
| 100 } | 100 } |
| 101 | 101 |
| 102 | 102 |
| 103 void GrGpu::unimpl(const char msg[]) { | 103 void GrGpu::unimpl(const char msg[]) { |
| 104 #ifdef SK_DEBUG | 104 #ifdef SK_DEBUG |
| 105 GrPrintf("--- GrGpu unimplemented(\"%s\")\n", msg); | 105 GrPrintf("--- GrGpu unimplemented(\"%s\")\n", msg); |
| (...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 571 } | 571 } |
| 572 | 572 |
| 573 void GrGpu::releaseIndexArray() { | 573 void GrGpu::releaseIndexArray() { |
| 574 // if index source was array, we stowed data in the pool | 574 // if index source was array, we stowed data in the pool |
| 575 const GeometrySrcState& geoSrc = this->getGeomSrc(); | 575 const GeometrySrcState& geoSrc = this->getGeomSrc(); |
| 576 SkASSERT(kArray_GeometrySrcType == geoSrc.fIndexSrc); | 576 SkASSERT(kArray_GeometrySrcType == geoSrc.fIndexSrc); |
| 577 size_t bytes = geoSrc.fIndexCount * sizeof(uint16_t); | 577 size_t bytes = geoSrc.fIndexCount * sizeof(uint16_t); |
| 578 fIndexPool->putBack(bytes); | 578 fIndexPool->putBack(bytes); |
| 579 --fIndexPoolUseCnt; | 579 --fIndexPoolUseCnt; |
| 580 } | 580 } |
| OLD | NEW |