diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-01-28 20:53:22 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-01-28 20:53:22 +0000 |
commit | 75847199c25121c9989e8dba103ac6002d2132d6 (patch) | |
tree | 492ea37d349183be918a0ce3b3e9193d7d7da122 | |
parent | b941bb346549c51c3d1c1578b4f6bc7f4d8436a8 (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
-rw-r--r-- | include/core/SkStringUtils.h | 2 | ||||
-rw-r--r-- | src/gpu/GrContext.cpp | 2 | ||||
-rw-r--r-- | src/gpu/GrDrawState.h | 3 | ||||
-rw-r--r-- | src/gpu/GrDrawTarget.cpp | 7 |
4 files changed, 7 insertions, 7 deletions
diff --git a/include/core/SkStringUtils.h b/include/core/SkStringUtils.h index eea0b5143b..149b6158f5 100644 --- a/include/core/SkStringUtils.h +++ b/include/core/SkStringUtils.h @@ -20,4 +20,4 @@ void SkAddFlagToString(SkString* string, bool flag, 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 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]); |