fix build
Review URL: https://codereview.appspot.com/7229052
git-svn-id: http://skia.googlecode.com/svn/trunk@7426 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/include/core/SkStringUtils.h b/include/core/SkStringUtils.h
index eea0b51..149b615 100644
--- a/include/core/SkStringUtils.h
+++ b/include/core/SkStringUtils.h
@@ -20,4 +20,4 @@
const char* flagStr, bool* needSeparator);
-#endif
\ No newline at end of file
+#endif
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index 41029f4..50d4741 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -1006,7 +1006,7 @@
}
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 dc3fdfe..a3a41b3 100644
--- a/src/gpu/GrDrawState.h
+++ b/src/gpu/GrDrawState.h
@@ -59,6 +59,9 @@
};
GrDrawState() {
+#if GR_DEBUG
+ VertexLayoutUnitTest();
+#endif
this->reset();
}
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp
index ff8b9da..3898426 100644
--- a/src/gpu/GrDrawTarget.cpp
+++ b/src/gpu/GrDrawTarget.cpp
@@ -23,9 +23,6 @@
#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 @@
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 @@
#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]);