| 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 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 SkPath::FillType fill, const GrDeviceCoordTexture* dstCo
py) { | 371 SkPath::FillType fill, const GrDeviceCoordTexture* dstCo
py) { |
| 372 this->handleDirtyContext(); | 372 this->handleDirtyContext(); |
| 373 | 373 |
| 374 drawState()->setDefaultVertexAttribs(); | 374 drawState()->setDefaultVertexAttribs(); |
| 375 | 375 |
| 376 GrDrawState::AutoRestoreEffects are; | 376 GrDrawState::AutoRestoreEffects are; |
| 377 if (!this->setupClipAndFlushState(kDrawPaths_DrawType, dstCopy, &are, NULL))
{ | 377 if (!this->setupClipAndFlushState(kDrawPaths_DrawType, dstCopy, &are, NULL))
{ |
| 378 return; | 378 return; |
| 379 } | 379 } |
| 380 | 380 |
| 381 pathRange->willDrawPaths(indices, count); |
| 381 this->pathRendering()->drawPaths(pathRange, indices, count, transforms, tran
sformsType, fill); | 382 this->pathRendering()->drawPaths(pathRange, indices, count, transforms, tran
sformsType, fill); |
| 382 } | 383 } |
| 383 | 384 |
| 384 void GrGpu::finalizeReservedVertices() { | 385 void GrGpu::finalizeReservedVertices() { |
| 385 SkASSERT(fVertexPool); | 386 SkASSERT(fVertexPool); |
| 386 fVertexPool->unmap(); | 387 fVertexPool->unmap(); |
| 387 } | 388 } |
| 388 | 389 |
| 389 void GrGpu::finalizeReservedIndices() { | 390 void GrGpu::finalizeReservedIndices() { |
| 390 SkASSERT(fIndexPool); | 391 SkASSERT(fIndexPool); |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 511 } | 512 } |
| 512 | 513 |
| 513 void GrGpu::releaseIndexArray() { | 514 void GrGpu::releaseIndexArray() { |
| 514 // if index source was array, we stowed data in the pool | 515 // if index source was array, we stowed data in the pool |
| 515 const GeometrySrcState& geoSrc = this->getGeomSrc(); | 516 const GeometrySrcState& geoSrc = this->getGeomSrc(); |
| 516 SkASSERT(kArray_GeometrySrcType == geoSrc.fIndexSrc); | 517 SkASSERT(kArray_GeometrySrcType == geoSrc.fIndexSrc); |
| 517 size_t bytes = geoSrc.fIndexCount * sizeof(uint16_t); | 518 size_t bytes = geoSrc.fIndexCount * sizeof(uint16_t); |
| 518 fIndexPool->putBack(bytes); | 519 fIndexPool->putBack(bytes); |
| 519 --fIndexPoolUseCnt; | 520 --fIndexPoolUseCnt; |
| 520 } | 521 } |
| OLD | NEW |