| Index: src/gpu/effects/GrTextureStripAtlas.h
|
| diff --git a/src/gpu/effects/GrTextureStripAtlas.h b/src/gpu/effects/GrTextureStripAtlas.h
|
| index 58539fc0acb8730deaf068971a129f86c5a52ca6..80b33bbac4bd7504246d481bea440b1b512aab30 100644
|
| --- a/src/gpu/effects/GrTextureStripAtlas.h
|
| +++ b/src/gpu/effects/GrTextureStripAtlas.h
|
| @@ -61,11 +61,11 @@ public:
|
| * texture2D(sampler, vec2(x, yOffset + y * scaleFactor))
|
| *
|
| * Where yOffset, returned by getYOffset(), is the offset to the start of the row within the
|
| - * atlas and scaleFactor, returned by getVerticalScaleFactor(), is the y-scale of the row,
|
| - * relative to the height of the overall atlas texture.
|
| + * atlas and scaleFactor, returned by getNormalizedTexelHeight, is the normalized height of
|
| + * one texel row.
|
| */
|
| SkScalar getYOffset(int row) const { return SkIntToScalar(row) / fNumRows; }
|
| - SkScalar getVerticalScaleFactor() const { return SkIntToScalar(fDesc.fRowHeight) / fDesc.fHeight; }
|
| + SkScalar getNormalizedTexelHeight() const { return fNormalizedYHeight; }
|
|
|
| GrContext* getContext() const { return fDesc.fContext; }
|
| GrTexture* getTexture() const { return fTexture; }
|
| @@ -168,6 +168,8 @@ private:
|
| const uint16_t fNumRows;
|
| GrTexture* fTexture;
|
|
|
| + SkScalar fNormalizedYHeight;
|
| +
|
| // Array of AtlasRows which store the state of all our rows. Stored in a contiguous array, in
|
| // order that they appear in our texture, this means we can subtract this pointer from a row
|
| // pointer to get its index in the texture, and can save storing a row number in AtlasRow.
|
|
|