aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/ResourceCacheTest.cpp
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-07-28 11:56:47 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-31 16:02:42 +0000
commitdf0e09feacb29290fe94d37f921731b18f2edae0 (patch)
tree8059c31deb493e101b616578f6db0d4bc4d05438 /tests/ResourceCacheTest.cpp
parentf57c0d67611186ba74179b53b421e64b63a579c7 (diff)
Remove origin field from GrSurface
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. Change-Id: Iabd79ae98b227b5b9409f3ab5bbcc48af9613c18 Reviewed-on: https://skia-review.googlesource.com/26363 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'tests/ResourceCacheTest.cpp')
-rw-r--r--tests/ResourceCacheTest.cpp11
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;