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

Side by Side Diff: src/gpu/GrDrawTarget.h

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 | « no previous file | src/gpu/GrDrawTarget.cpp » ('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 * Copyright 2010 Google Inc. 2 * Copyright 2010 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef GrDrawTarget_DEFINED 8 #ifndef GrDrawTarget_DEFINED
9 #define GrDrawTarget_DEFINED 9 #define GrDrawTarget_DEFINED
10 10
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 347
348 /** 348 /**
349 * Draws many paths. It will respect the HW 349 * Draws many paths. It will respect the HW
350 * antialias flag on the draw state (if possible in the 3D API). 350 * antialias flag on the draw state (if possible in the 3D API).
351 * 351 *
352 * @param transforms array of 2d affine transformations, one for each path. 352 * @param transforms array of 2d affine transformations, one for each path.
353 * @param fill the fill type for drawing all the paths. Fill must not be a 353 * @param fill the fill type for drawing all the paths. Fill must not be a
354 * hairline. 354 * hairline.
355 * @param stroke the stroke for drawing all the paths. 355 * @param stroke the stroke for drawing all the paths.
356 */ 356 */
357 void drawPaths(size_t pathCount, const GrPath** paths, 357 void drawPaths(int pathCount, const GrPath** paths,
358 const SkMatrix* transforms, SkPath::FillType fill, 358 const SkMatrix* transforms, SkPath::FillType fill,
359 SkStrokeRec::Style stroke); 359 SkStrokeRec::Style stroke);
360 360
361 /** 361 /**
362 * Helper function for drawing rects. It performs a geometry src push and po p 362 * Helper function for drawing rects. It performs a geometry src push and po p
363 * and thus will finalize any reserved geometry. 363 * and thus will finalize any reserved geometry.
364 * 364 *
365 * @param rect the rect to draw 365 * @param rect the rect to draw
366 * @param matrix optional matrix applied to rect (before viewMatrix) 366 * @param matrix optional matrix applied to rect (before viewMatrix)
367 * @param localRect optional rect that specifies local coords to map onto 367 * @param localRect optional rect that specifies local coords to map onto
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 * For subclass internal use to invoke a call to onDrawPath(). 492 * For subclass internal use to invoke a call to onDrawPath().
493 */ 493 */
494 void executeDrawPath(const GrPath* path, SkPath::FillType fill, 494 void executeDrawPath(const GrPath* path, SkPath::FillType fill,
495 const GrDeviceCoordTexture* dstCopy) { 495 const GrDeviceCoordTexture* dstCopy) {
496 this->onDrawPath(path, fill, dstCopy); 496 this->onDrawPath(path, fill, dstCopy);
497 } 497 }
498 498
499 /** 499 /**
500 * For subclass internal use to invoke a call to onDrawPaths(). 500 * For subclass internal use to invoke a call to onDrawPaths().
501 */ 501 */
502 void executeDrawPaths(size_t pathCount, const GrPath** paths, 502 void executeDrawPaths(int pathCount, const GrPath** paths,
503 const SkMatrix* transforms, SkPath::FillType fill, 503 const SkMatrix* transforms, SkPath::FillType fill,
504 SkStrokeRec::Style stroke, 504 SkStrokeRec::Style stroke,
505 const GrDeviceCoordTexture* dstCopy) { 505 const GrDeviceCoordTexture* dstCopy) {
506 this->onDrawPaths(pathCount, paths, transforms, fill, stroke, dstCopy); 506 this->onDrawPaths(pathCount, paths, transforms, fill, stroke, dstCopy);
507 } 507 }
508 508
509 inline bool isGpuTracingEnabled() const { 509 inline bool isGpuTracingEnabled() const {
510 return this->getContext()->isGpuTracingEnabled(); 510 return this->getContext()->isGpuTracingEnabled();
511 } 511 }
512 512
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
885 // drawIndexedInstances, ...). The base class draws a two triangle fan using 885 // drawIndexedInstances, ...). The base class draws a two triangle fan using
886 // drawNonIndexed from reserved vertex space. 886 // drawNonIndexed from reserved vertex space.
887 virtual void onDrawRect(const SkRect& rect, 887 virtual void onDrawRect(const SkRect& rect,
888 const SkMatrix* matrix, 888 const SkMatrix* matrix,
889 const SkRect* localRect, 889 const SkRect* localRect,
890 const SkMatrix* localMatrix); 890 const SkMatrix* localMatrix);
891 891
892 virtual void onStencilPath(const GrPath*, SkPath::FillType) = 0; 892 virtual void onStencilPath(const GrPath*, SkPath::FillType) = 0;
893 virtual void onDrawPath(const GrPath*, SkPath::FillType, 893 virtual void onDrawPath(const GrPath*, SkPath::FillType,
894 const GrDeviceCoordTexture* dstCopy) = 0; 894 const GrDeviceCoordTexture* dstCopy) = 0;
895 virtual void onDrawPaths(size_t, const GrPath**, const SkMatrix*, 895 virtual void onDrawPaths(int, const GrPath**, const SkMatrix*,
896 SkPath::FillType, SkStrokeRec::Style, 896 SkPath::FillType, SkStrokeRec::Style,
897 const GrDeviceCoordTexture* dstCopy) = 0; 897 const GrDeviceCoordTexture* dstCopy) = 0;
898 898
899 virtual void didAddGpuTraceMarker() = 0; 899 virtual void didAddGpuTraceMarker() = 0;
900 virtual void didRemoveGpuTraceMarker() = 0; 900 virtual void didRemoveGpuTraceMarker() = 0;
901 901
902 // helpers for reserving vertex and index space. 902 // helpers for reserving vertex and index space.
903 bool reserveVertexSpace(size_t vertexSize, 903 bool reserveVertexSpace(size_t vertexSize,
904 int vertexCount, 904 int vertexCount,
905 void** vertices); 905 void** vertices);
(...skipping 28 matching lines...) Expand all
934 // The context owns us, not vice-versa, so this ptr is not ref'ed by DrawTar get. 934 // The context owns us, not vice-versa, so this ptr is not ref'ed by DrawTar get.
935 GrContext* fContext; 935 GrContext* fContext;
936 // To keep track that we always have at least as many debug marker adds as r emoves 936 // To keep track that we always have at least as many debug marker adds as r emoves
937 int fGpuTraceMar kerCount; 937 int fGpuTraceMar kerCount;
938 GrTraceMarkerSet fActiveTrace Markers; 938 GrTraceMarkerSet fActiveTrace Markers;
939 939
940 typedef SkRefCnt INHERITED; 940 typedef SkRefCnt INHERITED;
941 }; 941 };
942 942
943 #endif 943 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrDrawTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698