Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(227)

Unified Diff: tests/ClipBoundsTest.cpp

Issue 1914883002: Refactor drawContext/RenderTarget creation (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix variable name Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/ClearTest.cpp ('k') | tests/PrimitiveProcessorTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/ClipBoundsTest.cpp
diff --git a/tests/ClipBoundsTest.cpp b/tests/ClipBoundsTest.cpp
index abdd3f44fa1e4e3b1d36fda9bdf2aa5fd6c28779..5660afdc27aa2cdb00b422509230113d3cbb1792 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);
« no previous file with comments | « tests/ClearTest.cpp ('k') | tests/PrimitiveProcessorTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698