Refactor drawContext/RenderTarget creation
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1914883002
Committed: https://skia.googlesource.com/skia/+/2f1c42e8448bbbadeb3df1c626faa90aa33f8907
Review-Url: https://codereview.chromium.org/1914883002
diff --git a/tests/ClipBoundsTest.cpp b/tests/ClipBoundsTest.cpp
index abdd3f4..5660afd 100644
--- a/tests/ClipBoundsTest.cpp
+++ b/tests/ClipBoundsTest.cpp
@@ -17,20 +17,8 @@
static const int kXSize = 100;
static const int kYSize = 100;
- GrSurfaceDesc desc;
- desc.fFlags = kRenderTarget_GrSurfaceFlag;
- desc.fConfig = kAlpha_8_GrPixelConfig;
- desc.fWidth = kXSize;
- desc.fHeight = kYSize;
-
- SkAutoTUnref<GrTexture> texture(
- ctxInfo.fGrContext->textureProvider()->createTexture(desc, SkBudgeted::kYes, nullptr, 0));
- if (!texture) {
- return;
- }
-
- SkIRect intScreen = SkIRect::MakeWH(kXSize, kYSize);
- SkRect screen = SkRect::Make(intScreen);
+ const SkIRect intScreen = SkIRect::MakeWH(kXSize, kYSize);
+ const SkRect screen = SkRect::Make(intScreen);
SkRect clipRect(screen);
clipRect.outset(10, 10);
@@ -56,7 +44,7 @@
clipData.setClipStack(&stack);
SkIRect devGrClipBound;
- clipData.getConservativeBounds(texture->width(), texture->height(),
+ clipData.getConservativeBounds(kXSize, kYSize,
&devGrClipBound,
&isIntersectionOfRects);