aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-03-28 21:31:34 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-03-28 21:31:34 +0000
commitecc45365b6429ee4cbe1748dc6667b862d5f0f71 (patch)
tree21ba15bc230d2561f9291ed98abaa63a4953be1a
parenta0c269a3b2897a19db10f2101ba506ef25454fea (diff)
Use int rather than size_t for pathCount in GrDrawTarget::drawPaths
R=reed@google.com TBR=reed@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/216293006 git-svn-id: http://skia.googlecode.com/svn/trunk@13988 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r--src/gpu/GrDrawTarget.cpp4
-rw-r--r--src/gpu/GrDrawTarget.h6
-rw-r--r--src/gpu/GrGpu.cpp2
-rw-r--r--src/gpu/GrGpu.h4
-rw-r--r--src/gpu/GrInOrderDrawBuffer.cpp6
-rw-r--r--src/gpu/GrInOrderDrawBuffer.h4
-rw-r--r--src/gpu/gl/GrGpuGL.cpp4
-rw-r--r--src/gpu/gl/GrGpuGL.h2
8 files changed, 16 insertions, 16 deletions
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp
index 593932e76d..9cea214ac4 100644
--- a/src/gpu/GrDrawTarget.cpp
+++ b/src/gpu/GrDrawTarget.cpp
@@ -548,7 +548,7 @@ void GrDrawTarget::drawPath(const GrPath* path, SkPath::FillType fill) {
this->onDrawPath(path, fill, dstCopy.texture() ? &dstCopy : NULL);
}
-void GrDrawTarget::drawPaths(size_t pathCount, const GrPath** paths,
+void GrDrawTarget::drawPaths(int pathCount, const GrPath** paths,
const SkMatrix* transforms,
SkPath::FillType fill, SkStrokeRec::Style stroke) {
SkASSERT(pathCount > 0);
@@ -560,7 +560,7 @@ void GrDrawTarget::drawPaths(size_t pathCount, const GrPath** paths,
const GrDrawState* drawState = &getDrawState();
SkRect devBounds;
- for (size_t i = 0; i < pathCount; ++i) {
+ for (int i = 0; i < pathCount; ++i) {
SkRect mappedPathBounds;
transforms[i].mapRect(&mappedPathBounds, paths[i]->getBounds());
devBounds.join(mappedPathBounds);
diff --git a/src/gpu/GrDrawTarget.h b/src/gpu/GrDrawTarget.h
index ece2b8822e..732bad07df 100644
--- a/src/gpu/GrDrawTarget.h
+++ b/src/gpu/GrDrawTarget.h
@@ -354,7 +354,7 @@ public:
* hairline.
* @param stroke the stroke for drawing all the paths.
*/
- void drawPaths(size_t pathCount, const GrPath** paths,
+ void drawPaths(int pathCount, const GrPath** paths,
const SkMatrix* transforms, SkPath::FillType fill,
SkStrokeRec::Style stroke);
@@ -505,7 +505,7 @@ public:
/**
* For subclass internal use to invoke a call to onDrawPaths().
*/
- void executeDrawPaths(size_t pathCount, const GrPath** paths,
+ void executeDrawPaths(int pathCount, const GrPath** paths,
const SkMatrix* transforms, SkPath::FillType fill,
SkStrokeRec::Style stroke,
const GrDeviceCoordTexture* dstCopy) {
@@ -898,7 +898,7 @@ private:
virtual void onStencilPath(const GrPath*, SkPath::FillType) = 0;
virtual void onDrawPath(const GrPath*, SkPath::FillType,
const GrDeviceCoordTexture* dstCopy) = 0;
- virtual void onDrawPaths(size_t, const GrPath**, const SkMatrix*,
+ virtual void onDrawPaths(int, const GrPath**, const SkMatrix*,
SkPath::FillType, SkStrokeRec::Style,
const GrDeviceCoordTexture* dstCopy) = 0;
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp
index 7c694c9dbc..d8f65d5205 100644
--- a/src/gpu/GrGpu.cpp
+++ b/src/gpu/GrGpu.cpp
@@ -404,7 +404,7 @@ void GrGpu::onDrawPath(const GrPath* path, SkPath::FillType fill,
this->onGpuDrawPath(path, fill);
}
-void GrGpu::onDrawPaths(size_t pathCount, const GrPath** paths,
+void GrGpu::onDrawPaths(int pathCount, const GrPath** paths,
const SkMatrix* transforms, SkPath::FillType fill,
SkStrokeRec::Style style,
const GrDeviceCoordTexture* dstCopy) {
diff --git a/src/gpu/GrGpu.h b/src/gpu/GrGpu.h
index d73fa59ace..bac9288543 100644
--- a/src/gpu/GrGpu.h
+++ b/src/gpu/GrGpu.h
@@ -432,7 +432,7 @@ private:
// overridden by backend-specific derived class to perform the path stenciling.
virtual void onGpuStencilPath(const GrPath*, SkPath::FillType) = 0;
virtual void onGpuDrawPath(const GrPath*, SkPath::FillType) = 0;
- virtual void onGpuDrawPaths(size_t, const GrPath**, const SkMatrix*,
+ virtual void onGpuDrawPaths(int, const GrPath**, const SkMatrix*,
SkPath::FillType, SkStrokeRec::Style) = 0;
// overridden by backend-specific derived class to perform the read pixels.
@@ -476,7 +476,7 @@ private:
virtual void onStencilPath(const GrPath*, SkPath::FillType) SK_OVERRIDE;
virtual void onDrawPath(const GrPath*, SkPath::FillType,
const GrDeviceCoordTexture* dstCopy) SK_OVERRIDE;
- virtual void onDrawPaths(size_t, const GrPath**, const SkMatrix*,
+ virtual void onDrawPaths(int, const GrPath**, const SkMatrix*,
SkPath::FillType, SkStrokeRec::Style,
const GrDeviceCoordTexture* dstCopy) SK_OVERRIDE;
diff --git a/src/gpu/GrInOrderDrawBuffer.cpp b/src/gpu/GrInOrderDrawBuffer.cpp
index d0ec73c9eb..5b3bc3a7f5 100644
--- a/src/gpu/GrInOrderDrawBuffer.cpp
+++ b/src/gpu/GrInOrderDrawBuffer.cpp
@@ -419,7 +419,7 @@ GrInOrderDrawBuffer::DrawPaths::~DrawPaths() {
if (fTransforms) {
SkDELETE_ARRAY(fTransforms);
}
- for (size_t i = 0; i < fPathCount; ++i) {
+ for (int i = 0; i < fPathCount; ++i) {
fPaths[i]->unref();
}
SkDELETE_ARRAY(fPaths);
@@ -457,7 +457,7 @@ void GrInOrderDrawBuffer::onDrawPath(const GrPath* path,
}
}
-void GrInOrderDrawBuffer::onDrawPaths(size_t pathCount, const GrPath** paths,
+void GrInOrderDrawBuffer::onDrawPaths(int pathCount, const GrPath** paths,
const SkMatrix* transforms,
SkPath::FillType fill,
SkStrokeRec::Style stroke,
@@ -474,7 +474,7 @@ void GrInOrderDrawBuffer::onDrawPaths(size_t pathCount, const GrPath** paths,
dp->fPathCount = pathCount;
dp->fPaths = SkNEW_ARRAY(const GrPath*, pathCount);
memcpy(dp->fPaths, paths, sizeof(GrPath*) * pathCount);
- for (size_t i = 0; i < pathCount; ++i) {
+ for (int i = 0; i < pathCount; ++i) {
dp->fPaths[i]->ref();
}
diff --git a/src/gpu/GrInOrderDrawBuffer.h b/src/gpu/GrInOrderDrawBuffer.h
index 0e0c57db3f..34fb0a7cff 100644
--- a/src/gpu/GrInOrderDrawBuffer.h
+++ b/src/gpu/GrInOrderDrawBuffer.h
@@ -119,7 +119,7 @@ private:
DrawPaths();
~DrawPaths();
- size_t fPathCount;
+ int fPathCount;
const GrPath** fPaths;
SkMatrix* fTransforms;
SkPath::FillType fFill;
@@ -155,7 +155,7 @@ private:
virtual void onStencilPath(const GrPath*, SkPath::FillType) SK_OVERRIDE;
virtual void onDrawPath(const GrPath*, SkPath::FillType,
const GrDeviceCoordTexture* dstCopy) SK_OVERRIDE;
- virtual void onDrawPaths(size_t, const GrPath**, const SkMatrix*,
+ virtual void onDrawPaths(int, const GrPath**, const SkMatrix*,
SkPath::FillType, SkStrokeRec::Style,
const GrDeviceCoordTexture* dstCopy) SK_OVERRIDE;
diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp
index a89bb9d64a..93adb508fd 100644
--- a/src/gpu/gl/GrGpuGL.cpp
+++ b/src/gpu/gl/GrGpuGL.cpp
@@ -1710,7 +1710,7 @@ void GrGpuGL::onGpuDrawPath(const GrPath* path, SkPath::FillType fill) {
}
}
-void GrGpuGL::onGpuDrawPaths(size_t pathCount, const GrPath** paths,
+void GrGpuGL::onGpuDrawPaths(int pathCount, const GrPath** paths,
const SkMatrix* transforms,
SkPath::FillType fill,
SkStrokeRec::Style stroke) {
@@ -1726,7 +1726,7 @@ void GrGpuGL::onGpuDrawPaths(size_t pathCount, const GrPath** paths,
reinterpret_cast<GrGLfloat*>(transformData.get());
GrGLuint* pathIDs = reinterpret_cast<GrGLuint*>(pathData.get());
- for (size_t i = 0; i < pathCount; ++i) {
+ for (int i = 0; i < pathCount; ++i) {
SkASSERT(transforms[i].asAffine(NULL));
const SkMatrix& m = transforms[i];
transformValues[i * 6] = m.getScaleX();
diff --git a/src/gpu/gl/GrGpuGL.h b/src/gpu/gl/GrGpuGL.h
index e173aeff71..d75c36601c 100644
--- a/src/gpu/gl/GrGpuGL.h
+++ b/src/gpu/gl/GrGpuGL.h
@@ -156,7 +156,7 @@ private:
virtual void onGpuStencilPath(const GrPath*, SkPath::FillType) SK_OVERRIDE;
virtual void onGpuDrawPath(const GrPath*, SkPath::FillType) SK_OVERRIDE;
- virtual void onGpuDrawPaths(size_t, const GrPath**, const SkMatrix*,
+ virtual void onGpuDrawPaths(int, const GrPath**, const SkMatrix*,
SkPath::FillType,
SkStrokeRec::Style) SK_OVERRIDE;