Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(569)

Side by Side Diff: src/gpu/GrGpu.cpp

Issue 209413006: Make it possible to draw multiple paths at once to a draw target (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: address review comment Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/gpu/GrGpu.h ('k') | src/gpu/GrInOrderDrawBuffer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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...) Expand 10 before | Expand all | Expand 10 after
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...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW
« no previous file with comments | « src/gpu/GrGpu.h ('k') | src/gpu/GrInOrderDrawBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698