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/gl/GrGLBufferImpl.cpp b/src/gpu/gl/GrGLBufferImpl.cpp
index 2dfa9d5..787f40f 100644
--- a/src/gpu/gl/GrGLBufferImpl.cpp
+++ b/src/gpu/gl/GrGLBufferImpl.cpp
@@ -44,7 +44,7 @@
         if (GR_GL_ARRAY_BUFFER == fBufferType) {
             gpu->notifyVertexBufferDelete(fDesc.fID);
         } else {
-            GrAssert(GR_GL_ELEMENT_ARRAY_BUFFER == fBufferType);
+            SkASSERT(GR_GL_ELEMENT_ARRAY_BUFFER == fBufferType);
             gpu->notifyIndexBufferDelete(fDesc.fID);
         }
         fDesc.fID = 0;
@@ -64,14 +64,14 @@
     if (GR_GL_ARRAY_BUFFER == fBufferType) {
         gpu->bindVertexBuffer(fDesc.fID);
     } else {
-        GrAssert(GR_GL_ELEMENT_ARRAY_BUFFER == fBufferType);
+        SkASSERT(GR_GL_ELEMENT_ARRAY_BUFFER == fBufferType);
         gpu->bindIndexBufferAndDefaultVertexArray(fDesc.fID);
     }
 }
 
 void* GrGLBufferImpl::lock(GrGpuGL* gpu) {
     VALIDATE();
-    GrAssert(!this->isLocked());
+    SkASSERT(!this->isLocked());
     if (0 == fDesc.fID) {
         fLockPtr = fCPUData;
     } else if (gpu->caps()->bufferLockSupport()) {
@@ -90,9 +90,9 @@
 
 void GrGLBufferImpl::unlock(GrGpuGL* gpu) {
     VALIDATE();
-    GrAssert(this->isLocked());
+    SkASSERT(this->isLocked());
     if (0 != fDesc.fID) {
-        GrAssert(gpu->caps()->bufferLockSupport());
+        SkASSERT(gpu->caps()->bufferLockSupport());
         this->bind(gpu);
         GL_CALL(gpu, UnmapBuffer(fBufferType));
     }
@@ -105,7 +105,7 @@
 }
 
 bool GrGLBufferImpl::updateData(GrGpuGL* gpu, const void* src, size_t srcSizeInBytes) {
-    GrAssert(!this->isLocked());
+    SkASSERT(!this->isLocked());
     VALIDATE();
     if (srcSizeInBytes > fDesc.fSizeInBytes) {
         return false;
@@ -157,9 +157,9 @@
 }
 
 void GrGLBufferImpl::validate() const {
-    GrAssert(GR_GL_ARRAY_BUFFER == fBufferType || GR_GL_ELEMENT_ARRAY_BUFFER == fBufferType);
+    SkASSERT(GR_GL_ARRAY_BUFFER == fBufferType || GR_GL_ELEMENT_ARRAY_BUFFER == fBufferType);
     // The following assert isn't valid when the buffer has been abandoned:
-    // GrAssert((0 == fDesc.fID) == (NULL != fCPUData));
-    GrAssert(0 != fDesc.fID || !fDesc.fIsWrapped);
-    GrAssert(NULL == fCPUData || NULL == fLockPtr || fCPUData == fLockPtr);
+    // SkASSERT((0 == fDesc.fID) == (NULL != fCPUData));
+    SkASSERT(0 != fDesc.fID || !fDesc.fIsWrapped);
+    SkASSERT(NULL == fCPUData || NULL == fLockPtr || fCPUData == fLockPtr);
 }
diff --git a/src/gpu/gl/GrGLBufferImpl.h b/src/gpu/gl/GrGLBufferImpl.h
index 1fd8ce0..ce15a98 100644
--- a/src/gpu/gl/GrGLBufferImpl.h
+++ b/src/gpu/gl/GrGLBufferImpl.h
@@ -29,7 +29,7 @@
     GrGLBufferImpl(GrGpuGL*, const Desc&, GrGLenum bufferType);
     ~GrGLBufferImpl() {
         // either release or abandon should have been called by the owner of this object.
-        GrAssert(0 == fDesc.fID);
+        SkASSERT(0 == fDesc.fID);
     }
 
     void abandon();
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index df8dc09..f399cd4 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -105,7 +105,7 @@
         GR_GL_GetIntegerv(gli, GR_GL_MAX_FRAGMENT_UNIFORM_VECTORS,
                           &fMaxFragmentUniformVectors);
     } else {
-        GrAssert(kDesktop_GrGLBinding == binding);
+        SkASSERT(kDesktop_GrGLBinding == binding);
         GrGLint max;
         GR_GL_GetIntegerv(gli, GR_GL_MAX_FRAGMENT_UNIFORM_COMPONENTS, &max);
         fMaxFragmentUniformVectors = max / 4;
@@ -130,7 +130,7 @@
             fBGRAFormatSupport = true;
             fBGRAIsInternalFormat = true;
         }
-        GrAssert(fBGRAFormatSupport ||
+        SkASSERT(fBGRAFormatSupport ||
                  kSkia8888_GrPixelConfig != kBGRA_8888_GrPixelConfig);
     }
 
@@ -418,7 +418,7 @@
     if (0 == fMSAACoverageModes.count()) {
         return kNoneMode;
     } else {
-        GrAssert(kNone_CoverageAAType != fCoverageAAType);
+        SkASSERT(kNone_CoverageAAType != fCoverageAAType);
         int max = (fMSAACoverageModes.end() - 1)->fCoverageSampleCnt;
         desiredSampleCount = GrMin(desiredSampleCount, max);
         MSAACoverageMode desiredMode = {desiredSampleCount, 0};
@@ -429,7 +429,7 @@
         if (idx < 0) {
             idx = ~idx;
         }
-        GrAssert(idx >= 0 && idx < fMSAACoverageModes.count());
+        SkASSERT(idx >= 0 && idx < fMSAACoverageModes.count());
         return fMSAACoverageModes[idx];
     }
 }
@@ -487,7 +487,7 @@
             fStencilFormats.push_back() = gS4;
         }
     }
-    GrAssert(0 == fStencilVerifiedColorConfigs.count());
+    SkASSERT(0 == fStencilVerifiedColorConfigs.count());
     fStencilVerifiedColorConfigs.push_back_n(fStencilFormats.count());
 }
 
@@ -497,12 +497,12 @@
 #if !GR_GL_CHECK_FBO_STATUS_ONCE_PER_FORMAT
     return;
 #endif
-    GrAssert((unsigned)config < (unsigned)kGrPixelConfigCnt);
-    GrAssert(fStencilFormats.count() == fStencilVerifiedColorConfigs.count());
+    SkASSERT((unsigned)config < (unsigned)kGrPixelConfigCnt);
+    SkASSERT(fStencilFormats.count() == fStencilVerifiedColorConfigs.count());
     int count = fStencilFormats.count();
     // we expect a really small number of possible formats so linear search
     // should be OK
