Replace uses of GrAssert by SkASSERT.

R=bsalomon@google.com

Review URL: https://codereview.chromium.org/22850006

git-svn-id: http://skia.googlecode.com/svn/trunk@10789 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrInOrderDrawBuffer.cpp b/src/gpu/GrInOrderDrawBuffer.cpp
index 9e0d213..0b7a488 100644
--- a/src/gpu/GrInOrderDrawBuffer.cpp
+++ b/src/gpu/GrInOrderDrawBuffer.cpp
@@ -33,8 +33,8 @@
     fDstGpu->ref();
     fCaps.reset(SkRef(fDstGpu->caps()));
 
-    GrAssert(NULL != vertexPool);
-    GrAssert(NULL != indexPool);
+    SkASSERT(NULL != vertexPool);
+    SkASSERT(NULL != indexPool);
 
     GeometryPoolState& poolState = fGeoPoolStateStack.push_back();
     poolState.fUsedPoolVertexBytes = 0;
@@ -62,8 +62,8 @@
                        size_t vertexSize,
                        int vertexCount,
                        SkRect* bounds) {
-    GrAssert(vertexSize >= sizeof(GrPoint));
-    GrAssert(vertexCount > 0);
+    SkASSERT(vertexSize >= sizeof(GrPoint));
+    SkASSERT(vertexCount > 0);
     const GrPoint* point = static_cast<const GrPoint*>(vertices);
     bounds->fLeft = bounds->fRight = point->fX;
     bounds->fTop = bounds->fBottom = point->fY;
@@ -196,7 +196,7 @@
     this->drawIndexedInstances(kTriangles_GrPrimitiveType, 1, 4, 6, &devBounds);
 
     // to ensure that stashing the drawState ptr is valid
-    GrAssert(this->drawState() == drawState);
+    SkASSERT(this->drawState() == drawState);
 }
 
 bool GrInOrderDrawBuffer::quickInsideClip(const SkRect& devBounds) {
@@ -242,7 +242,7 @@
 }
 
 int GrInOrderDrawBuffer::concatInstancedDraw(const DrawInfo& info) {
-    GrAssert(info.isInstanced());
+    SkASSERT(info.isInstanced());
 
     const GeometrySrcState& geomSrc = this->getGeomSrc();
     const GrDrawState& drawState = this->getDrawState();
@@ -278,7 +278,7 @@
         return 0;
     }
 
-    GrAssert(poolState.fPoolStartVertex == draw->startVertex() + draw->vertexCount());
+    SkASSERT(poolState.fPoolStartVertex == draw->startVertex() + draw->vertexCount());
 
     // how many instances can be concat'ed onto draw given the size of the index buffer
     int instancesToConcat = this->indexCountInCurrentSource() / info.indicesPerInstance();
@@ -406,7 +406,7 @@
     SkIRect r;
     if (NULL == renderTarget) {
         renderTarget = this->drawState()->getRenderTarget();
-        GrAssert(NULL != renderTarget);
+        SkASSERT(NULL != renderTarget);
     }
     if (NULL == rect) {
         // We could do something smart and remove previous draws and clears to
@@ -423,13 +423,13 @@
 }
 
 void GrInOrderDrawBuffer::reset() {
-    GrAssert(1 == fGeoPoolStateStack.count());
+    SkASSERT(1 == fGeoPoolStateStack.count());
     this->resetVertexSource();
     this->resetIndexSource();
     int numDraws = fDraws.count();
     for (int d = 0; d < numDraws; ++d) {
         // we always have a VB, but not always an IB
-        GrAssert(NULL != fDraws[d].fVertexBuffer);
+        SkASSERT(NULL != fDraws[d].fVertexBuffer);
         fDraws[d].fVertexBuffer->unref();
         GrSafeUnref(fDraws[d].fIndexBuffer);
     }
@@ -451,8 +451,8 @@
         return;
     }
 
-    GrAssert(kReserved_GeometrySrcType != this->getGeomSrc().fVertexSrc);
-    GrAssert(kReserved_GeometrySrcType != this->getGeomSrc().fIndexSrc);
+    SkASSERT(kReserved_GeometrySrcType != this->getGeomSrc().fVertexSrc);
+    SkASSERT(kReserved_GeometrySrcType != this->getGeomSrc().fIndexSrc);
 
     int numCmds = fCmds.count();
     if (0 == numCmds) {
@@ -527,12 +527,12 @@
         }
     }
     // we should have consumed all the states, clips, etc.
