| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 | 42 |
| 43 fGeomPoolStateStack.push_back(); | 43 fGeomPoolStateStack.push_back(); |
| 44 #if GR_DEBUG | 44 #if GR_DEBUG |
| 45 GeometryPoolState& poolState = fGeomPoolStateStack.back(); | 45 GeometryPoolState& poolState = fGeomPoolStateStack.back(); |
| 46 poolState.fPoolVertexBuffer = (GrVertexBuffer*)DEBUG_INVAL_BUFFER; | 46 poolState.fPoolVertexBuffer = (GrVertexBuffer*)DEBUG_INVAL_BUFFER; |
| 47 poolState.fPoolStartVertex = DEBUG_INVAL_START_IDX; | 47 poolState.fPoolStartVertex = DEBUG_INVAL_START_IDX; |
| 48 poolState.fPoolIndexBuffer = (GrIndexBuffer*)DEBUG_INVAL_BUFFER; | 48 poolState.fPoolIndexBuffer = (GrIndexBuffer*)DEBUG_INVAL_BUFFER; |
| 49 poolState.fPoolStartIndex = DEBUG_INVAL_START_IDX; | 49 poolState.fPoolStartIndex = DEBUG_INVAL_START_IDX; |
| 50 #endif | 50 #endif |
| 51 | 51 |
| 52 for (int i = 0; i < kGrPixelConfigCount; ++i) { | 52 for (int i = 0; i < kGrPixelConfigCnt; ++i) { |
| 53 fConfigRenderSupport[i] = false; | 53 fConfigRenderSupport[i] = false; |
| 54 }; | 54 }; |
| 55 } | 55 } |
| 56 | 56 |
| 57 GrGpu::~GrGpu() { | 57 GrGpu::~GrGpu() { |
| 58 this->releaseResources(); | 58 this->releaseResources(); |
| 59 } | 59 } |
| 60 | 60 |
| 61 void GrGpu::abandonResources() { | 61 void GrGpu::abandonResources() { |
| 62 | 62 |
| (...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 524 } | 524 } |
| 525 | 525 |
| 526 void GrGpu::releaseIndexArray() { | 526 void GrGpu::releaseIndexArray() { |
| 527 // if index source was array, we stowed data in the pool | 527 // if index source was array, we stowed data in the pool |
| 528 const GeometrySrcState& geoSrc = this->getGeomSrc(); | 528 const GeometrySrcState& geoSrc = this->getGeomSrc(); |
| 529 GrAssert(kArray_GeometrySrcType == geoSrc.fIndexSrc); | 529 GrAssert(kArray_GeometrySrcType == geoSrc.fIndexSrc); |
| 530 size_t bytes = geoSrc.fIndexCount * sizeof(uint16_t); | 530 size_t bytes = geoSrc.fIndexCount * sizeof(uint16_t); |
| 531 fIndexPool->putBack(bytes); | 531 fIndexPool->putBack(bytes); |
| 532 --fIndexPoolUseCnt; | 532 --fIndexPoolUseCnt; |
| 533 } | 533 } |
| OLD | NEW |