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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 this->handleDirtyContext(); | 197 this->handleDirtyContext(); |
198 return this->onCreateVertexBuffer(size, dynamic); | 198 return this->onCreateVertexBuffer(size, dynamic); |
199 } | 199 } |
200 | 200 |
201 GrIndexBuffer* GrGpu::createIndexBuffer(uint32_t size, bool dynamic) { | 201 GrIndexBuffer* GrGpu::createIndexBuffer(uint32_t size, bool dynamic) { |
202 this->handleDirtyContext(); | 202 this->handleDirtyContext(); |
203 return this->onCreateIndexBuffer(size, dynamic); | 203 return this->onCreateIndexBuffer(size, dynamic); |
204 } | 204 } |
205 | 205 |
206 GrPath* GrGpu::createPath(const SkPath& path) { | 206 GrPath* GrGpu::createPath(const SkPath& path) { |
207 GrAssert(fCaps.pathStencilingSupport()); | 207 GrAssert(this->caps()->pathStencilingSupport()); |
208 this->handleDirtyContext(); | 208 this->handleDirtyContext(); |
209 return this->onCreatePath(path); | 209 return this->onCreatePath(path); |
210 } | 210 } |
211 | 211 |
212 void GrGpu::clear(const GrIRect* rect, | 212 void GrGpu::clear(const GrIRect* rect, |
213 GrColor color, | 213 GrColor color, |
214 GrRenderTarget* renderTarget) { | 214 GrRenderTarget* renderTarget) { |
215 GrDrawState::AutoRenderTargetRestore art; | 215 GrDrawState::AutoRenderTargetRestore art; |
216 if (NULL != renderTarget) { | 216 if (NULL != renderTarget) { |
217 art.set(this->drawState(), renderTarget); | 217 art.set(this->drawState(), renderTarget); |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
523 } | 523 } |
524 | 524 |
525 void GrGpu::releaseIndexArray() { | 525 void GrGpu::releaseIndexArray() { |
526 // if index source was array, we stowed data in the pool | 526 // if index source was array, we stowed data in the pool |
527 const GeometrySrcState& geoSrc = this->getGeomSrc(); | 527 const GeometrySrcState& geoSrc = this->getGeomSrc(); |
528 GrAssert(kArray_GeometrySrcType == geoSrc.fIndexSrc); | 528 GrAssert(kArray_GeometrySrcType == geoSrc.fIndexSrc); |
529 size_t bytes = geoSrc.fIndexCount * sizeof(uint16_t); | 529 size_t bytes = geoSrc.fIndexCount * sizeof(uint16_t); |
530 fIndexPool->putBack(bytes); | 530 fIndexPool->putBack(bytes); |
531 --fIndexPoolUseCnt; | 531 --fIndexPoolUseCnt; |
532 } | 532 } |
OLD | NEW |