aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-01-28 20:53:22 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-01-28 20:53:22 +0000
commit75847199c25121c9989e8dba103ac6002d2132d6 (patch)
tree492ea37d349183be918a0ce3b3e9193d7d7da122 /src
parentb941bb346549c51c3d1c1578b4f6bc7f4d8436a8 (diff)
fix build
Review URL: https://codereview.appspot.com/7229052 git-svn-id: http://skia.googlecode.com/svn/trunk@7426 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r--src/gpu/GrContext.cpp2
-rw-r--r--src/gpu/GrDrawState.h3
-rw-r--r--src/gpu/GrDrawTarget.cpp7
3 files changed, 6 insertions, 6 deletions
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index 41029f4103..50d4741160 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -1006,7 +1006,7 @@ void GrContext::internalDrawOval(const GrPaint& paint,
}
GrVertexLayout layout = GrDrawState::kEdge_VertexLayoutBit;
- GrAssert(sizeof(CircleVertex) == GrDrawTarget::VertexSize(layout));
+ GrAssert(sizeof(CircleVertex) == GrDrawState::VertexSize(layout));
GrDrawTarget::AutoReleaseGeometry geo(target, layout, 4, 0);
if (!geo.succeeded()) {
diff --git a/src/gpu/GrDrawState.h b/src/gpu/GrDrawState.h
index dc3fdfe6a5..a3a41b334d 100644
--- a/src/gpu/GrDrawState.h
+++ b/src/gpu/GrDrawState.h
@@ -59,6 +59,9 @@ public:
};
GrDrawState() {
+#if GR_DEBUG
+ VertexLayoutUnitTest();
+#endif
this->reset();
}
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp
index ff8b9daf57..3898426af0 100644
--- a/src/gpu/GrDrawTarget.cpp
+++ b/src/gpu/GrDrawTarget.cpp
@@ -23,9 +23,6 @@ SK_DEFINE_INST_COUNT(GrDrawTarget)
#define DEBUG_INVAL_START_IDX -1
GrDrawTarget::GrDrawTarget() : fClip(NULL) {
-#if GR_DEBUG
- VertexLayoutUnitTest();
-#endif
fDrawState = &fDefaultDrawState;
// We assume that fDrawState always owns a ref to the object it points at.
fDefaultDrawState.ref();
@@ -298,7 +295,7 @@ bool GrDrawTarget::checkDraw(GrPrimitiveType type, int startVertex,
maxValidVertex = geoSrc.fVertexCount;
break;
case kBuffer_GeometrySrcType:
- maxValidVertex = geoSrc.fVertexBuffer->sizeInBytes() / VertexSize(geoSrc.fVertexLayout);
+ maxValidVertex = geoSrc.fVertexBuffer->sizeInBytes() / GrDrawState::VertexSize(geoSrc.fVertexLayout);
break;
}
if (maxVertex > maxValidVertex) {
@@ -620,7 +617,7 @@ void GrDrawTarget::SetRectVertices(const GrRect& rect,
#if GR_DEBUG
// check that the layout and srcRects agree
for (int i = 0; i < GrDrawState::kNumStages; ++i) {
- if (VertexTexCoordsForStage(i, layout) >= 0) {
+ if (GrDrawState::VertexTexCoordsForStage(i, layout) >= 0) {
GR_DEBUGASSERT(NULL != srcRects && NULL != srcRects[i]);
} else {
GR_DEBUGASSERT(NULL == srcRects || NULL == srcRects[i]);