aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-10-02 14:05:46 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-10-02 18:25:44 +0000
commit73f7e1dbdd2921343262b1a57f74a02700edef68 (patch)
tree57819590fb4c4d93b5f1b005125b2560cc253e1f
parentd4b32ba384daa3e9272b581c5fbccdc10d472cf8 (diff)
Temporarily disable deferred texture proxies
Bug: 769760 Change-Id: Id4197a73737f3a8df9159d9eb081be094df1f731 Reviewed-on: https://skia-review.googlesource.com/54004 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
-rw-r--r--src/gpu/GrSurfaceProxy.cpp17
-rw-r--r--tests/ResourceAllocatorTest.cpp2
-rw-r--r--tests/TextureProxyTest.cpp4
3 files changed, 18 insertions, 5 deletions
diff --git a/src/gpu/GrSurfaceProxy.cpp b/src/gpu/GrSurfaceProxy.cpp
index 2ef384677b..9cc3036268 100644
--- a/src/gpu/GrSurfaceProxy.cpp
+++ b/src/gpu/GrSurfaceProxy.cpp
@@ -267,14 +267,25 @@ sk_sp<GrTextureProxy> GrSurfaceProxy::MakeDeferred(GrResourceProvider* resourceP
GrSurfaceDesc copyDesc = desc;
copyDesc.fSampleCnt = caps->getSampleCount(desc.fSampleCnt, desc.fConfig);
+ // Temporarily force instantiation for crbug.com/769760
if (willBeRT) {
// We know anything we instantiate later from this deferred path will be
// both texturable and renderable
- return sk_sp<GrTextureProxy>(new GrTextureRenderTargetProxy(*caps, copyDesc, fit,
- budgeted, flags));
+ sk_sp<GrTextureProxy> temp(new GrTextureRenderTargetProxy(*caps, copyDesc, fit,
+ budgeted, flags));
+ if (temp && temp->instantiate(resourceProvider)) {
+ return temp;
+ }
+
+ return nullptr;
+ }
+
+ sk_sp<GrTextureProxy> temp(new GrTextureProxy(copyDesc, fit, budgeted, nullptr, 0, flags));
+ if (temp && temp->instantiate(resourceProvider)) {
+ return temp;
}
- return sk_sp<GrTextureProxy>(new GrTextureProxy(copyDesc, fit, budgeted, nullptr, 0, flags));
+ return nullptr;
}
sk_sp<GrTextureProxy> GrSurfaceProxy::MakeDeferred(GrResourceProvider* resourceProvider,
diff --git a/tests/ResourceAllocatorTest.cpp b/tests/ResourceAllocatorTest.cpp
index fb9ac542ca..bceb7cb6b9 100644
--- a/tests/ResourceAllocatorTest.cpp
+++ b/tests/ResourceAllocatorTest.cpp
@@ -8,7 +8,7 @@
// Include here to ensure SK_SUPPORT_GPU is set correctly before it is examined.
#include "SkTypes.h"
-#if SK_SUPPORT_GPU
+#if 0
#include "Test.h"
#include "GrContextPriv.h"
diff --git a/tests/TextureProxyTest.cpp b/tests/TextureProxyTest.cpp
index 79bf7c06ab..c4493904c0 100644
--- a/tests/TextureProxyTest.cpp
+++ b/tests/TextureProxyTest.cpp
@@ -254,6 +254,7 @@ static void invalidation_test(GrContext* context, skiatest::Reporter* reporter)
REPORTER_ASSERT(reporter, 0 == cache->getResourceCount());
}
+#if 0
// Test if invalidating unique ids prior to instantiating operates as expected
static void invalidation_and_instantiation_test(GrContext* context, skiatest::Reporter* reporter) {
GrResourceProvider* provider = context->resourceProvider();
@@ -291,6 +292,7 @@ static void invalidation_and_instantiation_test(GrContext* context, skiatest::Re
REPORTER_ASSERT(reporter, 0 == cache->numUniqueKeyProxies_TestOnly());
REPORTER_ASSERT(reporter, 0 == cache->getResourceCount());
}
+#endif
DEF_GPUTEST_FOR_RENDERING_CONTEXTS(TextureProxyTest, reporter, ctxInfo) {
GrContext* context = ctxInfo.grContext();
@@ -316,7 +318,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(TextureProxyTest, reporter, ctxInfo) {
}
invalidation_test(context, reporter);
- invalidation_and_instantiation_test(context, reporter);
+ //invalidation_and_instantiation_test(context, reporter);
}
#endif