Pull non-substantive changes out of omnibus GrSurface CL
https://skia-review.googlesource.com/c/26363 (Remove origin field from GrSurface) is
already too large. This pulls some of the cosmetic changes out for separate review.
Change-Id: I1d8b95522144b2f4cbd916ef38faa3dde6f78087
Reviewed-on: https://skia-review.googlesource.com/27840
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/tests/GrSurfaceTest.cpp b/tests/GrSurfaceTest.cpp
index 71575c7..5c665d1 100644
--- a/tests/GrSurfaceTest.cpp
+++ b/tests/GrSurfaceTest.cpp
@@ -25,10 +25,11 @@
DEF_GPUTEST_FOR_NULLGL_CONTEXT(GrSurface, reporter, ctxInfo) {
GrContext* context = ctxInfo.grContext();
GrSurfaceDesc desc;
- desc.fConfig = kRGBA_8888_GrPixelConfig;
desc.fFlags = kRenderTarget_GrSurfaceFlag;
+ desc.fOrigin = kBottomLeft_GrSurfaceOrigin;
desc.fWidth = 256;
desc.fHeight = 256;
+ desc.fConfig = kRGBA_8888_GrPixelConfig;
desc.fSampleCnt = 0;
sk_sp<GrSurface> texRT1 = context->resourceProvider()->createTexture(desc, SkBudgeted::kNo);
@@ -42,6 +43,7 @@
static_cast<GrSurface*>(texRT1->asTexture()));
desc.fFlags = kNone_GrSurfaceFlags;
+ desc.fOrigin = kTopLeft_GrSurfaceOrigin;
sk_sp<GrTexture> tex1 = context->resourceProvider()->createTexture(desc, SkBudgeted::kNo);
REPORTER_ASSERT(reporter, nullptr == tex1->asRenderTarget());
REPORTER_ASSERT(reporter, tex1.get() == tex1->asTexture());
@@ -113,8 +115,8 @@
for (GrSurfaceOrigin origin : { kTopLeft_GrSurfaceOrigin, kBottomLeft_GrSurfaceOrigin }) {
desc.fFlags = kNone_GrSurfaceFlags;
desc.fOrigin = origin;
- desc.fSampleCnt = 0;
desc.fConfig = config;
+ desc.fSampleCnt = 0;
sk_sp<GrSurface> tex = resourceProvider->createTexture(desc, SkBudgeted::kNo);
REPORTER_ASSERT(reporter, SkToBool(tex.get()) == caps->isConfigTexturable(desc.fConfig));