| Index: gm/texturedomaineffect.cpp
|
| diff --git a/gm/texturedomaineffect.cpp b/gm/texturedomaineffect.cpp
|
| index 37d256d1b7af33b8787604220d7a2f84865a659e..6cc979991002748ef20be74afc86e69f6870d96f 100644
|
| --- a/gm/texturedomaineffect.cpp
|
| +++ b/gm/texturedomaineffect.cpp
|
| @@ -35,7 +35,10 @@ protected:
|
| }
|
|
|
| virtual SkISize onISize() SK_OVERRIDE {
|
| - return SkISize::Make(400, 800);
|
| + const SkScalar canvasWidth = kDrawPad +
|
| + (kTargetWidth + 2 * kDrawPad) * GrTextureDomain::kModeCount +
|
| + kTestPad * GrTextureDomain::kModeCount;
|
| + return SkISize::Make(SkScalarCeilToInt(canvasWidth), 800);
|
| }
|
|
|
| virtual uint32_t onGetFlags() const SK_OVERRIDE {
|
| @@ -44,7 +47,7 @@ protected:
|
| }
|
|
|
| virtual void onOnceBeforeDraw() SK_OVERRIDE {
|
| - fBmp.allocN32Pixels(100, 100);
|
| + fBmp.allocN32Pixels(kTargetWidth, kTargetHeight);
|
| SkCanvas canvas(fBmp);
|
| canvas.clear(0x00000000);
|
| SkPaint paint;
|
| @@ -94,9 +97,6 @@ protected:
|
| return;
|
| }
|
|
|
| - static const SkScalar kDrawPad = 10.f;
|
| - static const SkScalar kTestPad = 10.f;
|
| -
|
| SkTArray<SkMatrix> textureMatrices;
|
| textureMatrices.push_back().setIDiv(texture->width(), texture->height());
|
| textureMatrices.push_back() = textureMatrices[0];
|
| @@ -148,11 +148,19 @@ protected:
|
| }
|
|
|
| private:
|
| + static const SkScalar kDrawPad;
|
| + static const SkScalar kTestPad;
|
| + static const int kTargetWidth = 100;
|
| + static const int kTargetHeight = 100;
|
| SkBitmap fBmp;
|
|
|
| typedef GM INHERITED;
|
| };
|
|
|
| +// Windows builds did not like SkScalar initialization in class :(
|
| +const SkScalar TextureDomainEffect::kDrawPad = 10.f;
|
| +const SkScalar TextureDomainEffect::kTestPad = 10.f;
|
| +
|
| DEF_GM( return SkNEW(TextureDomainEffect); )
|
| }
|
|
|
|
|