| Index: gm/texturedomaineffect.cpp
|
| diff --git a/gm/texturedomaineffect.cpp b/gm/texturedomaineffect.cpp
|
| index 37d256d1b7af33b8787604220d7a2f84865a659e..d73e11d60ff9c3d8462ef0009b73153f3a148702 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 int canvasWidth = kDrawPad +
|
| + (kTargetWidth + 2 * kDrawPad) * GrTextureDomain::kModeCount +
|
| + kTestPad * GrTextureDomain::kModeCount;
|
| + return SkISize::Make(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,6 +148,10 @@ protected:
|
| }
|
|
|
| private:
|
| + static const SkScalar kDrawPad = 10.f;
|
| + static const SkScalar kTestPad = 10.f;
|
| + static const int kTargetWidth = 100;
|
| + static const int kTargetHeight = 100;
|
| SkBitmap fBmp;
|
|
|
| typedef GM INHERITED;
|
|
|