| Index: src/gpu/GrSWMaskHelper.cpp
|
| diff --git a/src/gpu/GrSWMaskHelper.cpp b/src/gpu/GrSWMaskHelper.cpp
|
| index 6692e3d8333e503e4add7839ad1721efe562b889..a2588d0f47a3f479e48a054e4fe1e2486b0a52ef 100644
|
| --- a/src/gpu/GrSWMaskHelper.cpp
|
| +++ b/src/gpu/GrSWMaskHelper.cpp
|
| @@ -226,6 +226,9 @@ bool GrSWMaskHelper::init(const SkIRect& resultBounds,
|
| return true;
|
| }
|
|
|
| +#include "GrContext.h"
|
| +#include "GrResourceProvider.h"
|
| +
|
| /**
|
| * Get a texture (from the texture cache) of the correct size & format.
|
| */
|
| @@ -248,7 +251,7 @@ GrTexture* GrSWMaskHelper::createTexture() {
|
| SkASSERT(fContext->caps()->isConfigTexturable(desc.fConfig));
|
| }
|
|
|
| - return fContext->textureProvider()->createApproxTexture(desc);
|
| + return fContext->resourceProvider()->createApproxTexture(desc, GrResourceProvider::kNoPendingIO_Flag);
|
| }
|
|
|
| void GrSWMaskHelper::sendTextureData(GrTexture *texture, const GrSurfaceDesc& desc,
|
| @@ -261,9 +264,12 @@ void GrSWMaskHelper::sendTextureData(GrTexture *texture, const GrSurfaceDesc& de
|
| // have a render target.
|
| SkASSERT(nullptr == texture->asRenderTarget());
|
|
|
| - texture->writePixels(0, 0, desc.fWidth, desc.fHeight,
|
| + texture->writePixels(NULL, 0, 0, desc.fWidth, desc.fHeight,
|
| desc.fConfig, data, rowbytes,
|
| reuseScratch ? 0 : GrContext::kDontFlush_PixelOpsFlag);
|
| +
|
| + texture->setFromRawPixels(true);
|
| + texture->setException(true);
|
| }
|
|
|
| void GrSWMaskHelper::compressTextureData(GrTexture *texture, const GrSurfaceDesc& desc) {
|
| @@ -337,6 +343,8 @@ GrTexture* GrSWMaskHelper::DrawPathMaskToTexture(GrContext* context,
|
| return nullptr;
|
| }
|
|
|
| +
|
| +
|
| helper.toTexture(texture);
|
|
|
| return texture;
|
| @@ -370,7 +378,7 @@ void GrSWMaskHelper::DrawToTargetWithPathMask(GrTexture* texture,
|
| GrSimpleTextureEffect::Create(texture,
|
| maskMatrix,
|
| GrTextureParams::kNone_FilterMode,
|
| - kDevice_GrCoordSet))->unref();
|
| + kDevice_GrCoordSet, target->rt_delete_me()))->unref();
|
|
|
| target->drawNonAARect(*pipelineBuilder, color, SkMatrix::I(), dstRect, invert);
|
| }
|
|
|