aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/ClipBoundsTest.cpp
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2016-04-28 09:55:15 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-04-28 09:55:15 -0700
commitd4c741e3d0e0fa633399691c47f76b6c7841ee83 (patch)
tree3a242889fa24e3e209df4e0ec76049fbdde61721 /tests/ClipBoundsTest.cpp
parent23bd7e9273438863149ed58c089e9bf457e9892d (diff)
Refactor drawContext/RenderTarget creation
Diffstat (limited to 'tests/ClipBoundsTest.cpp')
-rw-r--r--tests/ClipBoundsTest.cpp18
1 files changed, 3 insertions, 15 deletions
diff --git a/tests/ClipBoundsTest.cpp b/tests/ClipBoundsTest.cpp
index abdd3f44fa..5660afdc27 100644
--- a/tests/ClipBoundsTest.cpp
+++ b/tests/ClipBoundsTest.cpp
@@ -17,20 +17,8 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(GrClipBounds, reporter, ctxInfo) {
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 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(GrClipBounds, reporter, ctxInfo) {
clipData.setClipStack(&stack);
SkIRect devGrClipBound;
- clipData.getConservativeBounds(texture->width(), texture->height(),
+ clipData.getConservativeBounds(kXSize, kYSize,
&devGrClipBound,
&isIntersectionOfRects);