diff options
author | 2018-01-08 13:40:32 -0500 | |
---|---|---|
committer | 2018-01-08 19:05:31 +0000 | |
commit | 1afd4cdb0800e2e395b465da24eb71e0e834dafa (patch) | |
tree | d3353e7e4487a86d00002ab882f34ec24347000b /src/gpu/ops | |
parent | 5ec5d677b02c41a3c58609461cd8b62c2feaeddc (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/ops')
-rw-r--r-- | src/gpu/ops/GrClearOp.cpp | 4 | ||||
-rw-r--r-- | src/gpu/ops/GrTextureOp.cpp | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/gpu/ops/GrClearOp.cpp b/src/gpu/ops/GrClearOp.cpp index 702edcc3da..e54ca6ec01 100644 --- a/src/gpu/ops/GrClearOp.cpp +++ b/src/gpu/ops/GrClearOp.cpp @@ -9,7 +9,7 @@ #include "GrGpuCommandBuffer.h" #include "GrOpFlushState.h" -#include "GrResourceProvider.h" +#include "GrProxyProvider.h" GrClearOp::GrClearOp(const GrFixedClip& clip, GrColor color, GrSurfaceProxy* proxy) : INHERITED(ClassID()) @@ -23,7 +23,7 @@ GrClearOp::GrClearOp(const GrFixedClip& clip, GrColor color, GrSurfaceProxy* pro fClip = GrFixedClip(SkIRect::MakeEmpty()); } - if (GrResourceProvider::IsFunctionallyExact(proxy) && fClip.scissorRect() == rtRect) { + if (GrProxyProvider::IsFunctionallyExact(proxy) && fClip.scissorRect() == rtRect) { fClip.disableScissor(); } } diff --git a/src/gpu/ops/GrTextureOp.cpp b/src/gpu/ops/GrTextureOp.cpp index 79a22d83e4..5ed02cc1a5 100644 --- a/src/gpu/ops/GrTextureOp.cpp +++ b/src/gpu/ops/GrTextureOp.cpp @@ -615,6 +615,7 @@ std::unique_ptr<GrDrawOp> Make(sk_sp<GrTextureProxy> proxy, GrSamplerState::Filt #if GR_TEST_UTILS #include "GrContext.h" +#include "GrContextPriv.h" GR_DRAW_OP_TEST_DEFINE(TextureOp) { GrSurfaceDesc desc; @@ -623,8 +624,9 @@ GR_DRAW_OP_TEST_DEFINE(TextureOp) { desc.fWidth = random->nextULessThan(90) + 10; desc.fOrigin = random->nextBool() ? kTopLeft_GrSurfaceOrigin : kBottomLeft_GrSurfaceOrigin; SkBackingFit fit = random->nextBool() ? SkBackingFit::kApprox : SkBackingFit::kExact; - auto proxy = - GrSurfaceProxy::MakeDeferred(context->resourceProvider(), desc, fit, SkBudgeted::kNo); + sk_sp<GrTextureProxy> proxy = GrSurfaceProxy::MakeDeferred( + context->contextPriv().proxyProvider(), + desc, fit, SkBudgeted::kNo); SkRect rect = GrTest::TestRect(random); SkRect srcRect; srcRect.fLeft = random->nextRangeScalar(0.f, proxy->width() / 2.f); |