2017-09-21 12:26:08 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2017 Google Inc.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
|
|
* found in the LICENSE file.
|
|
|
|
*/
|
|
|
|
|
|
|
|
// This is a GPU-backend specific test.
|
|
|
|
|
|
|
|
#include "Test.h"
|
|
|
|
|
|
|
|
#include "GrBackendSurface.h"
|
|
|
|
#include "GrContextPriv.h"
|
|
|
|
#include "GrResourceCache.h"
|
2018-01-08 18:40:32 +00:00
|
|
|
#include "GrProxyProvider.h"
|
2017-09-21 12:26:08 +00:00
|
|
|
#include "GrResourceProvider.h"
|
|
|
|
#include "GrTexture.h"
|
|
|
|
#include "GrTextureProxy.h"
|
|
|
|
|
|
|
|
#include "SkGr.h"
|
|
|
|
#include "SkImage.h"
|
|
|
|
|
2018-01-08 18:40:32 +00:00
|
|
|
int GrProxyProvider::numUniqueKeyProxies_TestOnly() const {
|
2017-09-21 12:26:08 +00:00
|
|
|
return fUniquelyKeyedProxies.count();
|
|
|
|
}
|
|
|
|
|
2018-03-16 20:47:25 +00:00
|
|
|
static GrSurfaceDesc make_desc(GrSurfaceDescFlags descFlags) {
|
2017-09-21 12:26:08 +00:00
|
|
|
GrSurfaceDesc desc;
|
2018-03-16 20:47:25 +00:00
|
|
|
desc.fFlags = descFlags;
|
2017-09-21 12:26:08 +00:00
|
|
|
desc.fWidth = 64;
|
|
|
|
desc.fHeight = 64;
|
|
|
|
desc.fConfig = kRGBA_8888_GrPixelConfig;
|
2018-02-03 01:32:49 +00:00
|
|
|
desc.fSampleCnt = 1;
|
2017-09-21 12:26:08 +00:00
|
|
|
|
|
|
|
return desc;
|
|
|
|
}
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Basic test
|
|
|
|
|
2018-11-16 20:43:41 +00:00
|
|
|
static sk_sp<GrTextureProxy> deferred_tex(skiatest::Reporter* reporter, GrContext* ctx,
|
2018-01-17 18:35:46 +00:00
|
|
|
GrProxyProvider* proxyProvider, SkBackingFit fit) {
|
2018-01-16 13:06:32 +00:00
|
|
|
const GrSurfaceDesc desc = make_desc(kNone_GrSurfaceFlags);
|
2018-11-16 20:43:41 +00:00
|
|
|
GrBackendFormat format =
|
|
|
|
ctx->contextPriv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType);
|
2017-09-21 12:26:08 +00:00
|
|
|
|
2018-03-04 03:43:43 +00:00
|
|
|
sk_sp<GrTextureProxy> proxy =
|
2018-11-16 20:43:41 +00:00
|
|
|
proxyProvider->createProxy(format, desc, kBottomLeft_GrSurfaceOrigin, fit,
|
|
|
|
SkBudgeted::kYes);
|
2017-09-21 12:26:08 +00:00
|
|
|
// Only budgeted & wrapped external proxies get to carry uniqueKeys
|
2017-09-26 16:49:26 +00:00
|
|
|
REPORTER_ASSERT(reporter, !proxy->getUniqueKey().isValid());
|
|
|
|
return proxy;
|
2017-09-21 12:26:08 +00:00
|
|
|
}
|
|
|
|
|
2018-11-16 20:43:41 +00:00
|
|
|
static sk_sp<GrTextureProxy> deferred_texRT(skiatest::Reporter* reporter, GrContext* ctx,
|
2018-01-17 18:35:46 +00:00
|
|
|
GrProxyProvider* proxyProvider, SkBackingFit fit) {
|
2018-01-16 13:06:32 +00:00
|
|
|
const GrSurfaceDesc desc = make_desc(kRenderTarget_GrSurfaceFlag);
|
2018-11-16 20:43:41 +00:00
|
|
|
GrBackendFormat format =
|
|
|
|
ctx->contextPriv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType);
|
2017-09-21 12:26:08 +00:00
|
|
|
|
2018-03-04 03:43:43 +00:00
|
|
|
sk_sp<GrTextureProxy> proxy =
|
2018-11-16 20:43:41 +00:00
|
|
|
proxyProvider->createProxy(format, desc, kBottomLeft_GrSurfaceOrigin, fit, SkBudgeted::kYes);
|
2017-09-21 12:26:08 +00:00
|
|
|
// Only budgeted & wrapped external proxies get to carry uniqueKeys
|
2017-09-26 16:49:26 +00:00
|
|
|
REPORTER_ASSERT(reporter, !proxy->getUniqueKey().isValid());
|
|
|
|
return proxy;
|
|
|
|
}
|
|
|
|
|
2018-11-16 20:43:41 +00:00
|
|
|
static sk_sp<GrTextureProxy> wrapped(skiatest::Reporter* reporter, GrContext* ctx,
|
2018-01-17 18:35:46 +00:00
|
|
|
GrProxyProvider* proxyProvider, SkBackingFit fit) {
|
2018-01-16 13:06:32 +00:00
|
|
|
const GrSurfaceDesc desc = make_desc(kNone_GrSurfaceFlags);
|
2017-09-26 16:49:26 +00:00
|
|
|
|
2018-09-27 15:28:03 +00:00
|
|
|
sk_sp<GrTextureProxy> proxy = proxyProvider->testingOnly_createInstantiatedProxy(
|
2018-03-04 03:43:43 +00:00
|
|
|
desc, kBottomLeft_GrSurfaceOrigin, fit, SkBudgeted::kYes);
|
2018-01-16 13:06:32 +00:00
|
|
|
// Only budgeted & wrapped external proxies get to carry uniqueKeys
|
2017-09-26 16:49:26 +00:00
|
|
|
REPORTER_ASSERT(reporter, !proxy->getUniqueKey().isValid());
|
|
|
|
return proxy;
|
2017-09-21 12:26:08 +00:00
|
|
|
}
|
|
|
|
|
2018-11-16 20:43:41 +00:00
|
|
|
static sk_sp<GrTextureProxy> wrapped_with_key(skiatest::Reporter* reporter, GrContext* ctx,
|
2018-01-17 18:35:46 +00:00
|
|
|
GrProxyProvider* proxyProvider, SkBackingFit fit) {
|
2017-09-26 16:49:26 +00:00
|
|
|
static GrUniqueKey::Domain d = GrUniqueKey::GenerateDomain();
|
|
|
|
static int kUniqueKeyData = 0;
|
|
|
|
|
|
|
|
GrUniqueKey key;
|
|
|
|
|
|
|
|
GrUniqueKey::Builder builder(&key, d, 1, nullptr);
|
|
|
|
builder[0] = kUniqueKeyData++;
|
|
|
|
builder.finish();
|
|
|
|
|
2018-01-16 13:06:32 +00:00
|
|
|
const GrSurfaceDesc desc = make_desc(kNone_GrSurfaceFlags);
|
2017-09-21 12:26:08 +00:00
|
|
|
|
2018-01-17 18:35:46 +00:00
|
|
|
// Only budgeted & wrapped external proxies get to carry uniqueKeys
|
2018-09-27 15:28:03 +00:00
|
|
|
sk_sp<GrTextureProxy> proxy = proxyProvider->testingOnly_createInstantiatedProxy(
|
2018-03-16 20:47:25 +00:00
|
|
|
desc, kBottomLeft_GrSurfaceOrigin, fit, SkBudgeted::kYes);
|
2018-01-17 18:35:46 +00:00
|
|
|
SkAssertResult(proxyProvider->assignUniqueKeyToProxy(key, proxy.get()));
|
2017-09-26 16:49:26 +00:00
|
|
|
REPORTER_ASSERT(reporter, proxy->getUniqueKey().isValid());
|
|
|
|
return proxy;
|
2017-09-21 12:26:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static sk_sp<GrTextureProxy> create_wrapped_backend(GrContext* context, SkBackingFit fit,
|
|
|
|
sk_sp<GrTexture>* backingSurface) {
|
2018-01-16 13:06:32 +00:00
|
|
|
GrProxyProvider* proxyProvider = context->contextPriv().proxyProvider();
|
2018-01-16 20:07:54 +00:00
|
|
|
GrResourceProvider* resourceProvider = context->contextPriv().resourceProvider();
|
2017-09-21 12:26:08 +00:00
|
|
|
|
2017-12-13 20:00:45 +00:00
|
|
|
const GrSurfaceDesc desc = make_desc(kNone_GrSurfaceFlags);
|
2017-09-21 12:26:08 +00:00
|
|
|
|
2018-01-16 13:06:32 +00:00
|
|
|
*backingSurface = resourceProvider->createTexture(desc, SkBudgeted::kNo);
|
2017-09-21 12:26:08 +00:00
|
|
|
if (!(*backingSurface)) {
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
2017-12-13 20:00:45 +00:00
|
|
|
GrBackendTexture backendTex = (*backingSurface)->getBackendTexture();
|
2018-07-03 20:18:29 +00:00
|
|
|
backendTex.setPixelConfig(desc.fConfig);
|
2017-09-21 12:26:08 +00:00
|
|
|
|
2018-03-07 19:39:54 +00:00
|
|
|
return proxyProvider->wrapBackendTexture(backendTex, kBottomLeft_GrSurfaceOrigin);
|
2017-09-21 12:26:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// This tests the basic capabilities of the uniquely keyed texture proxies. Does assigning
|
|
|
|
// and looking them up work, etc.
|
|
|
|
static void basic_test(GrContext* context,
|
|
|
|
skiatest::Reporter* reporter,
|
2018-09-10 18:10:19 +00:00
|
|
|
sk_sp<GrTextureProxy> proxy) {
|
2017-09-21 12:26:08 +00:00
|
|
|
static int id = 1;
|
|
|
|
|
2018-01-16 20:07:54 +00:00
|
|
|
GrResourceProvider* resourceProvider = context->contextPriv().resourceProvider();
|
2018-01-08 18:40:32 +00:00
|
|
|
GrProxyProvider* proxyProvider = context->contextPriv().proxyProvider();
|
2018-01-16 20:07:54 +00:00
|
|
|
GrResourceCache* cache = context->contextPriv().getResourceCache();
|
2017-09-21 12:26:08 +00:00
|
|
|
|
|
|
|
int startCacheCount = cache->getResourceCount();
|
|
|
|
|
|
|
|
GrUniqueKey key;
|
2017-09-26 16:49:26 +00:00
|
|
|
if (proxy->getUniqueKey().isValid()) {
|
|
|
|
key = proxy->getUniqueKey();
|
|
|
|
} else {
|
|
|
|
GrMakeKeyFromImageID(&key, id, SkIRect::MakeWH(64, 64));
|
|
|
|
++id;
|
|
|
|
|
|
|
|
// Assigning the uniqueKey adds the proxy to the hash but doesn't force instantiation
|
2018-01-08 18:40:32 +00:00
|
|
|
REPORTER_ASSERT(reporter, !proxyProvider->numUniqueKeyProxies_TestOnly());
|
2018-01-17 18:35:46 +00:00
|
|
|
SkAssertResult(proxyProvider->assignUniqueKeyToProxy(key, proxy.get()));
|
2017-09-26 16:49:26 +00:00
|
|
|
}
|
2017-09-21 12:26:08 +00:00
|
|
|
|
2018-01-08 18:40:32 +00:00
|
|
|
REPORTER_ASSERT(reporter, 1 == proxyProvider->numUniqueKeyProxies_TestOnly());
|
2017-09-21 12:26:08 +00:00
|
|
|
REPORTER_ASSERT(reporter, startCacheCount == cache->getResourceCount());
|
|
|
|
|
|
|
|
// setUniqueKey had better stick
|
|
|
|
REPORTER_ASSERT(reporter, key == proxy->getUniqueKey());
|
|
|
|
|
|
|
|
// We just added it, surely we can find it
|
2018-01-08 18:40:32 +00:00
|
|
|
REPORTER_ASSERT(reporter, proxyProvider->findOrCreateProxyByUniqueKey(
|
|
|
|
key, kBottomLeft_GrSurfaceOrigin));
|
|
|
|
REPORTER_ASSERT(reporter, 1 == proxyProvider->numUniqueKeyProxies_TestOnly());
|
2017-09-21 12:26:08 +00:00
|
|
|
|
2018-09-10 18:10:19 +00:00
|
|
|
int expectedCacheCount = startCacheCount + (proxy->isInstantiated() ? 0 : 1);
|
|
|
|
|
2017-09-21 12:26:08 +00:00
|
|
|
// Once instantiated, the backing resource should have the same key
|
2018-01-08 18:40:32 +00:00
|
|
|
SkAssertResult(proxy->instantiate(resourceProvider));
|
2018-07-31 21:25:29 +00:00
|
|
|
const GrUniqueKey& texKey = proxy->peekSurface()->getUniqueKey();
|
2017-09-21 12:26:08 +00:00
|
|
|
REPORTER_ASSERT(reporter, texKey.isValid());
|
|
|
|
REPORTER_ASSERT(reporter, key == texKey);
|
|
|
|
|
|
|
|
// deleting the proxy should delete it from the hash but not the cache
|
|
|
|
proxy = nullptr;
|
2018-01-08 18:40:32 +00:00
|
|
|
REPORTER_ASSERT(reporter, 0 == proxyProvider->numUniqueKeyProxies_TestOnly());
|
2018-09-10 18:10:19 +00:00
|
|
|
REPORTER_ASSERT(reporter, expectedCacheCount == cache->getResourceCount());
|
2017-09-21 12:26:08 +00:00
|
|
|
|
|
|
|
// If the proxy was cached refinding it should bring it back to life
|
2018-01-08 18:40:32 +00:00
|
|
|
proxy = proxyProvider->findOrCreateProxyByUniqueKey(key, kBottomLeft_GrSurfaceOrigin);
|
2018-09-10 18:10:19 +00:00
|
|
|
REPORTER_ASSERT(reporter, proxy);
|
|
|
|
REPORTER_ASSERT(reporter, 1 == proxyProvider->numUniqueKeyProxies_TestOnly());
|
|
|
|
REPORTER_ASSERT(reporter, expectedCacheCount == cache->getResourceCount());
|
2017-09-21 12:26:08 +00:00
|
|
|
|
|
|
|
// Mega-purging it should remove it from both the hash and the cache
|
|
|
|
proxy = nullptr;
|
|
|
|
cache->purgeAllUnlocked();
|
2018-09-10 18:10:19 +00:00
|
|
|
expectedCacheCount--;
|
|
|
|
REPORTER_ASSERT(reporter, expectedCacheCount == cache->getResourceCount());
|
2017-09-21 12:26:08 +00:00
|
|
|
|
|
|
|
// We can bring neither the texture nor proxy back from perma-death
|
2018-01-08 18:40:32 +00:00
|
|
|
proxy = proxyProvider->findOrCreateProxyByUniqueKey(key, kBottomLeft_GrSurfaceOrigin);
|
2017-09-21 12:26:08 +00:00
|
|
|
REPORTER_ASSERT(reporter, !proxy);
|
2018-09-10 18:10:19 +00:00
|
|
|
REPORTER_ASSERT(reporter, expectedCacheCount == cache->getResourceCount());
|
2017-09-21 12:26:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Invalidation test
|
|
|
|
|
|
|
|
// Test if invalidating unique ids operates as expected for texture proxies.
|
|
|
|
static void invalidation_test(GrContext* context, skiatest::Reporter* reporter) {
|
|
|
|
|
2018-01-08 18:40:32 +00:00
|
|
|
GrProxyProvider* proxyProvider = context->contextPriv().proxyProvider();
|
2018-01-16 20:07:54 +00:00
|
|
|
GrResourceCache* cache = context->contextPriv().getResourceCache();
|
2017-09-21 12:26:08 +00:00
|
|
|
REPORTER_ASSERT(reporter, 0 == cache->getResourceCount());
|
|
|
|
|
|
|
|
sk_sp<SkImage> rasterImg;
|
|
|
|
|
|
|
|
{
|
|
|
|
SkImageInfo ii = SkImageInfo::Make(64, 64, kRGBA_8888_SkColorType, kOpaque_SkAlphaType);
|
|
|
|
|
|
|
|
SkBitmap bm;
|
|
|
|
bm.allocPixels(ii);
|
|
|
|
|
|
|
|
rasterImg = SkImage::MakeFromBitmap(bm);
|
2018-01-08 18:40:32 +00:00
|
|
|
REPORTER_ASSERT(reporter, 0 == proxyProvider->numUniqueKeyProxies_TestOnly());
|
2017-09-21 12:26:08 +00:00
|
|
|
REPORTER_ASSERT(reporter, 0 == cache->getResourceCount());
|
|
|
|
}
|
|
|
|
|
|
|
|
sk_sp<SkImage> textureImg = rasterImg->makeTextureImage(context, nullptr);
|
2018-01-08 18:40:32 +00:00
|
|
|
REPORTER_ASSERT(reporter, 1 == proxyProvider->numUniqueKeyProxies_TestOnly());
|
2017-09-21 12:26:08 +00:00
|
|
|
REPORTER_ASSERT(reporter, 1 == cache->getResourceCount());
|
|
|
|
|
|
|
|
rasterImg = nullptr; // this invalidates the uniqueKey
|
|
|
|
|
|
|
|
// this forces the cache to respond to the inval msg
|
|
|
|
int maxNum;
|
|
|
|
size_t maxBytes;
|
|
|
|
context->getResourceCacheLimits(&maxNum, &maxBytes);
|
|
|
|
context->setResourceCacheLimits(maxNum-1, maxBytes);
|
|
|
|
|
2018-01-08 18:40:32 +00:00
|
|
|
REPORTER_ASSERT(reporter, 0 == proxyProvider->numUniqueKeyProxies_TestOnly());
|
2017-09-21 12:26:08 +00:00
|
|
|
REPORTER_ASSERT(reporter, 1 == cache->getResourceCount());
|
|
|
|
|
|
|
|
textureImg = nullptr;
|
2018-03-06 13:20:37 +00:00
|
|
|
context->contextPriv().purgeAllUnlockedResources_ForTesting();
|
2017-09-21 12:26:08 +00:00
|
|
|
|
2018-01-08 18:40:32 +00:00
|
|
|
REPORTER_ASSERT(reporter, 0 == proxyProvider->numUniqueKeyProxies_TestOnly());
|
2017-09-21 12:26:08 +00:00
|
|
|
REPORTER_ASSERT(reporter, 0 == cache->getResourceCount());
|
|
|
|
}
|
|
|
|
|
2017-09-27 17:11:16 +00:00
|
|
|
// Test if invalidating unique ids prior to instantiating operates as expected
|
|
|
|
static void invalidation_and_instantiation_test(GrContext* context, skiatest::Reporter* reporter) {
|
2018-01-08 18:40:32 +00:00
|
|
|
GrProxyProvider* proxyProvider = context->contextPriv().proxyProvider();
|
2018-01-16 20:07:54 +00:00
|
|
|
GrResourceProvider* resourceProvider = context->contextPriv().resourceProvider();
|
|
|
|
GrResourceCache* cache = context->contextPriv().getResourceCache();
|
2017-09-27 17:11:16 +00:00
|
|
|
REPORTER_ASSERT(reporter, 0 == cache->getResourceCount());
|
|
|
|
|
|
|
|
static GrUniqueKey::Domain d = GrUniqueKey::GenerateDomain();
|
|
|
|
GrUniqueKey key;
|
|
|
|
GrUniqueKey::Builder builder(&key, d, 1, nullptr);
|
|
|
|
builder[0] = 0;
|
|
|
|
builder.finish();
|
|
|
|
|
|
|
|
// Create proxy, assign unique key
|
2018-11-16 20:43:41 +00:00
|
|
|
sk_sp<GrTextureProxy> proxy = deferred_tex(reporter, context, proxyProvider,
|
|
|
|
SkBackingFit::kExact);
|
2018-01-17 18:35:46 +00:00
|
|
|
SkAssertResult(proxyProvider->assignUniqueKeyToProxy(key, proxy.get()));
|
2017-09-27 17:11:16 +00:00
|
|
|
|
|
|
|
// Send an invalidation message, which will be sitting in the cache's inbox
|
2018-07-11 19:58:57 +00:00
|
|
|
SkMessageBus<GrUniqueKeyInvalidatedMessage>::Post(
|
|
|
|
GrUniqueKeyInvalidatedMessage(key, context->uniqueID()));
|
2017-09-27 17:11:16 +00:00
|
|
|
|
2018-01-08 18:40:32 +00:00
|
|
|
REPORTER_ASSERT(reporter, 1 == proxyProvider->numUniqueKeyProxies_TestOnly());
|
2017-09-27 17:11:16 +00:00
|
|
|
REPORTER_ASSERT(reporter, 0 == cache->getResourceCount());
|
|
|
|
|
|
|
|
// Instantiate the proxy. This will trigger the message to be processed, so the resulting
|
|
|
|
// texture should *not* have the unique key on it!
|
2018-01-08 18:40:32 +00:00
|
|
|
SkAssertResult(proxy->instantiate(resourceProvider));
|
2017-09-27 17:11:16 +00:00
|
|
|
|
|
|
|
REPORTER_ASSERT(reporter, !proxy->getUniqueKey().isValid());
|
2018-07-31 21:25:29 +00:00
|
|
|
REPORTER_ASSERT(reporter, !proxy->peekTexture()->getUniqueKey().isValid());
|
2018-01-08 18:40:32 +00:00
|
|
|
REPORTER_ASSERT(reporter, 0 == proxyProvider->numUniqueKeyProxies_TestOnly());
|
2017-09-27 17:11:16 +00:00
|
|
|
REPORTER_ASSERT(reporter, 1 == cache->getResourceCount());
|
|
|
|
|
|
|
|
proxy = nullptr;
|
2018-03-06 13:20:37 +00:00
|
|
|
context->contextPriv().purgeAllUnlockedResources_ForTesting();
|
2017-09-27 17:11:16 +00:00
|
|
|
|
2018-01-08 18:40:32 +00:00
|
|
|
REPORTER_ASSERT(reporter, 0 == proxyProvider->numUniqueKeyProxies_TestOnly());
|
2017-09-27 17:11:16 +00:00
|
|
|
REPORTER_ASSERT(reporter, 0 == cache->getResourceCount());
|
|
|
|
}
|
|
|
|
|
2017-09-21 12:26:08 +00:00
|
|
|
DEF_GPUTEST_FOR_RENDERING_CONTEXTS(TextureProxyTest, reporter, ctxInfo) {
|
|
|
|
GrContext* context = ctxInfo.grContext();
|
2018-01-08 18:40:32 +00:00
|
|
|
GrProxyProvider* proxyProvider = context->contextPriv().proxyProvider();
|
2018-01-16 20:07:54 +00:00
|
|
|
GrResourceCache* cache = context->contextPriv().getResourceCache();
|
2017-09-21 12:26:08 +00:00
|
|
|
|
2018-01-08 18:40:32 +00:00
|
|
|
REPORTER_ASSERT(reporter, !proxyProvider->numUniqueKeyProxies_TestOnly());
|
2017-09-21 12:26:08 +00:00
|
|
|
REPORTER_ASSERT(reporter, 0 == cache->getResourceCount());
|
|
|
|
|
|
|
|
for (auto fit : { SkBackingFit::kExact, SkBackingFit::kApprox }) {
|
2017-09-26 16:49:26 +00:00
|
|
|
for (auto create : { deferred_tex, deferred_texRT, wrapped, wrapped_with_key }) {
|
2017-09-21 12:26:08 +00:00
|
|
|
REPORTER_ASSERT(reporter, 0 == cache->getResourceCount());
|
2018-11-16 20:43:41 +00:00
|
|
|
basic_test(context, reporter, create(reporter, context, proxyProvider, fit));
|
2017-09-21 12:26:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
REPORTER_ASSERT(reporter, 0 == cache->getResourceCount());
|
|
|
|
sk_sp<GrTexture> backingTex;
|
|
|
|
sk_sp<GrTextureProxy> proxy = create_wrapped_backend(context, fit, &backingTex);
|
2018-09-10 18:10:19 +00:00
|
|
|
basic_test(context, reporter, std::move(proxy));
|
2017-09-21 12:26:08 +00:00
|
|
|
|
|
|
|
backingTex = nullptr;
|
|
|
|
cache->purgeAllUnlocked();
|
|
|
|
}
|
|
|
|
|
|
|
|
invalidation_test(context, reporter);
|
2017-10-04 12:42:28 +00:00
|
|
|
invalidation_and_instantiation_test(context, reporter);
|
2017-09-21 12:26:08 +00:00
|
|
|
}
|