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

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

Issue 216293006: Use int rather than size_t for pathCount in GrDrawTarget::drawPaths (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: loop counters Created 6 years, 8 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 | Annotate | Revision Log
« 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 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
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