effects: Replaces uses of GrAssert with SkASSERT.
This is the first step on migrating from GrAssert to SkASSERT as requested by
Brian.
R=bsalomon@google.com, robertphillips@google.com, scroggo@google.com
Author: tfarina@chromium.org
Review URL: https://chromiumcodereview.appspot.com/22418006
git-svn-id: http://skia.googlecode.com/svn/trunk@10706 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/effects/SkArithmeticMode.cpp b/src/effects/SkArithmeticMode.cpp
index 43c62ec..ed29130 100644
--- a/src/effects/SkArithmeticMode.cpp
+++ b/src/effects/SkArithmeticMode.cpp
@@ -364,7 +364,7 @@
dstColor = builder->dstColor();
}
- GrAssert(NULL != dstColor);
+ SkASSERT(NULL != dstColor);
fKUni = builder->addUniform(GrGLShaderBuilder::kFragment_ShaderType,
kVec4f_GrSLType, "k");
const char* kUni = builder->getUniformCStr(fKUni);
diff --git a/src/effects/SkGpuBlurUtils.cpp b/src/effects/SkGpuBlurUtils.cpp
index 5fc5181..fce5b6b 100644
--- a/src/effects/SkGpuBlurUtils.cpp
+++ b/src/effects/SkGpuBlurUtils.cpp
@@ -35,7 +35,7 @@
sigma *= 0.5f;
}
*radius = static_cast<int>(ceilf(sigma * 3.0f));
- GrAssert(*radius <= GrConvolutionEffect::kMaxKernelRadius);
+ SkASSERT(*radius <= GrConvolutionEffect::kMaxKernelRadius);
return sigma;
}
@@ -119,7 +119,7 @@
bool cropToRect,
float sigmaX,
float sigmaY) {
- GrAssert(NULL != context);
+ SkASSERT(NULL != context);
GrContext::AutoRenderTarget art(context);
@@ -140,7 +140,7 @@
GrContext::AutoClip acs(context, SkRect::MakeWH(srcRect.width(), srcRect.height()));
- GrAssert(kBGRA_8888_GrPixelConfig == srcTexture->config() ||
+ SkASSERT(kBGRA_8888_GrPixelConfig == srcTexture->config() ||
kRGBA_8888_GrPixelConfig == srcTexture->config() ||
kAlpha_8_GrPixelConfig == srcTexture->config());
diff --git a/src/effects/SkMagnifierImageFilter.cpp b/src/effects/SkMagnifierImageFilter.cpp
index f4a72b8..f7fbda2 100644
--- a/src/effects/SkMagnifierImageFilter.cpp
+++ b/src/effects/SkMagnifierImageFilter.cpp
@@ -219,7 +219,7 @@
inset));
GrEffectRef* effect;
filter->asNewEffect(&effect, textures[0], SkIPoint::Make(0, 0));
- GrAssert(NULL != effect);
+ SkASSERT(NULL != effect);
return effect;
}
diff --git a/src/effects/SkMatrixConvolutionImageFilter.cpp b/src/effects/SkMatrixConvolutionImageFilter.cpp
index b3ce7ec..bedd6f8 100644
--- a/src/effects/SkMatrixConvolutionImageFilter.cpp
+++ b/src/effects/SkMatrixConvolutionImageFilter.cpp
@@ -470,8 +470,8 @@
const GrMatrixConvolutionEffect& conv = drawEffect.castEffect<GrMatrixConvolutionEffect>();
GrTexture& texture = *conv.texture(0);
// the code we generated was for a specific kernel size
- GrAssert(conv.kernelSize() == fKernelSize);
- GrAssert(conv.tileMode() == fTileMode);
+ SkASSERT(conv.kernelSize() == fKernelSize);
+ SkASSERT(conv.tileMode() == fTileMode);
float imageIncrement[2];
float ySign = texture.origin() == kTopLeft_GrSurfaceOrigin ? 1.0f : -1.0f;
imageIncrement[0] = 1.0f / texture.width();
diff --git a/src/effects/SkMorphologyImageFilter.cpp b/src/effects/SkMorphologyImageFilter.cpp
index fb8fd00..94a6327 100644
--- a/src/effects/SkMorphologyImageFilter.cpp
+++ b/src/effects/SkMorphologyImageFilter.cpp
@@ -377,7 +377,7 @@
const Gr1DKernelEffect& kern = drawEffect.castEffect<Gr1DKernelEffect>();
GrTexture& texture = *kern.texture(0);
// the code we generated was for a specific kernel radius
- GrAssert(kern.radius() == fRadius);
+ SkASSERT(kern.radius() == fRadius);
float imageIncrement[2] = { 0 };
switch (kern.direction()) {
case Gr1DKernelEffect::kX_Direction:
diff --git a/src/effects/gradients/SkGradientShader.cpp b/src/effects/gradients/SkGradientShader.cpp
index de43b69..4e528b5 100644
--- a/src/effects/gradients/SkGradientShader.cpp
+++ b/src/effects/gradients/SkGradientShader.cpp
@@ -910,7 +910,7 @@
desc.fContext = ctx;
desc.fConfig = SkBitmapConfig2GrPixelConfig(bitmap.config());
fAtlas = GrTextureStripAtlas::GetAtlas(desc);
- GrAssert(NULL != fAtlas);
+ SkASSERT(NULL != fAtlas);
// We always filter the gradient table. Each table is one row of a texture, so always y-clamp.
GrTextureParams params;
diff --git a/src/effects/gradients/SkTwoPointConicalGradient.cpp b/src/effects/gradients/SkTwoPointConicalGradient.cpp
index 37b49f0..664ec91 100644
--- a/src/effects/gradients/SkTwoPointConicalGradient.cpp
+++ b/src/effects/gradients/SkTwoPointConicalGradient.cpp
@@ -658,7 +658,7 @@
const GrDrawEffect& drawEffect) {
INHERITED::setData(uman, drawEffect);
const GrConical2Gradient& data = drawEffect.castEffect<GrConical2Gradient>();
- GrAssert(data.isDegenerate() == fIsDegenerate);
+ SkASSERT(data.isDegenerate() == fIsDegenerate);
SkScalar centerX1 = data.center();
SkScalar radius0 = data.radius();
SkScalar diffRadius = data.diffRadius();
diff --git a/src/effects/gradients/SkTwoPointRadialGradient.cpp b/src/effects/gradients/SkTwoPointRadialGradient.cpp
index 989c139..3d526a6 100644
--- a/src/effects/gradients/SkTwoPointRadialGradient.cpp
+++ b/src/effects/gradients/SkTwoPointRadialGradient.cpp
@@ -640,7 +640,7 @@
const GrDrawEffect& drawEffect) {
INHERITED::setData(uman, drawEffect);
const GrRadial2Gradient& data = drawEffect.castEffect<GrRadial2Gradient>();
- GrAssert(data.isDegenerate() == fIsDegenerate);
+ SkASSERT(data.isDegenerate() == fIsDegenerate);
SkScalar centerX1 = data.center();
SkScalar radius0 = data.radius();
if (fCachedCenter != centerX1 ||