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/src/shaders/SkPerlinNoiseShader.cpp b/src/shaders/SkPerlinNoiseShader.cpp
index 6c53401..6577a12 100644
--- a/src/shaders/SkPerlinNoiseShader.cpp
+++ b/src/shaders/SkPerlinNoiseShader.cpp
@@ -19,6 +19,7 @@
#if SK_SUPPORT_GPU
#include "GrContext.h"
+#include "GrContextPriv.h"
#include "GrCoordTransform.h"
#include "SkGr.h"
#include "effects/GrConstColorProcessor.h"
@@ -1435,10 +1436,11 @@
}
sk_sp<GrTextureProxy> permutationsProxy = GrMakeCachedBitmapProxy(
- args.fContext->resourceProvider(),
- paintingData->getPermutationsBitmap());
- sk_sp<GrTextureProxy> noiseProxy = GrMakeCachedBitmapProxy(args.fContext->resourceProvider(),
- paintingData->getNoiseBitmap());
+ args.fContext->contextPriv().proxyProvider(),
+ paintingData->getPermutationsBitmap());
+ sk_sp<GrTextureProxy> noiseProxy = GrMakeCachedBitmapProxy(
+ args.fContext->contextPriv().proxyProvider(),
+ paintingData->getNoiseBitmap());
if (permutationsProxy && noiseProxy) {
auto inner = GrPerlinNoise2Effect::Make(fType,
diff --git a/src/shaders/gradients/SkGradientShader.cpp b/src/shaders/gradients/SkGradientShader.cpp
index 1a3e749..3367d9e 100644
--- a/src/shaders/gradients/SkGradientShader.cpp
+++ b/src/shaders/gradients/SkGradientShader.cpp
@@ -939,6 +939,7 @@
#include "GrColorSpaceXform.h"
#include "GrContext.h"
+#include "GrContextPriv.h"
#include "GrShaderCaps.h"
#include "GrTextureStripAtlas.h"
#include "gl/GrGLContext.h"
@@ -1299,8 +1300,8 @@
// that GrMakeCachedBitmapProxy is sufficient (i.e., it won't need to be
// extracted to a subset or mipmapped).
sk_sp<GrTextureProxy> proxy = GrMakeCachedBitmapProxy(
- args.fContext->resourceProvider(),
- bitmap);
+ args.fContext->contextPriv().proxyProvider(),
+ bitmap);
if (!proxy) {
SkDebugf("Gradient won't draw. Could not create texture.");
return;