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 391 matching lines...) Loading... |
402 drawState()->setDefaultVertexAttribs(); | 402 drawState()->setDefaultVertexAttribs(); |
403 | 403 |
404 GrDrawState::AutoRestoreEffects are; | 404 GrDrawState::AutoRestoreEffects are; |
405 if (!this->setupClipAndFlushState(kDrawPath_DrawType, dstCopy, &are, NULL))
{ | 405 if (!this->setupClipAndFlushState(kDrawPath_DrawType, dstCopy, &are, NULL))
{ |
406 return; | 406 return; |
407 } | 407 } |
408 | 408 |
409 this->onGpuDrawPath(path, fill); | 409 this->onGpuDrawPath(path, fill); |
410 } | 410 } |
411 | 411 |
| 412 void GrGpu::onDrawPaths(size_t pathCount, const GrPath** paths, |
| 413 const SkMatrix* transforms, SkPath::FillType fill, |
| 414 SkStrokeRec::Style style, |
| 415 const GrDeviceCoordTexture* dstCopy) { |
| 416 this->handleDirtyContext(); |
| 417 |
| 418 drawState()->setDefaultVertexAttribs(); |
| 419 |
| 420 GrDrawState::AutoRestoreEffects are; |
| 421 if (!this->setupClipAndFlushState(kDrawPaths_DrawType, dstCopy, &are, NULL))
{ |
| 422 return; |
| 423 } |
| 424 |
| 425 this->onGpuDrawPaths(pathCount, paths, transforms, fill, style); |
| 426 } |
| 427 |
412 void GrGpu::finalizeReservedVertices() { | 428 void GrGpu::finalizeReservedVertices() { |
413 SkASSERT(NULL != fVertexPool); | 429 SkASSERT(NULL != fVertexPool); |
414 fVertexPool->unlock(); | 430 fVertexPool->unlock(); |
415 } | 431 } |
416 | 432 |
417 void GrGpu::finalizeReservedIndices() { | 433 void GrGpu::finalizeReservedIndices() { |
418 SkASSERT(NULL != fIndexPool); | 434 SkASSERT(NULL != fIndexPool); |
419 fIndexPool->unlock(); | 435 fIndexPool->unlock(); |
420 } | 436 } |
421 | 437 |
(...skipping 117 matching lines...) Loading... |
539 } | 555 } |
540 | 556 |
541 void GrGpu::releaseIndexArray() { | 557 void GrGpu::releaseIndexArray() { |
542 // if index source was array, we stowed data in the pool | 558 // if index source was array, we stowed data in the pool |
543 const GeometrySrcState& geoSrc = this->getGeomSrc(); | 559 const GeometrySrcState& geoSrc = this->getGeomSrc(); |
544 SkASSERT(kArray_GeometrySrcType == geoSrc.fIndexSrc); | 560 SkASSERT(kArray_GeometrySrcType == geoSrc.fIndexSrc); |
545 size_t bytes = geoSrc.fIndexCount * sizeof(uint16_t); | 561 size_t bytes = geoSrc.fIndexCount * sizeof(uint16_t); |
546 fIndexPool->putBack(bytes); | 562 fIndexPool->putBack(bytes); |
547 --fIndexPoolUseCnt; | 563 --fIndexPoolUseCnt; |
548 } | 564 } |
OLD | NEW |