| Index: src/gpu/GrClipMaskManager.cpp
|
| diff --git a/src/gpu/GrClipMaskManager.cpp b/src/gpu/GrClipMaskManager.cpp
|
| index 81b6fe861435138cc34267d53626bd8cca56c691..df58a9251f6e9b54c7d3a696d6268d18d6061fb7 100644
|
| --- a/src/gpu/GrClipMaskManager.cpp
|
| +++ b/src/gpu/GrClipMaskManager.cpp
|
| @@ -384,7 +384,7 @@ bool GrClipMaskManager::setupClipping(const GrPipelineBuilder& pipelineBuilder,
|
| if (UseSWOnlyPath(this->getContext(), pipelineBuilder, rt, clipToMaskOffset, elements)) {
|
| // The clip geometry is complex enough that it will be more efficient to create it
|
| // entirely in software
|
| - result = CreateSoftwareClipMask(this->getContext(),
|
| + result = CreateSoftwareClipMask(this->getContext()->textureProvider(),
|
| genID,
|
| initialState,
|
| elements,
|
| @@ -791,7 +791,7 @@ bool GrClipMaskManager::createStencilClipMask(GrRenderTarget* rt,
|
|
|
| ////////////////////////////////////////////////////////////////////////////////
|
| sk_sp<GrTexture> GrClipMaskManager::CreateSoftwareClipMask(
|
| - GrContext* context,
|
| + GrTextureProvider* texProvider,
|
| int32_t elementsGenID,
|
| GrReducedClip::InitialState initialState,
|
| const GrReducedClip::ElementList& elements,
|
| @@ -799,8 +799,7 @@ sk_sp<GrTexture> GrClipMaskManager::CreateSoftwareClipMask(
|
| const SkIRect& clipSpaceIBounds) {
|
| GrUniqueKey key;
|
| GetClipMaskKey(elementsGenID, clipSpaceIBounds, &key);
|
| - GrResourceProvider* resourceProvider = context->resourceProvider();
|
| - if (GrTexture* texture = resourceProvider->findAndRefTextureByUniqueKey(key)) {
|
| + if (GrTexture* texture = texProvider->findAndRefTextureByUniqueKey(key)) {
|
| return sk_sp<GrTexture>(texture);
|
| }
|
|
|
| @@ -808,7 +807,7 @@ sk_sp<GrTexture> GrClipMaskManager::CreateSoftwareClipMask(
|
| // the top left corner of the resulting rect to the top left of the texture.
|
| SkIRect maskSpaceIBounds = SkIRect::MakeWH(clipSpaceIBounds.width(), clipSpaceIBounds.height());
|
|
|
| - GrSWMaskHelper helper(context);
|
| + GrSWMaskHelper helper(texProvider);
|
|
|
| // Set the matrix so that rendered clip elements are transformed to mask space from clip
|
| // space.
|
| @@ -857,7 +856,7 @@ sk_sp<GrTexture> GrClipMaskManager::CreateSoftwareClipMask(
|
| desc.fHeight = clipSpaceIBounds.height();
|
| desc.fConfig = kAlpha_8_GrPixelConfig;
|
|
|
| - sk_sp<GrTexture> result(context->resourceProvider()->createApproxTexture(desc, 0));
|
| + sk_sp<GrTexture> result(texProvider->createApproxTexture(desc));
|
| if (!result) {
|
| return nullptr;
|
| }
|
|
|