diff options
author | Robert Phillips <robertphillips@google.com> | 2017-08-29 08:26:54 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-08-29 17:36:31 +0000 |
commit | b0e93a22bbfad05bb834e33387880ece56e0f6d2 (patch) | |
tree | 41862bc027841d9d03a06661f2f3ef820610a9ac /tests/ResourceCacheTest.cpp | |
parent | aa0ce825b877871f73532beb6fde6bf2f80e99dd (diff) |
Remove origin field from GrSurface (take 2)
This mainly consists of rm origin from GrSurface and the wrapBackEnd*
methods and then re-adding an explicit origin parameter to all the
GrGpu methods that need it.
TBR=bsalomon@google.com
Change-Id: I4248b2a4749ef844da4233ce53b0dc504bc9eb74
Reviewed-on: https://skia-review.googlesource.com/30280
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'tests/ResourceCacheTest.cpp')
-rw-r--r-- | tests/ResourceCacheTest.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/ResourceCacheTest.cpp b/tests/ResourceCacheTest.cpp index 48f50a0c48..c10d581288 100644 --- a/tests/ResourceCacheTest.cpp +++ b/tests/ResourceCacheTest.cpp @@ -96,9 +96,10 @@ DEF_GPUTEST_FOR_CONTEXTS(ResourceCacheStencilBuffers, &is_rendering_and_not_angl GrContext* context = ctxInfo.grContext(); GrSurfaceDesc smallDesc; smallDesc.fFlags = kRenderTarget_GrSurfaceFlag; - smallDesc.fConfig = kRGBA_8888_GrPixelConfig; + smallDesc.fOrigin = kBottomLeft_GrSurfaceOrigin; smallDesc.fWidth = 4; smallDesc.fHeight = 4; + smallDesc.fConfig = kRGBA_8888_GrPixelConfig; smallDesc.fSampleCnt = 0; if (context->caps()->avoidStencilBuffers()) { @@ -136,9 +137,10 @@ DEF_GPUTEST_FOR_CONTEXTS(ResourceCacheStencilBuffers, &is_rendering_and_not_angl // An RT with a much larger size should not share. GrSurfaceDesc bigDesc; bigDesc.fFlags = kRenderTarget_GrSurfaceFlag; - bigDesc.fConfig = kRGBA_8888_GrPixelConfig; + bigDesc.fOrigin = kBottomLeft_GrSurfaceOrigin; bigDesc.fWidth = 400; bigDesc.fHeight = 200; + bigDesc.fConfig = kRGBA_8888_GrPixelConfig; bigDesc.fSampleCnt = 0; sk_sp<GrTexture> bigRT(resourceProvider->createTexture(bigDesc, SkBudgeted::kNo)); if (bigRT && bigRT->asRenderTarget()) { @@ -228,7 +230,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ResourceCacheWrappedResources, reporter, ctxI kRGBA_8888_GrPixelConfig, texHandles[0]); sk_sp<GrTexture> borrowed(context->resourceProvider()->wrapBackendTexture( - backendTex1, kTopLeft_GrSurfaceOrigin, kBorrow_GrWrapOwnership)); + backendTex1, kBorrow_GrWrapOwnership)); GrBackendTexture backendTex2 = GrTest::CreateBackendTexture(context->contextPriv().getBackend(), kW, @@ -236,7 +238,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ResourceCacheWrappedResources, reporter, ctxI kRGBA_8888_GrPixelConfig, texHandles[1]); sk_sp<GrTexture> adopted(context->resourceProvider()->wrapBackendTexture( - backendTex2, kTopLeft_GrSurfaceOrigin, kAdopt_GrWrapOwnership)); + backendTex2, kAdopt_GrWrapOwnership)); REPORTER_ASSERT(reporter, borrowed != nullptr && adopted != nullptr); if (!borrowed || !adopted) { @@ -1636,6 +1638,7 @@ static sk_sp<GrTexture> make_normal_texture(GrResourceProvider* provider, int sampleCnt) { GrSurfaceDesc desc; desc.fFlags = flags; + desc.fOrigin = kTopLeft_GrSurfaceOrigin; desc.fWidth = width; desc.fHeight = height; desc.fConfig = kRGBA_8888_GrPixelConfig; |