Update more tests to use the GrDirectContext/GrRecordingContext pair
This should be the last batch of tests. All the remaining uses of
GrContext should be resolved when SkImage no longer requires a context.
Change-Id: I47eeb3b74c28f483c20d9bec4daecbdb6d2cb982
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305541
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/tests/ResourceCacheTest.cpp b/tests/ResourceCacheTest.cpp
index 8714bb2..878139a 100644
--- a/tests/ResourceCacheTest.cpp
+++ b/tests/ResourceCacheTest.cpp
@@ -13,6 +13,7 @@
#include "src/gpu/GrGpuResourceCacheAccess.h"
#include "src/gpu/GrGpuResourcePriv.h"
#include "src/gpu/GrProxyProvider.h"
+#include "src/gpu/GrRecordingContextPriv.h"
#include "src/gpu/GrRenderTargetPriv.h"
#include "src/gpu/GrResourceCache.h"
#include "src/gpu/GrResourceProvider.h"
@@ -1246,7 +1247,7 @@
REPORTER_ASSERT(reporter, 0 == cache->getResourceCount());
- // Verify that calling flush() on a GrContext with nothing to do will not trigger resource
+ // Verify that calling flush() on a context with nothing to do will not trigger resource
// eviction
dContext->flushAndSubmit();
for (int i = 0; i < 10; ++i) {
@@ -1600,12 +1601,12 @@
SkBudgeted::kYes, GrProtected::kNo);
}
-static sk_sp<GrTextureProxy> make_mipmap_proxy(GrContext* context,
+static sk_sp<GrTextureProxy> make_mipmap_proxy(GrRecordingContext* rContext,
GrRenderable renderable,
SkISize dims,
int sampleCnt) {
- GrProxyProvider* proxyProvider = context->priv().proxyProvider();
- const GrCaps* caps = context->priv().caps();
+ GrProxyProvider* proxyProvider = rContext->priv().proxyProvider();
+ const GrCaps* caps = rContext->priv().caps();
const GrBackendFormat format = caps->getDefaultBackendFormat(GrColorType::kRGBA_8888,