-    GrAssert(fStates.count() == currState);
-    GrAssert(fClips.count() == currClip);
-    GrAssert(fClipOrigins.count() == currClip);
-    GrAssert(fClears.count() == currClear);
-    GrAssert(fDraws.count()  == currDraw);
-    GrAssert(fCopySurfaces.count() == currCopySurface);
+    SkASSERT(fStates.count() == currState);
+    SkASSERT(fClips.count() == currClip);
+    SkASSERT(fClipOrigins.count() == currClip);
+    SkASSERT(fClears.count() == currClear);
+    SkASSERT(fDraws.count()  == currDraw);
+    SkASSERT(fCopySurfaces.count() == currCopySurface);
 
     fDstGpu->setDrawState(prevDrawState);
     prevDrawState->unref();
@@ -637,9 +637,9 @@
                                                int vertexCount,
                                                void** vertices) {
     GeometryPoolState& poolState = fGeoPoolStateStack.back();
-    GrAssert(vertexCount > 0);
-    GrAssert(NULL != vertices);
-    GrAssert(0 == poolState.fUsedPoolVertexBytes);
+    SkASSERT(vertexCount > 0);
+    SkASSERT(NULL != vertices);
+    SkASSERT(0 == poolState.fUsedPoolVertexBytes);
 
     *vertices = fVertexPool.makeSpace(vertexSize,
                                       vertexCount,
@@ -650,9 +650,9 @@
 
 bool GrInOrderDrawBuffer::onReserveIndexSpace(int indexCount, void** indices) {
     GeometryPoolState& poolState = fGeoPoolStateStack.back();
-    GrAssert(indexCount > 0);
-    GrAssert(NULL != indices);
-    GrAssert(0 == poolState.fUsedPoolIndexBytes);
+    SkASSERT(indexCount > 0);
+    SkASSERT(NULL != indices);
+    SkASSERT(0 == poolState.fUsedPoolIndexBytes);
 
     *indices = fIndexPool.makeSpace(indexCount,
                                     &poolState.fPoolIndexBuffer,
@@ -666,7 +666,7 @@
 
     // If we get a release vertex space call then our current source should either be reserved
     // or array (which we copied into reserved space).
-    GrAssert(kReserved_GeometrySrcType == geoSrc.fVertexSrc ||
+    SkASSERT(kReserved_GeometrySrcType == geoSrc.fVertexSrc ||
              kArray_GeometrySrcType == geoSrc.fVertexSrc);
 
     // When the caller reserved vertex buffer space we gave it back a pointer
@@ -687,7 +687,7 @@
 
     // If we get a release index space call then our current source should either be reserved
     // or array (which we copied into reserved space).
-    GrAssert(kReserved_GeometrySrcType == geoSrc.fIndexSrc ||
+    SkASSERT(kReserved_GeometrySrcType == geoSrc.fIndexSrc ||
              kArray_GeometrySrcType == geoSrc.fIndexSrc);
 
     // Similar to releaseReservedVertexSpace we return any unused portion at
@@ -703,7 +703,7 @@
                                                    int vertexCount) {
 
     GeometryPoolState& poolState = fGeoPoolStateStack.back();
-    GrAssert(0 == poolState.fUsedPoolVertexBytes);
+    SkASSERT(0 == poolState.fUsedPoolVertexBytes);
 #if GR_DEBUG
     bool success =
 #endif
@@ -718,7 +718,7 @@
 void GrInOrderDrawBuffer::onSetIndexSourceToArray(const void* indexArray,
                                                   int indexCount) {
     GeometryPoolState& poolState = fGeoPoolStateStack.back();
-    GrAssert(0 == poolState.fUsedPoolIndexBytes);
+    SkASSERT(0 == poolState.fUsedPoolIndexBytes);
 #if GR_DEBUG
     bool success =
 #endif
@@ -755,7 +755,7 @@
 
 void GrInOrderDrawBuffer::geometrySourceWillPop(
                                         const GeometrySrcState& restoredState) {
-    GrAssert(fGeoPoolStateStack.count() > 1);
+    SkASSERT(fGeoPoolStateStack.count() > 1);
     fGeoPoolStateStack.pop_back();
     GeometryPoolState& poolState = fGeoPoolStateStack.back();
     // we have to assume that any slack we had in our vertex/index data
@@ -777,7 +777,7 @@
 }
 
 bool GrInOrderDrawBuffer::needsNewClip() const {
-    GrAssert(fClips.count() == fClipOrigins.count());
+    SkASSERT(fClips.count() == fClipOrigins.count());
     if (this->getDrawState().isClipState()) {
        if (fClipSet &&
            (fClips.empty() ||