-    GrAssert(count < 16);
+    SkASSERT(count < 16);
     for (int i = 0; i < count; ++i) {
         if (format.fInternalFormat ==
             fStencilFormats[i].fInternalFormat) {
@@ -520,11 +520,11 @@
 #if !GR_GL_CHECK_FBO_STATUS_ONCE_PER_FORMAT
     return false;
 #endif
-    GrAssert((unsigned)config < (unsigned)kGrPixelConfigCnt);
+    SkASSERT((unsigned)config < (unsigned)kGrPixelConfigCnt);
     int count = fStencilFormats.count();
     // we expect a really small number of possible formats so linear search
     // should be OK
-    GrAssert(count < 16);
+    SkASSERT(count < 16);
     for (int i = 0; i < count; ++i) {
         if (format.fInternalFormat ==
             fStencilFormats[i].fInternalFormat) {
diff --git a/src/gpu/gl/GrGLCreateNullInterface.cpp b/src/gpu/gl/GrGLCreateNullInterface.cpp
index 0d539c9..d080cce 100644
--- a/src/gpu/gl/GrGLCreateNullInterface.cpp
+++ b/src/gpu/gl/GrGLCreateNullInterface.cpp
@@ -23,7 +23,7 @@
 
     void allocate(GrGLsizeiptr size, const GrGLchar* dataPtr) {
         if (NULL != fDataPtr) {
-            GrAssert(0 != fSize);
+            SkASSERT(0 != fSize);
             SkDELETE_ARRAY(fDataPtr);
         }
 
@@ -53,7 +53,7 @@
 
 static GrBufferObj* look_up(GrGLuint id) {
     GrBufferObj* buffer = gBuffers[id];
-    GrAssert(NULL != buffer && buffer->id() == id);
+    SkASSERT(NULL != buffer && buffer->id() == id);
     return buffer;
 }
 
@@ -84,7 +84,7 @@
 }
 
 static void delete_buffer(GrBufferObj* buffer) {
-    GrAssert(gBuffers.count() > 0);
+    SkASSERT(gBuffers.count() > 0);
 
     GrGLuint id = buffer->id();
     SkDELETE(buffer);
@@ -200,12 +200,12 @@
 
     if (id > 0) {
         GrBufferObj* buffer = look_up(id);
-        GrAssert(!buffer->mapped());
+        SkASSERT(!buffer->mapped());
         buffer->setMapped(true);
         return buffer->dataPtr();
     }
 
-    GrAssert(false);
+    SkASSERT(false);
     return NULL;            // no buffer bound to target
 }
 
@@ -221,7 +221,7 @@
     }
     if (id > 0) {
         GrBufferObj* buffer = look_up(id);
-        GrAssert(buffer->mapped());
+        SkASSERT(buffer->mapped());
         buffer->setMapped(false);
         return GR_GL_TRUE;
     }
diff --git a/src/gpu/gl/GrGLEffect.cpp b/src/gpu/gl/GrGLEffect.cpp
index e21ab1d..28be7af 100644
--- a/src/gpu/gl/GrGLEffect.cpp
+++ b/src/gpu/gl/GrGLEffect.cpp
@@ -28,7 +28,7 @@
     for (int index = 0; index < numTextures; ++index) {
         const GrTextureAccess& access = (*drawEffect.effect())->textureAccess(index);
         EffectKey value = GrGLShaderBuilder::KeyForTextureAccess(access, caps) << index;
-        GrAssert(0 == (value & key)); // keys for each access ought not to overlap
+        SkASSERT(0 == (value & key)); // keys for each access ought not to overlap
         key |= value;
     }
     return key;
@@ -38,11 +38,11 @@
     EffectKey key = 0;
 
     int numAttributes = drawEffect.getVertexAttribIndexCount();
-    GrAssert(numAttributes <= 2);
+    SkASSERT(numAttributes <= 2);
     const int* attributeIndices = drawEffect.getVertexAttribIndices();
     for (int index = 0; index < numAttributes; ++index) {
         EffectKey value = attributeIndices[index] << 3*index;
-        GrAssert(0 == (value & key)); // keys for each attribute ought not to overlap
+        SkASSERT(0 == (value & key)); // keys for each attribute ought not to overlap
         key |= value;
     }
 
diff --git a/src/gpu/gl/GrGLEffectMatrix.cpp b/src/gpu/gl/GrGLEffectMatrix.cpp
index 437e683..8c8dcce 100644
--- a/src/gpu/gl/GrGLEffectMatrix.cpp
+++ b/src/gpu/gl/GrGLEffectMatrix.cpp
@@ -101,11 +101,11 @@
     const GrGLShaderVar* coords;
     switch (fCoordsType) {
         case GrEffect::kLocal_CoordsType:
-            GrAssert(!(kPositionCoords_Flag & key));
+            SkASSERT(!(kPositionCoords_Flag & key));
             coords = &builder->localCoordsAttribute();
             break;
         case GrEffect::kPosition_CoordsType:
-            GrAssert((kPositionCoords_Flag & key) || !builder->hasExplicitLocalCoords());
+            SkASSERT((kPositionCoords_Flag & key) || !builder->hasExplicitLocalCoords());
             coords = &builder->positionAttribute();
             break;
         default:
@@ -115,16 +115,16 @@
     // varying = matrix * coords (logically)
     switch (fUniType) {
         case kVoid_GrSLType:
-            GrAssert(kVec2f_GrSLType == varyingType);
+            SkASSERT(kVec2f_GrSLType == varyingType);
             builder->vsCodeAppendf("\t%s = %s;\n", vsVaryingName, coords->c_str());
             break;
         case kVec2f_GrSLType:
-            GrAssert(kVec2f_GrSLType == varyingType);
+            SkASSERT(kVec2f_GrSLType == varyingType);
             builder->vsCodeAppendf("\t%s = %s + %s;\n",
                                    vsVaryingName, uniName, coords->c_str());
             break;
         case kMat33f_GrSLType: {
-            GrAssert(kVec2f_GrSLType == varyingType || kVec3f_GrSLType == varyingType);
+            SkASSERT(kVec2f_GrSLType == varyingType || kVec3f_GrSLType == varyingType);
             if (kVec2f_GrSLType == varyingType) {
                 builder->vsCodeAppendf("\t%s = (%s * vec3(%s, 1)).xy;\n",
                                        vsVaryingName, uniName, coords->c_str());
@@ -189,19 +189,19 @@
                                const SkMatrix& matrix,
                                const GrDrawEffect& drawEffect,
                                const GrTexture* texture) {
-    GrAssert(fUni.isValid() != (kVoid_GrSLType == fUniType));
+    SkASSERT(fUni.isValid() != (kVoid_GrSLType == fUniType));
     const SkMatrix& coordChangeMatrix = GrEffect::kLocal_CoordsType == fCoordsType ?
                                             drawEffect.getCoordChangeMatrix() :
                                             SkMatrix::I();
     switch (fUniType) {
         case kVoid_GrSLType:
-            GrAssert(matrix.isIdentity());
-            GrAssert(coordChangeMatrix.isIdentity());
-            GrAssert(NULL == texture || kTopLeft_GrSurfaceOrigin == texture->origin());
+            SkASSERT(matrix.isIdentity());
+            SkASSERT(coordChangeMatrix.isIdentity());
+            SkASSERT(NULL == texture || kTopLeft_GrSurfaceOrigin == texture->origin());
             return;
         case kVec2f_GrSLType: {
-            GrAssert(SkMatrix::kTranslate_Mask == (matrix.getType() | coordChangeMatrix.getType()));
-            GrAssert(NULL == texture || kTopLeft_GrSurfaceOrigin == texture->origin());
+            SkASSERT(SkMatrix::kTranslate_Mask == (matrix.getType() | coordChangeMatrix.getType()));
+            SkASSERT(NULL == texture || kTopLeft_GrSurfaceOrigin == texture->origin());
             SkScalar tx = matrix[SkMatrix::kMTransX] + (coordChangeMatrix)[SkMatrix::kMTransX];
             SkScalar ty = matrix[SkMatrix::kMTransY] + (coordChangeMatrix)[SkMatrix::kMTransY];
             if (fPrevMatrix.get(SkMatrix::kMTransX) != tx ||
diff --git a/src/gpu/gl/GrGLEffectMatrix.h b/src/gpu/gl/GrGLEffectMatrix.h
index 9c05c57..974e001 100644
--- a/src/gpu/gl/GrGLEffectMatrix.h
+++ b/src/gpu/gl/GrGLEffectMatrix.h
@@ -60,7 +60,7 @@
 
     GrGLEffectMatrix(CoordsType coordsType)
         : fCoordsType(coordsType) {
-        GrAssert(GrEffect::kLocal_CoordsType == coordsType ||
+        SkASSERT(GrEffect::kLocal_CoordsType == coordsType ||
                  GrEffect::kPosition_CoordsType == coordsType);
         fPrevMatrix = SkMatrix::InvalidMatrix();
     }
diff --git a/src/gpu/gl/GrGLIRect.h b/src/gpu/gl/GrGLIRect.h
index f171cf1..44f5280 100644
--- a/src/gpu/gl/GrGLIRect.h
+++ b/src/gpu/gl/GrGLIRect.h
@@ -54,10 +54,10 @@
         }
         fHeight = height;
 
-        GrAssert(fLeft >= 0);
-        GrAssert(fWidth >= 0);
-        GrAssert(fBottom >= 0);
-        GrAssert(fHeight >= 0);
+        SkASSERT(fLeft >= 0);
+        SkASSERT(fWidth >= 0);
+        SkASSERT(fBottom >= 0);
+        SkASSERT(fHeight >= 0);
     }
 
     bool contains(const GrGLIRect& glRect) const {
diff --git a/src/gpu/gl/GrGLIndexBuffer.h b/src/gpu/gl/GrGLIndexBuffer.h
index 5c8588b..32a8086 100644
--- a/src/gpu/gl/GrGLIndexBuffer.h
+++ b/src/gpu/gl/GrGLIndexBuffer.h
@@ -45,7 +45,7 @@
 
 private:
     GrGpuGL* getGpuGL() const {
-        GrAssert(this->isValid());
+        SkASSERT(this->isValid());
         return (GrGpuGL*)(this->getGpu());
     }
 
diff --git a/src/gpu/gl/GrGLPath.cpp b/src/gpu/gl/GrGLPath.cpp
index d46fa03..7bf7df0 100644
--- a/src/gpu/gl/GrGLPath.cpp
+++ b/src/gpu/gl/GrGLPath.cpp
@@ -30,7 +30,7 @@
     GR_STATIC_ASSERT(4 == SkPath::kCubic_Verb);
     GR_STATIC_ASSERT(5 == SkPath::kClose_Verb);
 
-    GrAssert(verb >= 0 && (size_t)verb < GR_ARRAY_COUNT(gTable));
+    SkASSERT(verb >= 0 && (size_t)verb < GR_ARRAY_COUNT(gTable));
     return gTable[verb];
 }
 
@@ -50,7 +50,7 @@
     GR_STATIC_ASSERT(4 == SkPath::kCubic_Verb);
     GR_STATIC_ASSERT(5 == SkPath::kClose_Verb);
 
-    GrAssert(verb >= 0 && (size_t)verb < GR_ARRAY_COUNT(gTable));
+    SkASSERT(verb >= 0 && (size_t)verb < GR_ARRAY_COUNT(gTable));
     return gTable[verb];
 }
 #endif
@@ -84,7 +84,7 @@
         pathCommands[i] = verb_to_gl_path_cmd(v);
         GR_DEBUGCODE(numPts += num_pts(v));
     }
-    GrAssert(pathPoints.count() == numPts);
+    SkASSERT(pathPoints.count() == numPts);
 
     GL_CALL(PathCommands(fPathID,
                          verbCnt, &pathCommands[0],
diff --git a/src/gpu/gl/GrGLProgram.cpp b/src/gpu/gl/GrGLProgram.cpp
index 300e7a7..f1bb1f3 100644
--- a/src/gpu/gl/GrGLProgram.cpp
+++ b/src/gpu/gl/GrGLProgram.cpp
@@ -107,7 +107,7 @@
             break;
         case GrGLProgramDesc::kCombineWithDst_CoverageOutput:
             // We should only have set this if the blend was specified as (1, 0)
-            GrAssert(kOne_GrBlendCoeff == *srcCoeff && kZero_GrBlendCoeff == *dstCoeff);
+            SkASSERT(kOne_GrBlendCoeff == *srcCoeff && kZero_GrBlendCoeff == *dstCoeff);
             break;
         default:
             GrCrash("Unexpected coverage output");
@@ -282,7 +282,7 @@
 #if GR_GL_EXPERIMENTAL_GS
     // TODO: The builder should add all this glue code.
     if (fDesc.getHeader().fExperimentalGS) {
-        GrAssert(fContext.info().glslGeneration() >= k150_GrGLSLGeneration);
+        SkASSERT(fContext.info().glslGeneration() >= k150_GrGLSLGeneration);
         builder->fGSHeader.append("layout(triangles) in;\n"
                                    "layout(triangle_strip, max_vertices = 6) out;\n");
         builder->gsCodeAppend("\tfor (int i = 0; i < 3; ++i) {\n"
@@ -290,7 +290,7 @@
         if (fDesc.getHeader().fEmitsPointSize) {
             builder->gsCodeAppend("\t\tgl_PointSize = 1.0;\n");
         }
-        GrAssert(builder->fGSInputs.count() == builder->fGSOutputs.count());
+        SkASSERT(builder->fGSInputs.count() == builder->fGSOutputs.count());
         int count = builder->fGSInputs.count();
         for (int i = 0; i < count; ++i) {
             builder->gsCodeAppendf("\t\t%s = %s[i];\n",
@@ -364,7 +364,7 @@
             print_shader(stringCnt, strings, stringLengths);
             GrPrintf("\n%s", log.get());
         }
-        GrAssert(!"Shader compilation failed!");
+        SkASSERT(!"Shader compilation failed!");
         GR_GL_CALL(gli, DeleteShader(shader));
         return 0;
     }
@@ -379,7 +379,7 @@
 }
 
 void expand_known_value4f(SkString* string, GrSLConstantVec vec) {
-    GrAssert(string->isEmpty() == (vec != kNone_GrSLConstantVec));
+    SkASSERT(string->isEmpty() == (vec != kNone_GrSLConstantVec));
     switch (vec) {
         case kNone_GrSLConstantVec:
             break;
@@ -437,7 +437,7 @@
 
 bool GrGLProgram::genProgram(const GrEffectStage* colorStages[],
                              const GrEffectStage* coverageStages[]) {
-    GrAssert(0 == fProgramID);
+    SkASSERT(0 == fProgramID);
 
     const GrGLProgramDesc::KeyHeader& header = fDesc.getHeader();
 
@@ -742,7 +742,7 @@
                                       (char*)log.get()));
             GrPrintf((char*)log.get());
         }
-        GrAssert(!"Error linking program");
+        SkASSERT(!"Error linking program");
         GL_CALL(DeleteProgram(fProgramID));
         fProgramID = 0;
         return false;
@@ -792,7 +792,7 @@
 
     // Bind the texures for the effect.
     int numSamplers = effect.fSamplerUnis.count();
-    GrAssert((*stage.getEffect())->numTextures() == numSamplers);
+    SkASSERT((*stage.getEffect())->numTextures() == numSamplers);
     for (int s = 0; s < numSamplers; ++s) {
         UniformHandle handle = effect.fSamplerUnis[s];
         if (handle.isValid()) {
@@ -850,13 +850,13 @@
             static GrTextureParams kParams; // the default is clamp, nearest filtering.
             gpu->bindTexture(fDstCopyTexUnit, kParams, texture);
         } else {
-            GrAssert(!fUniformHandles.fDstCopyScaleUni.isValid());
-            GrAssert(!fUniformHandles.fDstCopySamplerUni.isValid());
+            SkASSERT(!fUniformHandles.fDstCopyScaleUni.isValid());
+            SkASSERT(!fUniformHandles.fDstCopySamplerUni.isValid());
         }
     } else {
-        GrAssert(!fUniformHandles.fDstCopyTopLeftUni.isValid());
-        GrAssert(!fUniformHandles.fDstCopyScaleUni.isValid());
-        GrAssert(!fUniformHandles.fDstCopySamplerUni.isValid());
+        SkASSERT(!fUniformHandles.fDstCopyTopLeftUni.isValid());
+        SkASSERT(!fUniformHandles.fDstCopyScaleUni.isValid());
+        SkASSERT(!fUniformHandles.fDstCopySamplerUni.isValid());
     }
 
     for (int e = 0; e < fColorEffects.count(); ++e) {
@@ -881,7 +881,7 @@
     if (!drawState.hasColorVertexAttribute()) {
         switch (header.fColorInput) {
             case GrGLProgramDesc::kAttribute_ColorInput:
-                GrAssert(-1 != header.fColorAttributeIndex);
+                SkASSERT(-1 != header.fColorAttributeIndex);
                 if (sharedState->fConstAttribColor != color ||
                     sharedState->fConstAttribColorIndex != header.fColorAttributeIndex) {
                     // OpenGL ES only supports the float varieties of glVertexAttrib
diff --git a/src/gpu/gl/GrGLProgramDesc.cpp b/src/gpu/gl/GrGLProgramDesc.cpp
index ee9775f..91ac266 100644
--- a/src/gpu/gl/GrGLProgramDesc.cpp
+++ b/src/gpu/gl/GrGLProgramDesc.cpp
@@ -46,7 +46,7 @@
     coverageStages->reset();
 
     // This should already have been caught
-    GrAssert(!(GrDrawState::kSkipDraw_BlendOptFlag & blendOpts));
+    SkASSERT(!(GrDrawState::kSkipDraw_BlendOptFlag & blendOpts));
 
     bool skipCoverage = SkToBool(blendOpts & GrDrawState::kEmitTransBlack_BlendOptFlag);
 
@@ -137,13 +137,13 @@
     }
 
     if (readsDst) {
-        GrAssert(NULL != dstCopy || gpu->caps()->dstReadInShaderSupport());
+        SkASSERT(NULL != dstCopy || gpu->caps()->dstReadInShaderSupport());
         const GrTexture* dstCopyTexture = NULL;
         if (NULL != dstCopy) {
             dstCopyTexture = dstCopy->texture();
         }
         header->fDstReadKey = GrGLShaderBuilder::KeyForDstRead(dstCopyTexture, gpu->glCaps());
-        GrAssert(0 != header->fDstReadKey);
+        SkASSERT(0 != header->fDstReadKey);
     } else {
         header->fDstReadKey = 0;
     }
@@ -164,7 +164,7 @@
     if (requiresColorAttrib) {
         header->fColorAttributeIndex = drawState.colorVertexAttributeIndex();
     } else if (GrGLProgramDesc::kAttribute_ColorInput == header->fColorInput) {
-        GrAssert(availableAttributeIndex < GrDrawState::kMaxVertexAttribCnt);
+        SkASSERT(availableAttributeIndex < GrDrawState::kMaxVertexAttribCnt);
         header->fColorAttributeIndex = availableAttributeIndex;
         availableAttributeIndex++;
     } else {
@@ -174,7 +174,7 @@
     if (requiresCoverageAttrib) {
         header->fCoverageAttributeIndex = drawState.coverageVertexAttributeIndex();
     } else if (GrGLProgramDesc::kAttribute_ColorInput == header->fCoverageInput) {
-        GrAssert(availableAttributeIndex < GrDrawState::kMaxVertexAttribCnt);
+        SkASSERT(availableAttributeIndex < GrDrawState::kMaxVertexAttribCnt);
         header->fCoverageAttributeIndex = availableAttributeIndex;
     } else {
         header->fCoverageAttributeIndex = -1;
diff --git a/src/gpu/gl/GrGLProgramDesc.h b/src/gpu/gl/GrGLProgramDesc.h
index e85133c..8c441b0 100644
--- a/src/gpu/gl/GrGLProgramDesc.h
+++ b/src/gpu/gl/GrGLProgramDesc.h
@@ -30,7 +30,7 @@
 
     // Returns this as a uint32_t array to be used as a key in the program cache.
     const uint32_t* asKey() const {
-        GrAssert(fInitialized);
+        SkASSERT(fInitialized);
         return reinterpret_cast<const uint32_t*>(fKey.get());
     }
 
@@ -71,12 +71,12 @@
                       GrGLProgramDesc* outDesc);
 
     int numColorEffects() const {
-        GrAssert(fInitialized);
+        SkASSERT(fInitialized);
         return this->getHeader().fColorEffectCnt;
     }
 
     int numCoverageEffects() const {
-        GrAssert(fInitialized);
+        SkASSERT(fInitialized);
         return this->getHeader().fCoverageEffectCnt;
     }
 
@@ -85,7 +85,7 @@
     GrGLProgramDesc& operator= (const GrGLProgramDesc& other);
 
     bool operator== (const GrGLProgramDesc& other) const {
-        GrAssert(fInitialized && other.fInitialized);
+        SkASSERT(fInitialized && other.fInitialized);
         // The length is masked as a hint to the compiler that the address will be 4 byte aligned.
         return 0 == memcmp(this->asKey(), other.asKey(), this->keyLength() & ~0x3);
     }
diff --git a/src/gpu/gl/GrGLRenderTarget.cpp b/src/gpu/gl/GrGLRenderTarget.cpp
index a6fc186..f2a0cdc 100644
--- a/src/gpu/gl/GrGLRenderTarget.cpp
+++ b/src/gpu/gl/GrGLRenderTarget.cpp
@@ -52,15 +52,15 @@
                          viewport.fWidth, viewport.fHeight,
                          desc.fConfig, desc.fSampleCnt,
                          desc.fOrigin)) {
-    GrAssert(NULL != texID);
-    GrAssert(NULL != texture);
+    SkASSERT(NULL != texID);
+    SkASSERT(NULL != texture);
     // FBO 0 can't also be a texture, right?
-    GrAssert(0 != desc.fRTFBOID);
-    GrAssert(0 != desc.fTexFBOID);
+    SkASSERT(0 != desc.fRTFBOID);
+    SkASSERT(0 != desc.fTexFBOID);
 
     // we assume this is true, TODO: get rid of viewport as a param.
-    GrAssert(viewport.fWidth == texture->width());
-    GrAssert(viewport.fHeight == texture->height());
+    SkASSERT(viewport.fWidth == texture->width());
+    SkASSERT(viewport.fHeight == texture->height());
 
     this->init(desc, viewport, texID);
 }
diff --git a/src/gpu/gl/GrGLSL.cpp b/src/gpu/gl/GrGLSL.cpp
index 2ede494..486390b 100644
--- a/src/gpu/gl/GrGLSL.cpp
+++ b/src/gpu/gl/GrGLSL.cpp
@@ -13,7 +13,7 @@
     GrGLSLVersion ver = GrGLGetGLSLVersion(gl);
     switch (binding) {
         case kDesktop_GrGLBinding:
-            GrAssert(ver >= GR_GLSL_VER(1,10));
+            SkASSERT(ver >= GR_GLSL_VER(1,10));
             if (ver >= GR_GLSL_VER(1,50)) {
                 return k150_GrGLSLGeneration;
             } else if (ver >= GR_GLSL_VER(1,40)) {
@@ -25,7 +25,7 @@
             }
         case kES_GrGLBinding:
             // version 1.00 of ES GLSL based on ver 1.20 of desktop GLSL
-            GrAssert(ver >= GR_GL_VER(1,00));
+            SkASSERT(ver >= GR_GL_VER(1,00));
             return k110_GrGLSLGeneration;
         default:
             GrCrash("Unknown GL Binding");
@@ -41,17 +41,17 @@
                 // 1.00 of the ES language.
                 return "#version 100\n";
             } else {
-                GrAssert(kDesktop_GrGLBinding == binding);
+                SkASSERT(kDesktop_GrGLBinding == binding);
                 return "#version 110\n";
             }
         case k130_GrGLSLGeneration:
-            GrAssert(kDesktop_GrGLBinding == binding);
+            SkASSERT(kDesktop_GrGLBinding == binding);
             return "#version 130\n";
         case k140_GrGLSLGeneration:
-            GrAssert(kDesktop_GrGLBinding == binding);
+            SkASSERT(kDesktop_GrGLBinding == binding);
             return "#version 140\n";
         case k150_GrGLSLGeneration:
-            GrAssert(kDesktop_GrGLBinding == binding);
+            SkASSERT(kDesktop_GrGLBinding == binding);
             return "#version 150\n";
         default:
             GrCrash("Unknown GL version.");
@@ -69,7 +69,7 @@
 
 const char* GrGLSLVectorHomogCoord(int count) {
     static const char* HOMOGS[] = {"ERROR", "", ".y", ".z", ".w"};
-    GrAssert(count >= 1 && count < (int)GR_ARRAY_COUNT(HOMOGS));
+    SkASSERT(count >= 1 && count < (int)GR_ARRAY_COUNT(HOMOGS));
     return HOMOGS[count];
 }
 
@@ -79,7 +79,7 @@
 
 const char* GrGLSLVectorNonhomogCoords(int count) {
     static const char* NONHOMOGS[] = {"ERROR", "", ".x", ".xy", ".xyz"};
-    GrAssert(count >= 1 && count < (int)GR_ARRAY_COUNT(NONHOMOGS));
+    SkASSERT(count >= 1 && count < (int)GR_ARRAY_COUNT(NONHOMOGS));
     return NONHOMOGS[count];
 }
 
@@ -105,15 +105,15 @@
                                  GrSLConstantVec mulFactorDefault) {
     bool haveFactor = NULL != mulFactor && '\0' != *mulFactor;
 
-    GrAssert(NULL != outAppend);
-    GrAssert(NULL != vec4VarName);
-    GrAssert(kNone_GrSLConstantVec != mulFactorDefault || haveFactor);
+    SkASSERT(NULL != outAppend);
+    SkASSERT(NULL != vec4VarName);
+    SkASSERT(kNone_GrSLConstantVec != mulFactorDefault || haveFactor);
 
     if (!haveFactor) {
         if (kOnes_GrSLConstantVec == mulFactorDefault) {
             return kNone_GrSLConstantVec;
         } else {
-            GrAssert(kZeros_GrSLConstantVec == mulFactorDefault);
+            SkASSERT(kZeros_GrSLConstantVec == mulFactorDefault);
             append_tabs(outAppend, tabCnt);
             outAppend->appendf("%s = vec4(0, 0, 0, 0);\n", vec4VarName);
             return kZeros_GrSLConstantVec;
@@ -130,12 +130,12 @@
                                      GrSLConstantVec defaultExpr,
                                      bool omitIfConst) {
     if (NULL == expr || '\0' == *expr) {
-        GrAssert(defaultExpr != kNone_GrSLConstantVec);
+        SkASSERT(defaultExpr != kNone_GrSLConstantVec);
         if (!omitIfConst) {
             if (kOnes_GrSLConstantVec == defaultExpr) {
                 outAppend->append("1.0");
             } else {
-                GrAssert(kZeros_GrSLConstantVec == defaultExpr);
+                SkASSERT(kZeros_GrSLConstantVec == defaultExpr);
                 outAppend->append("0.0");
             }
         }
diff --git a/src/gpu/gl/GrGLSL.h b/src/gpu/gl/GrGLSL.h
index 883cc9b..e65c8d3 100644
--- a/src/gpu/gl/GrGLSL.h
+++ b/src/gpu/gl/GrGLSL.h
@@ -61,14 +61,14 @@
 static inline const char* GrGLSLOnesVecf(int count) {
     static const char* kONESVEC[] = {"ERROR", "1.0", "vec2(1,1)",
                                      "vec3(1,1,1)", "vec4(1,1,1,1)"};
-    GrAssert(count >= 1 && count < (int)GR_ARRAY_COUNT(kONESVEC));
+    SkASSERT(count >= 1 && count < (int)GR_ARRAY_COUNT(kONESVEC));
     return kONESVEC[count];
 }
 
 static inline const char* GrGLSLZerosVecf(int count) {
     static const char* kZEROSVEC[] = {"ERROR", "0.0", "vec2(0,0)",
                                       "vec3(0,0,0)", "vec4(0,0,0,0)"};
-    GrAssert(count >= 1 && count < (int)GR_ARRAY_COUNT(kZEROSVEC));
+    SkASSERT(count >= 1 && count < (int)GR_ARRAY_COUNT(kZEROSVEC));
     return kZEROSVEC[count];
 }
 }
diff --git a/src/gpu/gl/GrGLSL_impl.h b/src/gpu/gl/GrGLSL_impl.h
index 3940926..292048c 100644
--- a/src/gpu/gl/GrGLSL_impl.h
+++ b/src/gpu/gl/GrGLSL_impl.h
@@ -13,7 +13,7 @@
 namespace {
 template<int N>
 GrSLConstantVec return_const_vecf(GrSLConstantVec constVec, SkString* outAppend, bool omitAppend) {
-    GrAssert(kNone_GrSLConstantVec != constVec);
+    SkASSERT(kNone_GrSLConstantVec != constVec);
     if (!omitAppend) {
         if (kZeros_GrSLConstantVec == constVec) {
             outAppend->append(GrGLSLZerosVecf(N));
@@ -32,18 +32,18 @@
                                 GrSLConstantVec default0,
                                 GrSLConstantVec default1,
                                 bool omitIfConstVec) {
-    GrAssert(N > 0 && N <= 4);
-    GrAssert(NULL != outAppend);
+    SkASSERT(N > 0 && N <= 4);
+    SkASSERT(NULL != outAppend);
 
     bool has0 = NULL != in0 && '\0' != *in0;
     bool has1 = NULL != in1 && '\0' != *in1;
 
-    GrAssert(has0 || kNone_GrSLConstantVec != default0);
-    GrAssert(has1 || kNone_GrSLConstantVec != default1);
+    SkASSERT(has0 || kNone_GrSLConstantVec != default0);
+    SkASSERT(has1 || kNone_GrSLConstantVec != default1);
 
     if (!has0 && !has1) {
-        GrAssert(kZeros_GrSLConstantVec == default0 || kOnes_GrSLConstantVec == default0);
-        GrAssert(kZeros_GrSLConstantVec == default1 || kOnes_GrSLConstantVec == default1);
+        SkASSERT(kZeros_GrSLConstantVec == default0 || kOnes_GrSLConstantVec == default0);
+        SkASSERT(kZeros_GrSLConstantVec == default1 || kOnes_GrSLConstantVec == default1);
         if (kZeros_GrSLConstantVec == default0 || kZeros_GrSLConstantVec == default1) {
             return return_const_vecf<N>(kZeros_GrSLConstantVec, outAppend, omitIfConstVec);
         } else {
@@ -51,7 +51,7 @@
             return return_const_vecf<N>(kOnes_GrSLConstantVec, outAppend, omitIfConstVec);
         }
     } else if (!has0) {
-        GrAssert(kZeros_GrSLConstantVec == default0 || kOnes_GrSLConstantVec == default0);
+        SkASSERT(kZeros_GrSLConstantVec == default0 || kOnes_GrSLConstantVec == default0);
         if (kZeros_GrSLConstantVec == default0) {
             return return_const_vecf<N>(kZeros_GrSLConstantVec, outAppend, omitIfConstVec);
         } else {
@@ -59,7 +59,7 @@
             return kNone_GrSLConstantVec;
         }
     } else if (!has1) {
-        GrAssert(kZeros_GrSLConstantVec == default1 || kOnes_GrSLConstantVec == default1);
+        SkASSERT(kZeros_GrSLConstantVec == default1 || kOnes_GrSLConstantVec == default1);
         if (kZeros_GrSLConstantVec == default1) {
             return return_const_vecf<N>(kZeros_GrSLConstantVec, outAppend, omitIfConstVec);
         } else {
@@ -79,15 +79,15 @@
                            GrSLConstantVec default0,
                            GrSLConstantVec default1,
                            bool omitIfConstVec) {
-    GrAssert(N > 0 && N <= 4);
-    GrAssert(NULL != outAppend);
+    SkASSERT(N > 0 && N <= 4);
+    SkASSERT(NULL != outAppend);
 
     bool has0 = NULL != in0 && '\0' != *in0;
     bool has1 = NULL != in1 && '\0' != *in1;
 
     if (!has0 && !has1) {
-        GrAssert(kNone_GrSLConstantVec != default0);
-        GrAssert(kNone_GrSLConstantVec != default1);
+        SkASSERT(kNone_GrSLConstantVec != default0);
+        SkASSERT(kNone_GrSLConstantVec != default1);
         int sum = (kOnes_GrSLConstantVec == default0) + (kOnes_GrSLConstantVec == default1);
         if (0 == sum) {
             return return_const_vecf<N>(kZeros_GrSLConstantVec, outAppend, omitIfConstVec);
@@ -95,12 +95,12 @@
             outAppend->append(GrGLSLOnesVecf(N));
             return return_const_vecf<N>(kOnes_GrSLConstantVec, outAppend, omitIfConstVec);
         } else {
-            GrAssert(2 == sum);
+            SkASSERT(2 == sum);
             outAppend->appendf("%s(2)", GrGLSLFloatVectorTypeString(N));
             return kNone_GrSLConstantVec;
         }
     } else if (!has0) {
-        GrAssert(kNone_GrSLConstantVec != default0);
+        SkASSERT(kNone_GrSLConstantVec != default0);
         if (kZeros_GrSLConstantVec == default0) {
             outAppend->appendf("%s(%s)", GrGLSLFloatVectorTypeString(N), in1);
         } else {
@@ -111,7 +111,7 @@
         }
         return kNone_GrSLConstantVec;
     } else if (!has1) {
-        GrAssert(kNone_GrSLConstantVec != default1);
+        SkASSERT(kNone_GrSLConstantVec != default1);
         if (kZeros_GrSLConstantVec == default1) {
             outAppend->appendf("%s(%s)", GrGLSLFloatVectorTypeString(N), in0);
         } else {
@@ -138,15 +138,15 @@
                                  GrSLConstantVec default0,
                                  GrSLConstantVec default1,
                                  bool omitIfConstVec) {
-    GrAssert(N > 0 && N <= 4);
-    GrAssert(NULL != outAppend);
+    SkASSERT(N > 0 && N <= 4);
+    SkASSERT(NULL != outAppend);
 
     bool has0 = NULL != in0 && '\0' != *in0;
     bool has1 = NULL != in1 && '\0' != *in1;
 
     if (!has0 && !has1) {
-        GrAssert(kNone_GrSLConstantVec != default0);
-        GrAssert(kNone_GrSLConstantVec != default1);
+        SkASSERT(kNone_GrSLConstantVec != default0);
+        SkASSERT(kNone_GrSLConstantVec != default1);
         int diff = (kOnes_GrSLConstantVec == default0) - (kOnes_GrSLConstantVec == default1);
         if (-1 == diff) {
             outAppend->appendf("%s(-1)", GrGLSLFloatVectorTypeString(N));
@@ -154,11 +154,11 @@
         } else if (0 == diff) {
             return return_const_vecf<N>(kZeros_GrSLConstantVec, outAppend, omitIfConstVec);
         } else {
-            GrAssert(1 == diff);
+            SkASSERT(1 == diff);
             return return_const_vecf<N>(kOnes_GrSLConstantVec, outAppend, omitIfConstVec);
         }
     } else if (!has0) {
-        GrAssert(kNone_GrSLConstantVec != default0);
+        SkASSERT(kNone_GrSLConstantVec != default0);
         if (kZeros_GrSLConstantVec == default0) {
             outAppend->appendf("-%s(%s)", GrGLSLFloatVectorTypeString(N), in1);
         } else {
@@ -169,7 +169,7 @@
         }
         return kNone_GrSLConstantVec;
     } else if (!has1) {
-        GrAssert(kNone_GrSLConstantVec != default1);
+        SkASSERT(kNone_GrSLConstantVec != default1);
         if (kZeros_GrSLConstantVec == default1) {
             outAppend->appendf("%s(%s)", GrGLSLFloatVectorTypeString(N), in0);
         } else {
diff --git a/src/gpu/gl/GrGLShaderBuilder.cpp b/src/gpu/gl/GrGLShaderBuilder.cpp
index 5729497..49d9591 100644
--- a/src/gpu/gl/GrGLShaderBuilder.cpp
+++ b/src/gpu/gl/GrGLShaderBuilder.cpp
@@ -29,7 +29,7 @@
     if (kVec2f_GrSLType == type) {
         return glslGen >= k130_GrGLSLGeneration ? "texture" : "texture2D";
     } else {
-        GrAssert(kVec3f_GrSLType == type);
+        SkASSERT(kVec3f_GrSLType == type);
         return glslGen >= k130_GrGLSLGeneration ? "textureProj" : "texture2DProj";
     }
 }
@@ -293,7 +293,7 @@
                                             const GrGLShaderBuilder::TextureSampler& sampler,
                                             const char* coordName,
                                             GrSLType varyingType) const {
-    GrAssert(NULL != coordName);
+    SkASSERT(NULL != coordName);
 
     out->appendf("%s(%s, %s)",
                  sample_function_name(varyingType, fCtxInfo.glslGeneration()),
@@ -306,7 +306,7 @@
                                             const GrGLShaderBuilder::TextureSampler& sampler,
                                             const char* coordName,
                                             GrSLType varyingType) {
-    GrAssert(kFragment_ShaderType == type);
+    SkASSERT(kFragment_ShaderType == type);
     this->appendTextureLookup(&fFSCode, sampler, coordName, varyingType);
 }
 
@@ -316,7 +316,7 @@
                                             const GrGLShaderBuilder::TextureSampler& sampler,
                                             const char* coordName,
                                             GrSLType varyingType) {
-    GrAssert(kFragment_ShaderType == type);
+    SkASSERT(kFragment_ShaderType == type);
     SkString lookup;
     this->appendTextureLookup(&lookup, sampler, coordName, varyingType);
     GrGLSLModulatef<4>(&fFSCode, modulation, lookup.c_str());
@@ -339,7 +339,7 @@
     if (GrGLCaps::kNone_FBFetchType != caps.fbFetchType()) {
         return key;
     }
-    GrAssert(NULL != dstCopy);
+    SkASSERT(NULL != dstCopy);
     if (!caps.textureSwizzleSupport() && GrPixelConfigIsAlphaOnly(dstCopy->config())) {
         // The fact that the config is alpha-only must be considered when generating code.
         key |= kUseAlphaConfig_DstReadKeyBit;
@@ -347,7 +347,7 @@
     if (kTopLeft_GrSurfaceOrigin == dstCopy->origin()) {
         key |= kTopLeftOrigin_DstReadKeyBit;
     }
-    GrAssert(static_cast<DstReadKey>(key) == key);
+    SkASSERT(static_cast<DstReadKey>(key) == key);
     return static_cast<DstReadKey>(key);
 }
 
@@ -382,10 +382,10 @@
                                                                      const char* name,
                                                                      int count,
                                                                      const char** outName) {
-    GrAssert(name && strlen(name));
+    SkASSERT(name && strlen(name));
     SkDEBUGCODE(static const uint32_t kVisibilityMask = kVertex_ShaderType | kFragment_ShaderType);
-    GrAssert(0 == (~kVisibilityMask & visibility));
-    GrAssert(0 != visibility);
+    SkASSERT(0 == (~kVisibilityMask & visibility));
+    SkASSERT(0 != visibility);
 
     BuilderUniform& uni = fUniforms.push_back();
     UniformHandle h = GrGLUniformManager::UniformHandle::CreateFromUniformIndex(fUniforms.count() - 1);
@@ -393,7 +393,7 @@
     fUniformManager.appendUniform(type, count);
     // We expect the uniform manager to initially have no uniforms and that all uniforms are added
     // by this function. Therefore, the handles should match.
-    GrAssert(h2 == h);
+    SkASSERT(h2 == h);
     uni.fVariable.setType(type);
     uni.fVariable.setTypeModifier(GrGLShaderVar::kUniform_TypeModifier);
     this->nameVariable(uni.fVariable.accessName(), 'u', name);
@@ -421,7 +421,7 @@
         const GrGLShaderVar& attr = fVSAttrs[i];
         // if attribute already added, don't add it again
         if (attr.getName().equals(name)) {
-            GrAssert(attr.getType() == type);
+            SkASSERT(attr.getType() == type);
             return false;
         }
     }
@@ -505,7 +505,7 @@
             // temporarily change the stage index because we're inserting non-stage code.
             CodeStage::AutoStageRestore csar(&fCodeStage, NULL);
 
-            GrAssert(!fRTHeightUniform.isValid());
+            SkASSERT(!fRTHeightUniform.isValid());
             const char* rtHeightName;
 
             fRTHeightUniform = this->addUniform(kFragment_ShaderType,
@@ -517,7 +517,7 @@
                                    kCoordName, rtHeightName);
             fSetupFragPosition = true;
         }
-        GrAssert(fRTHeightUniform.isValid());
+        SkASSERT(fRTHeightUniform.isValid());
         return kCoordName;
     }
 }
@@ -530,7 +530,7 @@
                                      const GrGLShaderVar* args,
                                      const char* body,
                                      SkString* outName) {
-    GrAssert(kFragment_ShaderType == shader);
+    SkASSERT(kFragment_ShaderType == shader);
     fFSFunctions.append(GrGLSLTypeString(returnType));
     this->nameVariable(outName, '\0', name);
     fFSFunctions.appendf(" %s", outName->c_str());
@@ -623,7 +623,7 @@
             this->appendUniformDecls(kFragment_ShaderType, shaderStr);
             this->appendDecls(fFSInputs, shaderStr);
             // We shouldn't have declared outputs on 1.10
-            GrAssert(k110_GrGLSLGeneration != fCtxInfo.glslGeneration() || fFSOutputs.empty());
+            SkASSERT(k110_GrGLSLGeneration != fCtxInfo.glslGeneration() || fFSOutputs.empty());
             this->appendDecls(fFSOutputs, shaderStr);
             shaderStr->append(fFSFunctions);
             shaderStr->append("void main() {\n");
@@ -651,7 +651,7 @@
     SkString outColor;
 
     for (int e = 0; e < effectCnt; ++e) {
-        GrAssert(NULL != effectStages[e] && NULL != effectStages[e]->getEffect());
+        SkASSERT(NULL != effectStages[e] && NULL != effectStages[e]->getEffect());
         const GrEffectStage& stage = *effectStages[e];
         const GrEffectRef& effect = *stage.getEffect();
 
diff --git a/src/gpu/gl/GrGLShaderBuilder.h b/src/gpu/gl/GrGLShaderBuilder.h
index e56f459..a4fd826 100644
--- a/src/gpu/gl/GrGLShaderBuilder.h
+++ b/src/gpu/gl/GrGLShaderBuilder.h
@@ -42,8 +42,8 @@
         TextureSampler(const TextureSampler& other) { *this = other; }
 
         TextureSampler& operator= (const TextureSampler& other) {
-            GrAssert(0 == fConfigComponentMask);
-            GrAssert(!fSamplerUniform.isValid());
+            SkASSERT(0 == fConfigComponentMask);
+            SkASSERT(!fSamplerUniform.isValid());
 
             fConfigComponentMask = other.fConfigComponentMask;
             fSamplerUniform = other.fSamplerUniform;
@@ -64,24 +64,24 @@
                   uint32_t configComponentMask,
                   const char* swizzle,
                   int idx) {
-            GrAssert(!this->isInitialized());
-            GrAssert(0 != configComponentMask);
-            GrAssert(!fSamplerUniform.isValid());
+            SkASSERT(!this->isInitialized());
+            SkASSERT(0 != configComponentMask);
+            SkASSERT(!fSamplerUniform.isValid());
 
-            GrAssert(NULL != builder);
+            SkASSERT(NULL != builder);
             SkString name;
             name.printf("Sampler%d", idx);
             fSamplerUniform = builder->addUniform(GrGLShaderBuilder::kFragment_ShaderType,
                                                   kSampler2D_GrSLType,
                                                   name.c_str());
-            GrAssert(fSamplerUniform.isValid());
+            SkASSERT(fSamplerUniform.isValid());
 
             fConfigComponentMask = configComponentMask;
             memcpy(fSwizzle, swizzle, 4);
         }
 
         void init(GrGLShaderBuilder* builder, const GrTextureAccess* access, int idx) {
-            GrAssert(NULL != access);
+            SkASSERT(NULL != access);
             this->init(builder,
                        GrPixelConfigComponentMask(access->getTexture()->config()),
                        access->getSwizzle(),
@@ -375,7 +375,7 @@
         class AutoStageRestore : GrNoncopyable {
         public:
             AutoStageRestore(CodeStage* codeStage, const GrEffectStage* newStage) {
-                GrAssert(NULL != codeStage);
+                SkASSERT(NULL != codeStage);
                 fSavedIndex = codeStage->fCurrentIndex;
                 fSavedEffectStage = codeStage->fEffectStage;
 
@@ -398,7 +398,7 @@
             const GrEffectStage*    fSavedEffectStage;
         };
     private:
-        void validate() const { GrAssert((NULL == fEffectStage) == (-1 == fCurrentIndex)); }
+        void validate() const { SkASSERT((NULL == fEffectStage) == (-1 == fCurrentIndex)); }
         int                     fNextIndex;
         int                     fCurrentIndex;
         const GrEffectStage*    fEffectStage;
diff --git a/src/gpu/gl/GrGLShaderVar.h b/src/gpu/gl/GrGLShaderVar.h
index 0123b38..acbcef3 100644
--- a/src/gpu/gl/GrGLShaderVar.h
+++ b/src/gpu/gl/GrGLShaderVar.h
@@ -69,7 +69,7 @@
 
     GrGLShaderVar(const char* name, GrSLType type, int arrayCount = kNonArray,
                   Precision precision = kDefault_Precision) {
-        GrAssert(kVoid_GrSLType != type);
+        SkASSERT(kVoid_GrSLType != type);
         fType = type;
         fTypeModifier = kNone_TypeModifier;
         fCount = arrayCount;
@@ -87,7 +87,7 @@
         , fPrecision(var.fPrecision)
         , fOrigin(var.fOrigin)
         , fUseUniformFloatArrays(var.fUseUniformFloatArrays) {
-        GrAssert(kVoid_GrSLType != var.fType);
+        SkASSERT(kVoid_GrSLType != var.fType);
     }
 
     /**
@@ -107,7 +107,7 @@
              Precision precision = kDefault_Precision,
              Origin origin = kDefault_Origin,
              bool useUniformFloatArrays = USE_UNIFORM_FLOAT_ARRAYS) {
-        GrAssert(kVoid_GrSLType != type);
+        SkASSERT(kVoid_GrSLType != type);
         fType = type;
         fTypeModifier = typeModifier;
         fName = name;
@@ -126,7 +126,7 @@
              Precision precision = kDefault_Precision,
              Origin origin = kDefault_Origin,
              bool useUniformFloatArrays = USE_UNIFORM_FLOAT_ARRAYS) {
-        GrAssert(kVoid_GrSLType != type);
+        SkASSERT(kVoid_GrSLType != type);
         fType = type;
         fTypeModifier = typeModifier;
         fName = name;
@@ -146,7 +146,7 @@
              Precision precision = kDefault_Precision,
              Origin origin = kDefault_Origin,
              bool useUniformFloatArrays = USE_UNIFORM_FLOAT_ARRAYS) {
-        GrAssert(kVoid_GrSLType != type);
+        SkASSERT(kVoid_GrSLType != type);
         fType = type;
         fTypeModifier = typeModifier;
         fName = name;
@@ -166,7 +166,7 @@
              Precision precision = kDefault_Precision,
              Origin origin = kDefault_Origin,
              bool useUniformFloatArrays = USE_UNIFORM_FLOAT_ARRAYS) {
-        GrAssert(kVoid_GrSLType != type);
+        SkASSERT(kVoid_GrSLType != type);
         fType = type;
         fTypeModifier = typeModifier;
         fName = name;
@@ -275,7 +275,7 @@
                              GrGLSLTypeString(effectiveType),
                              this->getName().c_str());
             } else {
-                GrAssert(this->getArrayCount() > 0);
+                SkASSERT(this->getArrayCount() > 0);
                 out->appendf("%s %s[%d]",
                              GrGLSLTypeString(effectiveType),
                              this->getName().c_str(),
diff --git a/src/gpu/gl/GrGLTexture.cpp b/src/gpu/gl/GrGLTexture.cpp
index aee25bc..9772122 100644
--- a/src/gpu/gl/GrGLTexture.cpp
+++ b/src/gpu/gl/GrGLTexture.cpp
@@ -18,7 +18,7 @@
                        const Desc& textureDesc,
                        const GrGLRenderTarget::Desc* rtDesc) {
 
-    GrAssert(0 != textureDesc.fTextureID);
+    SkASSERT(0 != textureDesc.fTextureID);
 
     fTexParams.invalidate();
     fTexParamsTimestamp = GrGpu::kExpiredTimestamp;
diff --git a/src/gpu/gl/GrGLUniformManager.cpp b/src/gpu/gl/GrGLUniformManager.cpp
index b559e10..55390d5 100644
--- a/src/gpu/gl/GrGLUniformManager.cpp
+++ b/src/gpu/gl/GrGLUniformManager.cpp
@@ -11,13 +11,13 @@
 #include "SkMatrix.h"
 
 #define ASSERT_ARRAY_UPLOAD_IN_BOUNDS(UNI, OFFSET, COUNT) \
-         GrAssert(offset + arrayCount <= uni.fArrayCount || \
+         SkASSERT(offset + arrayCount <= uni.fArrayCount || \
                   (0 == offset && 1 == arrayCount && GrGLShaderVar::kNonArray == uni.fArrayCount))
 
 GrGLUniformManager::UniformHandle GrGLUniformManager::appendUniform(GrSLType type, int arrayCount) {
     int idx = fUniforms.count();
     Uniform& uni = fUniforms.push_back();
-    GrAssert(GrGLShaderVar::kNonArray == arrayCount || arrayCount > 0);
+    SkASSERT(GrGLShaderVar::kNonArray == arrayCount || arrayCount > 0);
     uni.fArrayCount = arrayCount;
     uni.fType = type;
     uni.fVSLocation = kUnusedUniform;
@@ -27,12 +27,12 @@
 
 void GrGLUniformManager::setSampler(UniformHandle u, GrGLint texUnit) const {
     const Uniform& uni = fUniforms[u.toUniformIndex()];
-    GrAssert(uni.fType == kSampler2D_GrSLType);
-    GrAssert(GrGLShaderVar::kNonArray == uni.fArrayCount);
+    SkASSERT(uni.fType == kSampler2D_GrSLType);
+    SkASSERT(GrGLShaderVar::kNonArray == uni.fArrayCount);
     // FIXME: We still insert a single sampler uniform for every stage. If the shader does not
     // reference the sampler then the compiler may have optimized it out. Uncomment this assert
     // once stages insert their own samplers.
-    // GrAssert(kUnusedUniform != uni.fFSLocation || kUnusedUniform != uni.fVSLocation);
+    // SkASSERT(kUnusedUniform != uni.fFSLocation || kUnusedUniform != uni.fVSLocation);
     if (kUnusedUniform != uni.fFSLocation) {
         GR_GL_CALL(fContext.interface(), Uniform1i(uni.fFSLocation, texUnit));
     }
@@ -43,9 +43,9 @@
 
 void GrGLUniformManager::set1f(UniformHandle u, GrGLfloat v0) const {
     const Uniform& uni = fUniforms[u.toUniformIndex()];
-    GrAssert(uni.fType == kFloat_GrSLType);
-    GrAssert(GrGLShaderVar::kNonArray == uni.fArrayCount);
-    GrAssert(kUnusedUniform != uni.fFSLocation || kUnusedUniform != uni.fVSLocation);
+    SkASSERT(uni.fType == kFloat_GrSLType);
+    SkASSERT(GrGLShaderVar::kNonArray == uni.fArrayCount);
+    SkASSERT(kUnusedUniform != uni.fFSLocation || kUnusedUniform != uni.fVSLocation);
     if (kUnusedUniform != uni.fFSLocation) {
         GR_GL_CALL(fContext.interface(), Uniform1f(uni.fFSLocation, v0));
     }
@@ -59,13 +59,13 @@
                                 int arrayCount,
                                 const GrGLfloat v[]) const {
     const Uniform& uni = fUniforms[u.toUniformIndex()];
-    GrAssert(uni.fType == kFloat_GrSLType);
-    GrAssert(arrayCount > 0);
+    SkASSERT(uni.fType == kFloat_GrSLType);
+    SkASSERT(arrayCount > 0);
     ASSERT_ARRAY_UPLOAD_IN_BOUNDS(uni, offset, arrayCount);
     // This assert fires in some instances of the two-pt gradient for its VSParams.
     // Once the uniform manager is responsible for inserting the duplicate uniform
     // arrays in VS and FS driver bug workaround, this can be enabled.
-    //GrAssert(kUnusedUniform != uni.fFSLocation || kUnusedUniform != uni.fVSLocation);
+    //SkASSERT(kUnusedUniform != uni.fFSLocation || kUnusedUniform != uni.fVSLocation);
     if (kUnusedUniform != uni.fFSLocation) {
         GR_GL_CALL(fContext.interface(), Uniform1fv(uni.fFSLocation + offset, arrayCount, v));
     }
@@ -76,9 +76,9 @@
 
 void GrGLUniformManager::set2f(UniformHandle u, GrGLfloat v0, GrGLfloat v1) const {
     const Uniform& uni = fUniforms[u.toUniformIndex()];
-    GrAssert(uni.fType == kVec2f_GrSLType);
-    GrAssert(GrGLShaderVar::kNonArray == uni.fArrayCount);
-    GrAssert(kUnusedUniform != uni.fFSLocation || kUnusedUniform != uni.fVSLocation);
+    SkASSERT(uni.fType == kVec2f_GrSLType);
+    SkASSERT(GrGLShaderVar::kNonArray == uni.fArrayCount);
+    SkASSERT(kUnusedUniform != uni.fFSLocation || kUnusedUniform != uni.fVSLocation);
     if (kUnusedUniform != uni.fFSLocation) {
         GR_GL_CALL(fContext.interface(), Uniform2f(uni.fFSLocation, v0, v1));
     }
@@ -92,10 +92,10 @@
                                 int arrayCount,
                                 const GrGLfloat v[]) const {
     const Uniform& uni = fUniforms[u.toUniformIndex()];
-    GrAssert(uni.fType == kVec2f_GrSLType);
-    GrAssert(arrayCount > 0);
+    SkASSERT(uni.fType == kVec2f_GrSLType);
+    SkASSERT(arrayCount > 0);
     ASSERT_ARRAY_UPLOAD_IN_BOUNDS(uni, offset, arrayCount);
-    GrAssert(kUnusedUniform != uni.fFSLocation || kUnusedUniform != uni.fVSLocation);
+    SkASSERT(kUnusedUniform != uni.fFSLocation || kUnusedUniform != uni.fVSLocation);
     if (kUnusedUniform != uni.fFSLocation) {
         GR_GL_CALL(fContext.interface(), Uniform2fv(uni.fFSLocation + offset, arrayCount, v));
     }
@@ -106,9 +106,9 @@
 
 void GrGLUniformManager::set3f(UniformHandle u, GrGLfloat v0, GrGLfloat v1, GrGLfloat v2) const {
     const Uniform& uni = fUniforms[u.toUniformIndex()];
-    GrAssert(uni.fType == kVec3f_GrSLType);
-    GrAssert(GrGLShaderVar::kNonArray == uni.fArrayCount);
-    GrAssert(kUnusedUniform != uni.fFSLocation || kUnusedUniform != uni.fVSLocation);
+    SkASSERT(uni.fType == kVec3f_GrSLType);
+    SkASSERT(GrGLShaderVar::kNonArray == uni.fArrayCount);
+    SkASSERT(kUnusedUniform != uni.fFSLocation || kUnusedUniform != uni.fVSLocation);
     if (kUnusedUniform != uni.fFSLocation) {
         GR_GL_CALL(fContext.interface(), Uniform3f(uni.fFSLocation, v0, v1, v2));
     }
@@ -122,10 +122,10 @@
                                 int arrayCount,
                                 const GrGLfloat v[]) const {
     const Uniform& uni = fUniforms[u.toUniformIndex()];
-    GrAssert(uni.fType == kVec3f_GrSLType);
-    GrAssert(arrayCount > 0);
+    SkASSERT(uni.fType == kVec3f_GrSLType);
+    SkASSERT(arrayCount > 0);
     ASSERT_ARRAY_UPLOAD_IN_BOUNDS(uni, offset, arrayCount);
-    GrAssert(kUnusedUniform != uni.fFSLocation || kUnusedUniform != uni.fVSLocation);
+    SkASSERT(kUnusedUniform != uni.fFSLocation || kUnusedUniform != uni.fVSLocation);
     if (kUnusedUniform != uni.fFSLocation) {
         GR_GL_CALL(fContext.interface(), Uniform3fv(uni.fFSLocation + offset, arrayCount, v));
     }
@@ -140,9 +140,9 @@
                                GrGLfloat v2,
                                GrGLfloat v3) const {
     const Uniform& uni = fUniforms[u.toUniformIndex()];
-    GrAssert(uni.fType == kVec4f_GrSLType);
-    GrAssert(GrGLShaderVar::kNonArray == uni.fArrayCount);
-    GrAssert(kUnusedUniform != uni.fFSLocation || kUnusedUniform != uni.fVSLocation);
+    SkASSERT(uni.fType == kVec4f_GrSLType);
+    SkASSERT(GrGLShaderVar::kNonArray == uni.fArrayCount);
+    SkASSERT(kUnusedUniform != uni.fFSLocation || kUnusedUniform != uni.fVSLocation);
     if (kUnusedUniform != uni.fFSLocation) {
         GR_GL_CALL(fContext.interface(), Uniform4f(uni.fFSLocation, v0, v1, v2, v3));
     }
@@ -156,9 +156,9 @@
                                 int arrayCount,
                                 const GrGLfloat v[]) const {
     const Uniform& uni = fUniforms[u.toUniformIndex()];
-    GrAssert(uni.fType == kVec4f_GrSLType);
-    GrAssert(arrayCount > 0);
-    GrAssert(kUnusedUniform != uni.fFSLocation || kUnusedUniform != uni.fVSLocation);
+    SkASSERT(uni.fType == kVec4f_GrSLType);
+    SkASSERT(arrayCount > 0);
+    SkASSERT(kUnusedUniform != uni.fFSLocation || kUnusedUniform != uni.fVSLocation);
     if (kUnusedUniform != uni.fFSLocation) {
         GR_GL_CALL(fContext.interface(), Uniform4fv(uni.fFSLocation + offset, arrayCount, v));
     }
@@ -169,10 +169,10 @@
 
 void GrGLUniformManager::setMatrix3f(UniformHandle u, const GrGLfloat matrix[]) const {
     const Uniform& uni = fUniforms[u.toUniformIndex()];
-    GrAssert(uni.fType == kMat33f_GrSLType);
-    GrAssert(GrGLShaderVar::kNonArray == uni.fArrayCount);
+    SkASSERT(uni.fType == kMat33f_GrSLType);
+    SkASSERT(GrGLShaderVar::kNonArray == uni.fArrayCount);
     // TODO: Re-enable this assert once texture matrices aren't forced on all effects
-    // GrAssert(kUnusedUniform != uni.fFSLocation || kUnusedUniform != uni.fVSLocation);
+    // SkASSERT(kUnusedUniform != uni.fFSLocation || kUnusedUniform != uni.fVSLocation);
     if (kUnusedUniform != uni.fFSLocation) {
         GR_GL_CALL(fContext.interface(), UniformMatrix3fv(uni.fFSLocation, 1, false, matrix));
     }
@@ -183,9 +183,9 @@
 
 void GrGLUniformManager::setMatrix4f(UniformHandle u, const GrGLfloat matrix[]) const {
     const Uniform& uni = fUniforms[u.toUniformIndex()];
-    GrAssert(uni.fType == kMat44f_GrSLType);
-    GrAssert(GrGLShaderVar::kNonArray == uni.fArrayCount);
-    GrAssert(kUnusedUniform != uni.fFSLocation || kUnusedUniform != uni.fVSLocation);
+    SkASSERT(uni.fType == kMat44f_GrSLType);
+    SkASSERT(GrGLShaderVar::kNonArray == uni.fArrayCount);
+    SkASSERT(kUnusedUniform != uni.fFSLocation || kUnusedUniform != uni.fVSLocation);
     if (kUnusedUniform != uni.fFSLocation) {
         GR_GL_CALL(fContext.interface(), UniformMatrix4fv(uni.fFSLocation, 1, false, matrix));
     }
@@ -199,10 +199,10 @@
                                       int arrayCount,
                                       const GrGLfloat matrices[]) const {
     const Uniform& uni = fUniforms[u.toUniformIndex()];
-    GrAssert(uni.fType == kMat33f_GrSLType);
-    GrAssert(arrayCount > 0);
+    SkASSERT(uni.fType == kMat33f_GrSLType);
+    SkASSERT(arrayCount > 0);
     ASSERT_ARRAY_UPLOAD_IN_BOUNDS(uni, offset, arrayCount);
-    GrAssert(kUnusedUniform != uni.fFSLocation || kUnusedUniform != uni.fVSLocation);
+    SkASSERT(kUnusedUniform != uni.fFSLocation || kUnusedUniform != uni.fVSLocation);
     if (kUnusedUniform != uni.fFSLocation) {
         GR_GL_CALL(fContext.interface(),
                    UniformMatrix3fv(uni.fFSLocation + offset, arrayCount, false, matrices));
@@ -218,10 +218,10 @@
                                       int arrayCount,
                                       const GrGLfloat matrices[]) const {
     const Uniform& uni = fUniforms[u.toUniformIndex()];
-    GrAssert(uni.fType == kMat44f_GrSLType);
-    GrAssert(arrayCount > 0);
+    SkASSERT(uni.fType == kMat44f_GrSLType);
+    SkASSERT(arrayCount > 0);
     ASSERT_ARRAY_UPLOAD_IN_BOUNDS(uni, offset, arrayCount);
-    GrAssert(kUnusedUniform != uni.fFSLocation || kUnusedUniform != uni.fVSLocation);
+    SkASSERT(kUnusedUniform != uni.fFSLocation || kUnusedUniform != uni.fVSLocation);
     if (kUnusedUniform != uni.fFSLocation) {
         GR_GL_CALL(fContext.interface(),
                    UniformMatrix4fv(uni.fFSLocation + offset, arrayCount, false, matrices));
@@ -250,11 +250,11 @@
 
 
 void GrGLUniformManager::getUniformLocations(GrGLuint programID, const BuilderUniformArray& uniforms) {
-    GrAssert(uniforms.count() == fUniforms.count());
+    SkASSERT(uniforms.count() == fUniforms.count());
     int count = fUniforms.count();
     for (int i = 0; i < count; ++i) {
-        GrAssert(uniforms[i].fVariable.getType() == fUniforms[i].fType);
-        GrAssert(uniforms[i].fVariable.getArrayCount() == fUniforms[i].fArrayCount);
+        SkASSERT(uniforms[i].fVariable.getType() == fUniforms[i].fType);
+        SkASSERT(uniforms[i].fVariable.getArrayCount() == fUniforms[i].fArrayCount);
         GrGLint location;
         // TODO: Move the Xoom uniform array in both FS and VS bug workaround here.
         GR_GL_CALL_RET(fContext.interface(), location,
diff --git a/src/gpu/gl/GrGLUniformManager.h b/src/gpu/gl/GrGLUniformManager.h
index 863d66f..1ef262d 100644
--- a/src/gpu/gl/GrGLUniformManager.h
+++ b/src/gpu/gl/GrGLUniformManager.h
@@ -37,10 +37,10 @@
     private:
         UniformHandle(int value)
             : fValue(~value) {
-            GrAssert(isValid());
+            SkASSERT(isValid());
         }
 
-        int toUniformIndex() const { GrAssert(isValid()); return ~fValue; }
+        int toUniformIndex() const { SkASSERT(isValid()); return ~fValue; }
 
         int fValue;
         friend class GrGLUniformManager; // For accessing toUniformIndex().
diff --git a/src/gpu/gl/GrGLUtil.cpp b/src/gpu/gl/GrGLUtil.cpp
index 0c14348..8440c57 100644
--- a/src/gpu/gl/GrGLUtil.cpp
+++ b/src/gpu/gl/GrGLUtil.cpp
@@ -93,7 +93,7 @@
 
 GrGLBinding GrGLGetBindingInUseFromString(const char* versionString) {
     if (NULL == versionString) {
-        GrAssert(!"NULL GL version string.");
+        SkASSERT(!"NULL GL version string.");
         return kNone_GrGLBinding;
     }
 
@@ -129,7 +129,7 @@
 
 GrGLVersion GrGLGetVersionFromString(const char* versionString) {
     if (NULL == versionString) {
-        GrAssert(!"NULL GL version string.");
+        SkASSERT(!"NULL GL version string.");
         return 0;
     }
 
@@ -168,7 +168,7 @@
 
 GrGLSLVersion GrGLGetGLSLVersionFromString(const char* versionString) {
     if (NULL == versionString) {
-        GrAssert(!"NULL GLSL version string.");
+        SkASSERT(!"NULL GLSL version string.");
         return 0;
     }
 
diff --git a/src/gpu/gl/GrGLVertexArray.cpp b/src/gpu/gl/GrGLVertexArray.cpp
index a10f987..bf3d3b5 100644
--- a/src/gpu/gl/GrGLVertexArray.cpp
+++ b/src/gpu/gl/GrGLVertexArray.cpp
@@ -19,7 +19,7 @@
                                GrGLboolean normalized,
                                GrGLsizei stride,
                                GrGLvoid* offset) {
-    GrAssert(index >= 0 && index < fAttribArrayStates.count());
+    SkASSERT(index >= 0 && index < fAttribArrayStates.count());
     AttribArrayState* array = &fAttribArrayStates[index];
     if (!array->fEnableIsValid || !array->fEnabled) {
         GR_GL_CALL(gpu->glInterface(), EnableVertexAttribArray(index));
diff --git a/src/gpu/gl/GrGLVertexArray.h b/src/gpu/gl/GrGLVertexArray.h
index 2d1ff29..7352caf 100644
--- a/src/gpu/gl/GrGLVertexArray.h
+++ b/src/gpu/gl/GrGLVertexArray.h
@@ -26,7 +26,7 @@
 };
 
 static inline const GrGLAttribLayout& GrGLAttribTypeToLayout(GrVertexAttribType type) {
-    GrAssert(type >= 0 && type < kGrVertexAttribTypeCount);
+    SkASSERT(type >= 0 && type < kGrVertexAttribTypeCount);
     static const GrGLAttribLayout kLayouts[kGrVertexAttribTypeCount] = {
         {1, GR_GL_FLOAT, false},         // kFloat_GrVertexAttribType
         {2, GR_GL_FLOAT, false},         // kVec2f_GrVertexAttribType
diff --git a/src/gpu/gl/GrGLVertexBuffer.h b/src/gpu/gl/GrGLVertexBuffer.h
index f15a5da..1741adc 100644
--- a/src/gpu/gl/GrGLVertexBuffer.h
+++ b/src/gpu/gl/GrGLVertexBuffer.h
@@ -45,7 +45,7 @@
 
 private:
     GrGpuGL* getGpuGL() const {
-        GrAssert(this->isValid());
+        SkASSERT(this->isValid());
         return (GrGpuGL*)(this->getGpu());
     }
 
diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp
index 64f4dfe..c95edb7 100644
--- a/src/gpu/gl/GrGpuGL.cpp
+++ b/src/gpu/gl/GrGpuGL.cpp
@@ -119,7 +119,7 @@
     : GrGpu(context)
     , fGLContext(ctx) {
 
-    GrAssert(ctx.isInitialized());
+    SkASSERT(ctx.isInitialized());
 
     fCaps.reset(SkRef(ctx.info().caps()));
 
@@ -150,7 +150,7 @@
 
     fProgramCache = SkNEW_ARGS(ProgramCache, (this->glContext()));
 
-    GrAssert(this->glCaps().maxVertexAttributes() >= GrDrawState::kMaxVertexAttribCnt);
+    SkASSERT(this->glCaps().maxVertexAttributes() >= GrDrawState::kMaxVertexAttribCnt);
 
     fLastSuccessfulStencilFmtIdx = 0;
     fHWProgramID = 0;
@@ -160,7 +160,7 @@
     if (0 != fHWProgramID) {
         // detach the current program so there is no confusion on OpenGL's part
         // that we want it to be deleted
-        GrAssert(fHWProgramID == fCurrentProgram->programID());
+        SkASSERT(fHWProgramID == fCurrentProgram->programID());
         GL_CALL(UseProgram(0));
     }
 
@@ -582,7 +582,7 @@
                             GrPixelConfig dataConfig,
                             const void* data,
                             size_t rowBytes) {
-    GrAssert(NULL != data || isNewTexture);
+    SkASSERT(NULL != data || isNewTexture);
 
     size_t bpp = GrBytesPerPixel(dataConfig);
     if (!adjust_pixel_ops_params(desc.fWidth, desc.fHeight, bpp, &left, &top,
@@ -736,7 +736,7 @@
     }
 
     if (restoreGLRowLength) {
-        GrAssert(this->glCaps().unpackRowLengthSupport());
+        SkASSERT(this->glCaps().unpackRowLengthSupport());
         GL_CALL(PixelStorei(GR_GL_UNPACK_ROW_LENGTH, 0));
     }
     if (glFlipY) {
@@ -751,7 +751,7 @@
                                GrGLenum format,
                                int width, int height) {
     CLEAR_ERROR_BEFORE_ALLOC(ctx.interface());
-    GrAssert(GrGLCaps::kNone_MSFBOType != ctx.info().caps()->msFBOType());
+    SkASSERT(GrGLCaps::kNone_MSFBOType != ctx.info().caps()->msFBOType());
     bool created = false;
     if (GrGLCaps::kNVDesktop_CoverageAAType ==
         ctx.info().caps()->coverageAAType()) {
@@ -823,7 +823,7 @@
     // below here we may bind the FBO
     fHWBoundRenderTarget = NULL;
     if (desc->fRTFBOID != desc->fTexFBOID) {
-        GrAssert(desc->fSampleCnt > 0);
+        SkASSERT(desc->fSampleCnt > 0);
         GL_CALL(BindRenderbuffer(GR_GL_RENDERBUFFER,
                                desc->fMSColorRenderbufferID));
         if (!renderbuffer_storage_msaa(fGLContext,
@@ -885,7 +885,7 @@
 
 // good to set a break-point here to know when createTexture fails
 static GrTexture* return_null_texture() {
-//    GrAssert(!"null texture");
+//    SkASSERT(!"null texture");
     return NULL;
 }
 
@@ -903,7 +903,7 @@
     GrGLRenderTarget::Desc  glRTDesc;
 
     // Attempt to catch un- or wrongly initialized sample counts;
-    GrAssert(desc.fSampleCnt >= 0 && desc.fSampleCnt <= 64);
+    SkASSERT(desc.fSampleCnt >= 0 && desc.fSampleCnt <= 64);
     // We fail if the MSAA was requested and is not available.
     if (GrGLCaps::kNone_MSFBOType == this->glCaps().msFBOType() && desc.fSampleCnt) {
         //GrPrintf("MSAA RT requested but not supported on this platform.");
@@ -1024,7 +1024,7 @@
                                  GrGLStencilBuffer::Format* format) {
 
     // we shouldn't ever know one size and not the other
-    GrAssert((kUnknownBitCount == format->fStencilBits) ==
+    SkASSERT((kUnknownBitCount == format->fStencilBits) ==
              (kUnknownBitCount == format->fTotalBits));
     if (kUnknownBitCount == format->fStencilBits) {
         GR_GL_GetRenderbufferParameteriv(gl, GR_GL_RENDERBUFFER,
@@ -1047,9 +1047,9 @@
 
     // All internally created RTs are also textures. We don't create
     // SBs for a client's standalone RT (that is a RT that isn't also a texture).
-    GrAssert(rt->asTexture());
-    GrAssert(width >= rt->width());
-    GrAssert(height >= rt->height());
+    SkASSERT(rt->asTexture());
+    SkASSERT(width >= rt->width());
+    SkASSERT(height >= rt->height());
 
     int samples = rt->numSamples();
     GrGLuint sbID;
@@ -1122,7 +1122,7 @@
 #if GR_DEBUG
             GrGLenum status;
             GL_CALL_RET(status, CheckFramebufferStatus(GR_GL_FRAMEBUFFER));
-            GrAssert(GR_GL_FRAMEBUFFER_COMPLETE == status);
+            SkASSERT(GR_GL_FRAMEBUFFER_COMPLETE == status);
 #endif
         }
         return true;
@@ -1237,7 +1237,7 @@
 }
 
 GrPath* GrGpuGL::onCreatePath(const SkPath& inPath) {
-    GrAssert(this->caps()->pathStencilingSupport());
+    SkASSERT(this->caps()->pathStencilingSupport());
     return SkNEW_ARGS(GrGLPath, (this, inPath));
 }
 
@@ -1246,7 +1246,7 @@
     const GrGLRenderTarget* rt =
         static_cast<const GrGLRenderTarget*>(drawState.getRenderTarget());
 
-    GrAssert(NULL != rt);
+    SkASSERT(NULL != rt);
     const GrGLIRect& vp = rt->getViewport();
 
     if (fScissorState.fEnabled) {
@@ -1282,7 +1282,7 @@
     const GrDrawState& drawState = this->getDrawState();
     const GrRenderTarget* rt = drawState.getRenderTarget();
     // parent class should never let us get here with no RT
-    GrAssert(NULL != rt);
+    SkASSERT(NULL != rt);
 
     SkIRect clippedRect;
     if (NULL != rect) {
@@ -1337,14 +1337,14 @@
 void GrGpuGL::clearStencilClip(const SkIRect& rect, bool insideClip) {
     const GrDrawState& drawState = this->getDrawState();
     const GrRenderTarget* rt = drawState.getRenderTarget();
-    GrAssert(NULL != rt);
+    SkASSERT(NULL != rt);
 
     // this should only be called internally when we know we have a
     // stencil buffer.
-    GrAssert(NULL != rt->getStencilBuffer());
+    SkASSERT(NULL != rt->getStencilBuffer());
     GrGLint stencilBitCount =  rt->getStencilBuffer()->bits();
 #if 0
-    GrAssert(stencilBitCount > 0);
+    SkASSERT(stencilBitCount > 0);
     GrGLint clipStencilMask  = (1 << (stencilBitCount - 1));
 #else
     // we could just clear the clip bit but when we go through
@@ -1466,7 +1466,7 @@
     SkAutoSMalloc<32 * sizeof(GrColor)> scratch;
     if (rowBytes != tightRowBytes) {
         if (this->glCaps().packRowLengthSupport()) {
-            GrAssert(!(rowBytes % sizeof(GrColor)));
+            SkASSERT(!(rowBytes % sizeof(GrColor)));
             GL_CALL(PixelStorei(GR_GL_PACK_ROW_LENGTH, rowBytes / sizeof(GrColor)));
             readDstRowBytes = rowBytes;
         } else {
@@ -1481,7 +1481,7 @@
                        readRect.fWidth, readRect.fHeight,
                        format, type, readDst));
     if (readDstRowBytes != tightRowBytes) {
-        GrAssert(this->glCaps().packRowLengthSupport());
+        SkASSERT(this->glCaps().packRowLengthSupport());
         GL_CALL(PixelStorei(GR_GL_PACK_ROW_LENGTH, 0));
     }
     if (flipY && this->glCaps().packFlipYSupport()) {
@@ -1493,7 +1493,7 @@
     // API presents top-to-bottom. We must preserve the padding contents. Note
     // that the above readPixels did not overwrite the padding.
     if (readDst == buffer) {
-        GrAssert(rowBytes == readDstRowBytes);
+        SkASSERT(rowBytes == readDstRowBytes);
         if (flipY) {
             scratch.reset(tightRowBytes);
             void* tmpRow = scratch.get();
@@ -1510,7 +1510,7 @@
             }
         }
     } else {
-        GrAssert(readDst != buffer);        GrAssert(rowBytes != tightRowBytes);
+        SkASSERT(readDst != buffer);        SkASSERT(rowBytes != tightRowBytes);
         // copy from readDst to buffer while flipping y
         // const int halfY = height >> 1;
         const char* src = reinterpret_cast<const char*>(readDst);
@@ -1535,7 +1535,7 @@
 
     GrGLRenderTarget* rt =
         static_cast<GrGLRenderTarget*>(this->drawState()->getRenderTarget());
-    GrAssert(NULL != rt);
+    SkASSERT(NULL != rt);
 
     if (fHWBoundRenderTarget != rt) {
         GL_CALL(BindFramebuffer(GR_GL_FRAMEBUFFER, rt->renderFBOID()));
@@ -1598,7 +1598,7 @@
     size_t indexOffsetInBytes;
     this->setupGeometry(info, &indexOffsetInBytes);
 
-    GrAssert((size_t)info.primitiveType() < GR_ARRAY_COUNT(gPrimitiveType2GLMode));
+    SkASSERT((size_t)info.primitiveType() < GR_ARRAY_COUNT(gPrimitiveType2GLMode));
 
     if (info.isIndexed()) {
         GrGLvoid* indices =
@@ -1665,11 +1665,11 @@
 }
 
 void GrGpuGL::onGpuStencilPath(const GrPath* path, SkPath::FillType fill) {
-    GrAssert(this->caps()->pathStencilingSupport());
+    SkASSERT(this->caps()->pathStencilingSupport());
 
     GrGLuint id = static_cast<const GrGLPath*>(path)->pathID();
     GrDrawState* drawState = this->drawState();
-    GrAssert(NULL != drawState->getRenderTarget());
+    SkASSERT(NULL != drawState->getRenderTarget());
     if (NULL == drawState->getRenderTarget()->getStencilBuffer()) {
         return;
     }
@@ -1677,21 +1677,21 @@
     // Decide how to manipulate the stencil buffer based on the fill rule.
     // Also, assert that the stencil settings we set in setStencilPathSettings
     // are present.
-    GrAssert(!fStencilSettings.isTwoSided());
+    SkASSERT(!fStencilSettings.isTwoSided());
     GrGLenum fillMode;
     switch (fill) {
         case SkPath::kWinding_FillType:
             fillMode = GR_GL_COUNT_UP;
-            GrAssert(kIncClamp_StencilOp ==
+            SkASSERT(kIncClamp_StencilOp ==
                      fStencilSettings.passOp(GrStencilSettings::kFront_Face));
-            GrAssert(kIncClamp_StencilOp ==
+            SkASSERT(kIncClamp_StencilOp ==
                      fStencilSettings.failOp(GrStencilSettings::kFront_Face));
             break;
         case SkPath::kEvenOdd_FillType:
             fillMode = GR_GL_INVERT;
-            GrAssert(kInvert_StencilOp ==
+            SkASSERT(kInvert_StencilOp ==
                      fStencilSettings.passOp(GrStencilSettings::kFront_Face));
-            GrAssert(kInvert_StencilOp ==
+            SkASSERT(kInvert_StencilOp ==
                 fStencilSettings.failOp(GrStencilSettings::kFront_Face));
             break;
         default:
@@ -1708,7 +1708,7 @@
     if (rt->needsResolve()) {
         // Some extensions automatically resolves the texture when it is read.
         if (this->glCaps().usesMSAARenderBuffers()) {
-            GrAssert(rt->textureFBOID() != rt->renderFBOID());
+            SkASSERT(rt->textureFBOID() != rt->renderFBOID());
             GL_CALL(BindFramebuffer(GR_GL_READ_FRAMEBUFFER, rt->renderFBOID()));
             GL_CALL(BindFramebuffer(GR_GL_DRAW_FRAMEBUFFER, rt->textureFBOID()));
             // make sure we go through flushRenderTarget() since we've modified
@@ -1768,7 +1768,7 @@
     GR_STATIC_ASSERT(5 == kLEqual_StencilFunc);
     GR_STATIC_ASSERT(6 == kEqual_StencilFunc);
     GR_STATIC_ASSERT(7 == kNotEqual_StencilFunc);
-    GrAssert((unsigned) basicFunc < kBasicStencilFuncCount);
+    SkASSERT((unsigned) basicFunc < kBasicStencilFuncCount);
 
     return gTable[basicFunc];
 }
@@ -1793,7 +1793,7 @@
     GR_STATIC_ASSERT(5 == kDecClamp_StencilOp);
     GR_STATIC_ASSERT(6 == kZero_StencilOp);
     GR_STATIC_ASSERT(7 == kInvert_StencilOp);
-    GrAssert((unsigned) op < kStencilOpCount);
+    SkASSERT((unsigned) op < kStencilOpCount);
     return gTable[op];
 }
 
@@ -1825,7 +1825,7 @@
 
 void GrGpuGL::flushStencil(DrawType type) {
     if (kStencilPath_DrawType == type) {
-        GrAssert(!fStencilSettings.isTwoSided());
+        SkASSERT(!fStencilSettings.isTwoSided());
         // Just the func, ref, and mask is set here. The op and write mask are params to the call
         // that draws the path to the SB (glStencilFillPath)
         GrGLenum func =
@@ -1999,7 +1999,7 @@
 }
 
 void GrGpuGL::bindTexture(int unitIdx, const GrTextureParams& params, GrGLTexture* texture) {
-    GrAssert(NULL != texture);
+    SkASSERT(NULL != texture);
 
     // If we created a rt/tex and rendered to it without using a texture and now we're texturing
     // from the rt it will still be the last bound texture, but it needs resolving. So keep this
@@ -2132,7 +2132,7 @@
 }
 
 void GrGpuGL::notifyRenderTargetDelete(GrRenderTarget* renderTarget) {
-    GrAssert(NULL != renderTarget);
+    SkASSERT(NULL != renderTarget);
     if (fHWBoundRenderTarget == renderTarget) {
         fHWBoundRenderTarget = NULL;
     }
@@ -2259,7 +2259,7 @@
 }
 
 void GrGpuGL::setTextureUnit(int unit) {
-    GrAssert(unit >= 0 && unit < fHWBoundTextures.count());
+    SkASSERT(unit >= 0 && unit < fHWBoundTextures.count());
     if (unit != fHWActiveTextureUnitIdx) {
         GL_CALL(ActiveTexture(GR_GL_TEXTURE0 + unit));
         fHWActiveTextureUnitIdx = unit;
@@ -2339,7 +2339,7 @@
     GrGLRenderTarget* rt = static_cast<GrGLRenderTarget*>(surface->asRenderTarget());
     GrGLuint tempFBOID;
     if (NULL == rt) {
-        GrAssert(NULL != surface->asTexture());
+        SkASSERT(NULL != surface->asTexture());
         GrGLuint texID = static_cast<GrGLTexture*>(surface->asTexture())->textureID();
         GR_GL_CALL(gl, GenFramebuffers(1, &tempFBOID));
         GR_GL_CALL(gl, BindFramebuffer(fboTarget, tempFBOID));
@@ -2401,7 +2401,7 @@
         GrGLIRect srcVP;
         srcFBO = bind_surface_as_fbo(this->glInterface(), src, GR_GL_FRAMEBUFFER, &srcVP);
         GrGLTexture* dstTex = static_cast<GrGLTexture*>(dst->asTexture());
-        GrAssert(NULL != dstTex);
+        SkASSERT(NULL != dstTex);
         // We modified the bound FBO
         fHWBoundRenderTarget = NULL;
         GrGLIRect srcGLRect;
@@ -2498,7 +2498,7 @@
     }
     if (!copied && inheritedCouldCopy) {
         copied = INHERITED::onCopySurface(dst, src, srcRect, dstPoint);
-        GrAssert(copied);
+        SkASSERT(copied);
     }
     return copied;
 }
@@ -2532,7 +2532,7 @@
                                                 GrGpuGL* gpu,
                                                 const GrGLVertexBuffer* vbuffer,
                                                 const GrGLIndexBuffer* ibuffer) {
-    GrAssert(NULL != vbuffer);
+    SkASSERT(NULL != vbuffer);
     GrGLAttribArrayState* attribState;
 
     // We use a vertex array if we're on a core profile and the verts are in a VBO.
diff --git a/src/gpu/gl/GrGpuGL.h b/src/gpu/gl/GrGpuGL.h
index b5ea2a7..672df42 100644
--- a/src/gpu/gl/GrGpuGL.h
+++ b/src/gpu/gl/GrGpuGL.h
@@ -313,7 +313,7 @@
 
         void setVertexArrayID(GrGpuGL* gpu, GrGLuint arrayID) {
             if (!gpu->glCaps().vertexArrayObjectSupport()) {
-                GrAssert(0 == arrayID);
+                SkASSERT(0 == arrayID);
                 return;
             }
             if (!fBoundVertexArrayIDIsValid || arrayID != fBoundVertexArrayID) {
diff --git a/src/gpu/gl/GrGpuGL_program.cpp b/src/gpu/gl/GrGpuGL_program.cpp
index 20967c6..7ead7b7 100644
--- a/src/gpu/gl/GrGpuGL_program.cpp
+++ b/src/gpu/gl/GrGpuGL_program.cpp
@@ -25,12 +25,12 @@
 
 struct GrGpuGL::ProgramCache::ProgDescLess {
     bool operator() (const GrGLProgramDesc& desc, const Entry* entry) {
-        GrAssert(NULL != entry->fProgram.get());
+        SkASSERT(NULL != entry->fProgram.get());
         return GrGLProgramDesc::Less(desc, entry->fProgram->getDesc());
     }
 
     bool operator() (const Entry* entry, const GrGLProgramDesc& desc) {
-        GrAssert(NULL != entry->fProgram.get());
+        SkASSERT(NULL != entry->fProgram.get());
         return GrGLProgramDesc::Less(entry->fProgram->getDesc(), desc);
     }
 };
@@ -70,7 +70,7 @@
 
 void GrGpuGL::ProgramCache::abandon() {
     for (int i = 0; i < fCount; ++i) {
-        GrAssert(NULL != fEntries[i]->fProgram.get());
+        SkASSERT(NULL != fEntries[i]->fProgram.get());
         fEntries[i]->fProgram->abandon();
         fEntries[i]->fProgram.reset(NULL);
     }
@@ -99,7 +99,7 @@
     hashIdx &=((1 << kHashBits) - 1);
     Entry* hashedEntry = fHashTable[hashIdx];
     if (NULL != hashedEntry && hashedEntry->fProgram->getDesc() == desc) {
-        GrAssert(NULL != hashedEntry->fProgram);
+        SkASSERT(NULL != hashedEntry->fProgram);
         entry = hashedEntry;
     }
 
@@ -129,7 +129,7 @@
             purgeIdx = fCount++;
             fEntries[purgeIdx] = entry;
         } else {
-            GrAssert(fCount == kMaxEntries);
+            SkASSERT(fCount == kMaxEntries);
             purgeIdx = 0;
             for (int i = 1; i < kMaxEntries; ++i) {
                 if (fEntries[i]->fLRUStamp < fEntries[purgeIdx]->fLRUStamp) {
@@ -142,7 +142,7 @@
                 fHashTable[purgedHashIdx] = NULL;
             }
         }
-        GrAssert(fEntries[purgeIdx] == entry);
+        SkASSERT(fEntries[purgeIdx] == entry);
         entry->fProgram.reset(program);
         // We need to shift fEntries around so that the entry currently at purgeIdx is placed
         // just before the entry at ~entryIdx (in order to keep fEntries sorted by descriptor).
@@ -166,13 +166,13 @@
             fEntries[entryIdx - 1] = entry;
         }
 #if GR_DEBUG
-        GrAssert(NULL != fEntries[0]->fProgram.get());
+        SkASSERT(NULL != fEntries[0]->fProgram.get());
         for (int i = 0; i < fCount - 1; ++i) {
-            GrAssert(NULL != fEntries[i + 1]->fProgram.get());
+            SkASSERT(NULL != fEntries[i + 1]->fProgram.get());
             const GrGLProgramDesc& a = fEntries[i]->fProgram->getDesc();
             const GrGLProgramDesc& b = fEntries[i + 1]->fProgram->getDesc();
-            GrAssert(GrGLProgramDesc::Less(a, b));
-            GrAssert(!GrGLProgramDesc::Less(b, a));
+            SkASSERT(GrGLProgramDesc::Less(a, b));
+            SkASSERT(!GrGLProgramDesc::Less(b, a));
         }
 #endif
     }
@@ -259,7 +259,7 @@
     const GrDrawState& drawState = this->getDrawState();
 
     // GrGpu::setupClipAndFlushState should have already checked this and bailed if not true.
-    GrAssert(NULL != drawState.getRenderTarget());
+    SkASSERT(NULL != drawState.getRenderTarget());
 
     if (kStencilPath_DrawType == type) {
         this->flushPathStencilMatrix();
@@ -291,7 +291,7 @@
                                                         colorStages.begin(),
                                                         coverageStages.begin()));
         if (NULL == fCurrentProgram.get()) {
-            GrAssert(!"Failed to create program!");
+            SkASSERT(!"Failed to create program!");
             return false;
         }
         fCurrentProgram.get()->ref();
@@ -353,13 +353,13 @@
             GrCrash("Unknown geometry src type!");
     }
 
-    GrAssert(NULL != vbuf);
-    GrAssert(!vbuf->isLocked());
+    SkASSERT(NULL != vbuf);
+    SkASSERT(!vbuf->isLocked());
     vertexOffsetInBytes += vbuf->baseOffset();
 
     GrGLIndexBuffer* ibuf = NULL;
     if (info.isIndexed()) {
-        GrAssert(NULL != indexOffsetInBytes);
+        SkASSERT(NULL != indexOffsetInBytes);
 
         switch (this->getGeomSrc().fIndexSrc) {
         case kBuffer_GeometrySrcType:
@@ -377,8 +377,8 @@
             GrCrash("Unknown geometry src type!");
         }
 
-        GrAssert(NULL != ibuf);
-        GrAssert(!ibuf->isLocked());
+        SkASSERT(NULL != ibuf);
+        SkASSERT(!ibuf->isLocked());
         *indexOffsetInBytes += ibuf->baseOffset();
     }
     GrGLAttribArrayState* attribState =
diff --git a/src/gpu/gl/debug/GrDebugGL.cpp b/src/gpu/gl/debug/GrDebugGL.cpp
index fb390b6..03ff36d 100644
--- a/src/gpu/gl/debug/GrDebugGL.cpp
+++ b/src/gpu/gl/debug/GrDebugGL.cpp
@@ -112,7 +112,7 @@
 
 void GrDebugGL::setVertexArray(GrVertexArrayObj* vertexArray) {
     if (NULL != vertexArray) {
-        GrAssert(!vertexArray->getDeleted());
+        SkASSERT(!vertexArray->getDeleted());
     }
     SkRefCnt_SafeAssign(fVertexArray, vertexArray);
 }
diff --git a/src/gpu/gl/debug/GrDebugGL.h b/src/gpu/gl/debug/GrDebugGL.h
index 795e388..ad6edff 100644
--- a/src/gpu/gl/debug/GrDebugGL.h
+++ b/src/gpu/gl/debug/GrDebugGL.h
@@ -90,7 +90,7 @@
 
     static GrDebugGL *getInstance() {
         // someone should admit to actually using this class
-        GrAssert(0 < gStaticRefCount);
+        SkASSERT(0 < gStaticRefCount);
 
         if (NULL == gObj) {
             gObj = SkNEW(GrDebugGL);
@@ -106,7 +106,7 @@
     }
 
     static void staticUnRef() {
-        GrAssert(gStaticRefCount > 0);
+        SkASSERT(gStaticRefCount > 0);
         gStaticRefCount--;
         if (0 == gStaticRefCount) {
             SkDELETE(gObj);