| Index: src/gpu/effects/GrBitmapTextGeoProc.cpp
|
| diff --git a/src/gpu/effects/GrBitmapTextGeoProc.cpp b/src/gpu/effects/GrBitmapTextGeoProc.cpp
|
| index 9496dbffc33540c3d64d35e1112a28d3d8a524ca..d83cf5595a3e665ca7b00460eb76eb2bcfc819bd 100644
|
| --- a/src/gpu/effects/GrBitmapTextGeoProc.cpp
|
| +++ b/src/gpu/effects/GrBitmapTextGeoProc.cpp
|
| @@ -31,15 +31,15 @@ public:
|
| // compute numbers to be hardcoded to convert texture coordinates from int to float
|
| SkASSERT(cte.numTextures() == 1);
|
| GrTexture* atlas = cte.textureAccess(0).getTexture();
|
| - SkASSERT(atlas);
|
| + SkASSERT(atlas && SkIsPow2(atlas->width()) && SkIsPow2(atlas->height()));
|
| SkScalar recipWidth = 1.0f / atlas->width();
|
| SkScalar recipHeight = 1.0f / atlas->height();
|
|
|
| GrGLVertToFrag v(kVec2f_GrSLType);
|
| pb->addVarying("TextureCoords", &v);
|
| vsBuilder->codeAppendf("%s = vec2(%.*f, %.*f) * %s;", v.vsOut(),
|
| - SK_FLT_DECIMAL_DIG, recipWidth,
|
| - SK_FLT_DECIMAL_DIG, recipHeight,
|
| + GR_SIGNIFICANT_POW2_DECIMAL_DIG, recipWidth,
|
| + GR_SIGNIFICANT_POW2_DECIMAL_DIG, recipHeight,
|
| cte.inTextureCoords()->fName);
|
|
|
| // Setup pass through color
|
|
|