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
This commit is contained in:
commit-bot@chromium.org 2013-08-14 12:09:00 +00:00
parent 73ab296536
commit 96ae688f03
8 changed files with 11 additions and 11 deletions

View File

@ -364,7 +364,7 @@ void GrGLArithmeticEffect::emitCode(GrGLShaderBuilder* builder,
dstColor = builder->dstColor();
}
GrAssert(NULL != dstColor);
SkASSERT(NULL != dstColor);
fKUni = builder->addUniform(GrGLShaderBuilder::kFragment_ShaderType,
kVec4f_GrSLType, "k");
const char* kUni = builder->getUniformCStr(fKUni);

View File

@ -35,7 +35,7 @@ static float adjust_sigma(float sigma, int *scaleFactor, int *radius) {
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 @@ GrTexture* GaussianBlur(GrContext* context,
bool cropToRect,
float sigmaX,
float sigmaY) {
GrAssert(NULL != context);
SkASSERT(NULL != context);
GrContext::AutoRenderTarget art(context);
@ -140,7 +140,7 @@ GrTexture* GaussianBlur(GrContext* context,
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());

View File

@ -219,7 +219,7 @@ GrEffectRef* GrMagnifierEffect::TestCreate(SkMWCRandom* random,
inset));
GrEffectRef* effect;
filter->asNewEffect(&effect, textures[0], SkIPoint::Make(0, 0));
GrAssert(NULL != effect);
SkASSERT(NULL != effect);
return effect;
}

View File

@ -470,8 +470,8 @@ void GrGLMatrixConvolutionEffect::setData(const GrGLUniformManager& uman,
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();

View File

@ -377,7 +377,7 @@ void GrGLMorphologyEffect::setData(const GrGLUniformManager& uman,
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:

View File

@ -910,7 +910,7 @@ GrGradientEffect::GrGradientEffect(GrContext* ctx,
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;

View File

@ -658,7 +658,7 @@ void GrGLConical2Gradient::setData(const GrGLUniformManager& uman,
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();

View File

@ -640,7 +640,7 @@ void GrGLRadial2Gradient::setData(const GrGLUniformManager& uman,
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 ||