| 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 } | 204 } |
| 205 | 205 |
| 206 void GrGpu::clear(const SkIRect* rect, | 206 void GrGpu::clear(const SkIRect* rect, |
| 207 GrColor color, | 207 GrColor color, |
| 208 GrRenderTarget* renderTarget) { | 208 GrRenderTarget* renderTarget) { |
| 209 GrDrawState::AutoRenderTargetRestore art; | 209 GrDrawState::AutoRenderTargetRestore art; |
| 210 if (NULL != renderTarget) { | 210 if (NULL != renderTarget) { |
| 211 art.set(this->drawState(), renderTarget); | 211 art.set(this->drawState(), renderTarget); |
| 212 } | 212 } |
| 213 if (NULL == this->getDrawState().getRenderTarget()) { | 213 if (NULL == this->getDrawState().getRenderTarget()) { |
| 214 GrAssert(0); |
| 214 return; | 215 return; |
| 215 } | 216 } |
| 216 this->handleDirtyContext(); | 217 this->handleDirtyContext(); |
| 217 this->onClear(rect, color); | 218 this->onClear(rect, color); |
| 218 } | 219 } |
| 219 | 220 |
| 220 void GrGpu::forceRenderTargetFlush() { | 221 void GrGpu::forceRenderTargetFlush() { |
| 221 this->handleDirtyContext(); | 222 this->handleDirtyContext(); |
| 222 this->onForceRenderTargetFlush(); | 223 this->onForceRenderTargetFlush(); |
| 223 } | 224 } |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 490 } | 491 } |
| 491 | 492 |
| 492 void GrGpu::releaseIndexArray() { | 493 void GrGpu::releaseIndexArray() { |
| 493 // if index source was array, we stowed data in the pool | 494 // if index source was array, we stowed data in the pool |
| 494 const GeometrySrcState& geoSrc = this->getGeomSrc(); | 495 const GeometrySrcState& geoSrc = this->getGeomSrc(); |
| 495 GrAssert(kArray_GeometrySrcType == geoSrc.fIndexSrc); | 496 GrAssert(kArray_GeometrySrcType == geoSrc.fIndexSrc); |
| 496 size_t bytes = geoSrc.fIndexCount * sizeof(uint16_t); | 497 size_t bytes = geoSrc.fIndexCount * sizeof(uint16_t); |
| 497 fIndexPool->putBack(bytes); | 498 fIndexPool->putBack(bytes); |
| 498 --fIndexPoolUseCnt; | 499 --fIndexPoolUseCnt; |
| 499 } | 500 } |
| OLD | NEW |