| 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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 SkFAIL("Can't get indices into buffer!"); | 187 SkFAIL("Can't get indices into buffer!"); |
| 188 } | 188 } |
| 189 SkDELETE_ARRAY(data); | 189 SkDELETE_ARRAY(data); |
| 190 } else { | 190 } else { |
| 191 buffer->unmap(); | 191 buffer->unmap(); |
| 192 } | 192 } |
| 193 } | 193 } |
| 194 return buffer; | 194 return buffer; |
| 195 } | 195 } |
| 196 | 196 |
| 197 void GrGpu::clear(const SkIRect* rect, | 197 void GrGpu::onClear(const SkIRect* rect, |
| 198 GrColor color, | 198 GrColor color, |
| 199 bool canIgnoreRect, | 199 bool canIgnoreRect, |
| 200 GrRenderTarget* renderTarget) { | 200 GrRenderTarget* renderTarget) { |
| 201 SkASSERT(renderTarget); | 201 SkASSERT(renderTarget); |
| 202 this->handleDirtyContext(); | 202 this->handleDirtyContext(); |
| 203 this->onClear(renderTarget, rect, color, canIgnoreRect); | 203 this->onGpuClear(renderTarget, rect, color, canIgnoreRect); |
| 204 } | 204 } |
| 205 | 205 |
| 206 void GrGpu::clearStencilClip(const SkIRect& rect, | 206 void GrGpu::clearStencilClip(const SkIRect& rect, |
| 207 bool insideClip, | 207 bool insideClip, |
| 208 GrRenderTarget* renderTarget) { | 208 GrRenderTarget* renderTarget) { |
| 209 if (NULL == renderTarget) { | 209 if (NULL == renderTarget) { |
| 210 renderTarget = this->getDrawState().getRenderTarget(); | 210 renderTarget = this->getDrawState().getRenderTarget(); |
| 211 } | 211 } |
| 212 if (NULL == renderTarget) { | 212 if (NULL == renderTarget) { |
| 213 SkASSERT(0); | 213 SkASSERT(0); |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 --fVertexPoolUseCnt; | 505 --fVertexPoolUseCnt; |
| 506 } | 506 } |
| 507 | 507 |
| 508 void GrGpu::releaseReservedIndexSpace() { | 508 void GrGpu::releaseReservedIndexSpace() { |
| 509 const GeometrySrcState& geoSrc = this->getGeomSrc(); | 509 const GeometrySrcState& geoSrc = this->getGeomSrc(); |
| 510 SkASSERT(kReserved_GeometrySrcType == geoSrc.fIndexSrc); | 510 SkASSERT(kReserved_GeometrySrcType == geoSrc.fIndexSrc); |
| 511 size_t bytes = geoSrc.fIndexCount * sizeof(uint16_t); | 511 size_t bytes = geoSrc.fIndexCount * sizeof(uint16_t); |
| 512 fIndexPool->putBack(bytes); | 512 fIndexPool->putBack(bytes); |
| 513 --fIndexPoolUseCnt; | 513 --fIndexPoolUseCnt; |
| 514 } | 514 } |
| OLD | NEW |