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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 this->handleDirtyContext(); | 196 this->handleDirtyContext(); |
197 return this->onCreateIndexBuffer(size, dynamic); | 197 return this->onCreateIndexBuffer(size, dynamic); |
198 } | 198 } |
199 | 199 |
200 GrPath* GrGpu::createPath(const SkPath& path) { | 200 GrPath* GrGpu::createPath(const SkPath& path) { |
201 GrAssert(this->caps()->pathStencilingSupport()); | 201 GrAssert(this->caps()->pathStencilingSupport()); |
202 this->handleDirtyContext(); | 202 this->handleDirtyContext(); |
203 return this->onCreatePath(path); | 203 return this->onCreatePath(path); |
204 } | 204 } |
205 | 205 |
206 void GrGpu::clear(const GrIRect* 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 return; | 214 return; |
215 } | 215 } |
216 this->handleDirtyContext(); | 216 this->handleDirtyContext(); |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
490 } | 490 } |
491 | 491 |
492 void GrGpu::releaseIndexArray() { | 492 void GrGpu::releaseIndexArray() { |
493 // if index source was array, we stowed data in the pool | 493 // if index source was array, we stowed data in the pool |
494 const GeometrySrcState& geoSrc = this->getGeomSrc(); | 494 const GeometrySrcState& geoSrc = this->getGeomSrc(); |
495 GrAssert(kArray_GeometrySrcType == geoSrc.fIndexSrc); | 495 GrAssert(kArray_GeometrySrcType == geoSrc.fIndexSrc); |
496 size_t bytes = geoSrc.fIndexCount * sizeof(uint16_t); | 496 size_t bytes = geoSrc.fIndexCount * sizeof(uint16_t); |
497 fIndexPool->putBack(bytes); | 497 fIndexPool->putBack(bytes); |
498 --fIndexPoolUseCnt; | 498 --fIndexPoolUseCnt; |
499 } | 499 } |
OLD | NEW |