Add GrProxyProvider
This pulls all the proxy tracking & creation functionality out of the GrResourceCache and GrResourceProvider and consolidates it in the GrProxyProvider.
Change-Id: I7256f7c544319a70c1bd93dd5a9ccbe5fa0a544f
Reviewed-on: https://skia-review.googlesource.com/91501
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
diff --git a/tests/ImageFilterCacheTest.cpp b/tests/ImageFilterCacheTest.cpp
index fb9d04b..a722df0 100644
--- a/tests/ImageFilterCacheTest.cpp
+++ b/tests/ImageFilterCacheTest.cpp
@@ -186,7 +186,7 @@
#include "GrTexture.h"
#include "GrTextureProxy.h"
-static sk_sp<GrTextureProxy> create_proxy(GrResourceProvider* resourceProvider) {
+static sk_sp<GrTextureProxy> create_proxy(GrProxyProvider* proxyProvider) {
SkBitmap srcBM = create_bm();
GrSurfaceDesc desc;
@@ -196,16 +196,15 @@
desc.fHeight = kFullSize;
desc.fConfig = kRGBA_8888_GrPixelConfig;
- return GrSurfaceProxy::MakeDeferred(resourceProvider,
+ return GrSurfaceProxy::MakeDeferred(proxyProvider,
desc, SkBudgeted::kYes,
- srcBM.getPixels(),
- srcBM.rowBytes());
+ srcBM.getPixels(), srcBM.rowBytes());
}
DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ImageFilterCache_ImageBackedGPU, reporter, ctxInfo) {
GrContext* context = ctxInfo.grContext();
- sk_sp<GrTextureProxy> srcProxy(create_proxy(context->resourceProvider()));
+ sk_sp<GrTextureProxy> srcProxy(create_proxy(context->contextPriv().proxyProvider()));
if (!srcProxy) {
return;
}
@@ -251,7 +250,7 @@
DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ImageFilterCache_GPUBacked, reporter, ctxInfo) {
GrContext* context = ctxInfo.grContext();
- sk_sp<GrTextureProxy> srcProxy(create_proxy(context->resourceProvider()));
+ sk_sp<GrTextureProxy> srcProxy(create_proxy(context->contextPriv().proxyProvider()));
if (!srcProxy) {
return;
}