aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/effects/GrRectBlurEffect.h
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2018-01-08 13:40:32 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-08 19:05:31 +0000
commit1afd4cdb0800e2e395b465da24eb71e0e834dafa (patch)
treed3353e7e4487a86d00002ab882f34ec24347000b /src/gpu/effects/GrRectBlurEffect.h
parent5ec5d677b02c41a3c58609461cd8b62c2feaeddc (diff)
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>
Diffstat (limited to 'src/gpu/effects/GrRectBlurEffect.h')
-rw-r--r--src/gpu/effects/GrRectBlurEffect.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gpu/effects/GrRectBlurEffect.h b/src/gpu/effects/GrRectBlurEffect.h
index 8c43eaf9b0..4f9b971d86 100644
--- a/src/gpu/effects/GrRectBlurEffect.h
+++ b/src/gpu/effects/GrRectBlurEffect.h
@@ -13,13 +13,13 @@
#include "SkTypes.h"
#if SK_SUPPORT_GPU
-#include "GrResourceProvider.h"
+#include "GrProxyProvider.h"
#include "../effects/SkBlurMask.h"
#include "GrFragmentProcessor.h"
#include "GrCoordTransform.h"
class GrRectBlurEffect : public GrFragmentProcessor {
public:
- static sk_sp<GrTextureProxy> CreateBlurProfileTexture(GrResourceProvider* resourceProvider,
+ static sk_sp<GrTextureProxy> CreateBlurProfileTexture(GrProxyProvider* proxyProvider,
float sigma) {
unsigned int profileSize = SkScalarCeilToInt(6 * sigma);
@@ -30,7 +30,7 @@ public:
builder.finish();
sk_sp<GrTextureProxy> blurProfile(
- resourceProvider->findOrCreateProxyByUniqueKey(key, kTopLeft_GrSurfaceOrigin));
+ proxyProvider->findOrCreateProxyByUniqueKey(key, kTopLeft_GrSurfaceOrigin));
if (!blurProfile) {
GrSurfaceDesc texDesc;
texDesc.fOrigin = kTopLeft_GrSurfaceOrigin;
@@ -40,14 +40,14 @@ public:
std::unique_ptr<uint8_t[]> profile(SkBlurMask::ComputeBlurProfile(sigma));
- blurProfile = GrSurfaceProxy::MakeDeferred(resourceProvider, texDesc, SkBudgeted::kYes,
+ blurProfile = GrSurfaceProxy::MakeDeferred(proxyProvider, texDesc, SkBudgeted::kYes,
profile.get(), 0);
if (!blurProfile) {
return nullptr;
}
SkASSERT(blurProfile->origin() == kTopLeft_GrSurfaceOrigin);
- resourceProvider->assignUniqueKeyToProxy(key, blurProfile.get());
+ proxyProvider->assignUniqueKeyToProxy(key, blurProfile.get());
}
return blurProfile;
@@ -55,7 +55,7 @@ public:
SkRect rect() const { return fRect; }
float sigma() const { return fSigma; }
- static std::unique_ptr<GrFragmentProcessor> Make(GrResourceProvider* resourceProvider,
+ static std::unique_ptr<GrFragmentProcessor> Make(GrProxyProvider* proxyProvider,
const SkRect& rect, float sigma) {
int doubleProfileSize = SkScalarCeilToInt(12 * sigma);
@@ -65,7 +65,7 @@ public:
return nullptr;
}
- sk_sp<GrTextureProxy> blurProfile(CreateBlurProfileTexture(resourceProvider, sigma));
+ sk_sp<GrTextureProxy> blurProfile(CreateBlurProfileTexture(proxyProvider, sigma));
if (!blurProfile) {
return nullptr;
}