aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/ResourceCacheTest.cpp
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-08-01 13:51:44 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-08-01 13:51:54 +0000
commit7294b851d277d8e703b23657e1a990f1ae24ead6 (patch)
treeb042db82a0b5bf61d0f453d404dbdeab2f8e3a47 /tests/ResourceCacheTest.cpp
parentac32662d128484eae3230653e3794a6f33dd9f5b (diff)
Revert "Remove origin field from GrSurface"
This reverts commit df0e09feacb29290fe94d37f921731b18f2edae0. Reason for revert: Experimental revert to see if this is blocking the roll Original change's description: > 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> TBR=bsalomon@google.com,robertphillips@google.com Change-Id: Id606aa01e84e2b83be71d833eefca477c1ad0d01 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/29220 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'tests/ResourceCacheTest.cpp')
-rw-r--r--tests/ResourceCacheTest.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/tests/ResourceCacheTest.cpp b/tests/ResourceCacheTest.cpp
index c10d581288..48f50a0c48 100644
--- a/tests/ResourceCacheTest.cpp
+++ b/tests/ResourceCacheTest.cpp
@@ -96,10 +96,9 @@ DEF_GPUTEST_FOR_CONTEXTS(ResourceCacheStencilBuffers, &is_rendering_and_not_angl
GrContext* context = ctxInfo.grContext();
GrSurfaceDesc smallDesc;
smallDesc.fFlags = kRenderTarget_GrSurfaceFlag;
- smallDesc.fOrigin = kBottomLeft_GrSurfaceOrigin;
+ smallDesc.fConfig = kRGBA_8888_GrPixelConfig;
smallDesc.fWidth = 4;
smallDesc.fHeight = 4;
- smallDesc.fConfig = kRGBA_8888_GrPixelConfig;
smallDesc.fSampleCnt = 0;
if (context->caps()->avoidStencilBuffers()) {
@@ -137,10 +136,9 @@ 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.fOrigin = kBottomLeft_GrSurfaceOrigin;
+ bigDesc.fConfig = kRGBA_8888_GrPixelConfig;
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()) {
@@ -230,7 +228,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ResourceCacheWrappedResources, reporter, ctxI
kRGBA_8888_GrPixelConfig,
texHandles[0]);
sk_sp<GrTexture> borrowed(context->resourceProvider()->wrapBackendTexture(
- backendTex1, kBorrow_GrWrapOwnership));
+ backendTex1, kTopLeft_GrSurfaceOrigin, kBorrow_GrWrapOwnership));
GrBackendTexture backendTex2 = GrTest::CreateBackendTexture(context->contextPriv().getBackend(),
kW,
@@ -238,7 +236,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ResourceCacheWrappedResources, reporter, ctxI
kRGBA_8888_GrPixelConfig,
texHandles[1]);
sk_sp<GrTexture> adopted(context->resourceProvider()->wrapBackendTexture(
- backendTex2, kAdopt_GrWrapOwnership));
+ backendTex2, kTopLeft_GrSurfaceOrigin, kAdopt_GrWrapOwnership));
REPORTER_ASSERT(reporter, borrowed != nullptr && adopted != nullptr);
if (!borrowed || !adopted) {
@@ -1638,7 +1636,6 @@ 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;