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 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 drawState()->setDefaultVertexAttribs(); | 397 drawState()->setDefaultVertexAttribs(); |
398 | 398 |
399 GrDrawState::AutoRestoreEffects are; | 399 GrDrawState::AutoRestoreEffects are; |
400 if (!this->setupClipAndFlushState(kDrawPath_DrawType, dstCopy, &are, NULL))
{ | 400 if (!this->setupClipAndFlushState(kDrawPath_DrawType, dstCopy, &are, NULL))
{ |
401 return; | 401 return; |
402 } | 402 } |
403 | 403 |
404 this->onGpuDrawPath(path, fill); | 404 this->onGpuDrawPath(path, fill); |
405 } | 405 } |
406 | 406 |
407 void GrGpu::onDrawPaths(size_t pathCount, const GrPath** paths, | 407 void GrGpu::onDrawPaths(int pathCount, const GrPath** paths, |
408 const SkMatrix* transforms, SkPath::FillType fill, | 408 const SkMatrix* transforms, SkPath::FillType fill, |
409 SkStrokeRec::Style style, | 409 SkStrokeRec::Style style, |
410 const GrDeviceCoordTexture* dstCopy) { | 410 const GrDeviceCoordTexture* dstCopy) { |
411 this->handleDirtyContext(); | 411 this->handleDirtyContext(); |
412 | 412 |
413 drawState()->setDefaultVertexAttribs(); | 413 drawState()->setDefaultVertexAttribs(); |
414 | 414 |
415 GrDrawState::AutoRestoreEffects are; | 415 GrDrawState::AutoRestoreEffects are; |
416 if (!this->setupClipAndFlushState(kDrawPaths_DrawType, dstCopy, &are, NULL))
{ | 416 if (!this->setupClipAndFlushState(kDrawPaths_DrawType, dstCopy, &are, NULL))
{ |
417 return; | 417 return; |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
550 } | 550 } |
551 | 551 |
552 void GrGpu::releaseIndexArray() { | 552 void GrGpu::releaseIndexArray() { |
553 // if index source was array, we stowed data in the pool | 553 // if index source was array, we stowed data in the pool |
554 const GeometrySrcState& geoSrc = this->getGeomSrc(); | 554 const GeometrySrcState& geoSrc = this->getGeomSrc(); |
555 SkASSERT(kArray_GeometrySrcType == geoSrc.fIndexSrc); | 555 SkASSERT(kArray_GeometrySrcType == geoSrc.fIndexSrc); |
556 size_t bytes = geoSrc.fIndexCount * sizeof(uint16_t); | 556 size_t bytes = geoSrc.fIndexCount * sizeof(uint16_t); |
557 fIndexPool->putBack(bytes); | 557 fIndexPool->putBack(bytes); |
558 --fIndexPoolUseCnt; | 558 --fIndexPoolUseCnt; |
559 } | 559 } |
OLD | NEW |