| 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 29 matching lines...) Expand all Loading... |
| 40 fClipMaskManager.setGpu(this); | 40 fClipMaskManager.setGpu(this); |
| 41 | 41 |
| 42 fGeomPoolStateStack.push_back(); | 42 fGeomPoolStateStack.push_back(); |
| 43 #ifdef SK_DEBUG | 43 #ifdef SK_DEBUG |
| 44 GeometryPoolState& poolState = fGeomPoolStateStack.back(); | 44 GeometryPoolState& poolState = fGeomPoolStateStack.back(); |
| 45 poolState.fPoolVertexBuffer = (GrVertexBuffer*)DEBUG_INVAL_BUFFER; | 45 poolState.fPoolVertexBuffer = (GrVertexBuffer*)DEBUG_INVAL_BUFFER; |
| 46 poolState.fPoolStartVertex = DEBUG_INVAL_START_IDX; | 46 poolState.fPoolStartVertex = DEBUG_INVAL_START_IDX; |
| 47 poolState.fPoolIndexBuffer = (GrIndexBuffer*)DEBUG_INVAL_BUFFER; | 47 poolState.fPoolIndexBuffer = (GrIndexBuffer*)DEBUG_INVAL_BUFFER; |
| 48 poolState.fPoolStartIndex = DEBUG_INVAL_START_IDX; | 48 poolState.fPoolStartIndex = DEBUG_INVAL_START_IDX; |
| 49 #endif | 49 #endif |
| 50 | |
| 51 for (int i = 0; i < kGrPixelConfigCnt; ++i) { | |
| 52 fConfigRenderSupport[i] = false; | |
| 53 }; | |
| 54 } | 50 } |
| 55 | 51 |
| 56 GrGpu::~GrGpu() { | 52 GrGpu::~GrGpu() { |
| 57 this->releaseResources(); | 53 this->releaseResources(); |
| 58 } | 54 } |
| 59 | 55 |
| 60 void GrGpu::abandonResources() { | 56 void GrGpu::abandonResources() { |
| 61 | 57 |
| 62 fClipMaskManager.releaseResources(); | 58 fClipMaskManager.releaseResources(); |
| 63 | 59 |
| (...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 538 } | 534 } |
| 539 | 535 |
| 540 void GrGpu::releaseIndexArray() { | 536 void GrGpu::releaseIndexArray() { |
| 541 // if index source was array, we stowed data in the pool | 537 // if index source was array, we stowed data in the pool |
| 542 const GeometrySrcState& geoSrc = this->getGeomSrc(); | 538 const GeometrySrcState& geoSrc = this->getGeomSrc(); |
| 543 SkASSERT(kArray_GeometrySrcType == geoSrc.fIndexSrc); | 539 SkASSERT(kArray_GeometrySrcType == geoSrc.fIndexSrc); |
| 544 size_t bytes = geoSrc.fIndexCount * sizeof(uint16_t); | 540 size_t bytes = geoSrc.fIndexCount * sizeof(uint16_t); |
| 545 fIndexPool->putBack(bytes); | 541 fIndexPool->putBack(bytes); |
| 546 --fIndexPoolUseCnt; | 542 --fIndexPoolUseCnt; |
| 547 } | 543 } |
| OLD | NEW |