| Index: src/gpu/GrDrawTarget.cpp
|
| diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp
|
| index bca347dbea6edf206e0a30b53def318c554cc13d..49c6aca87822ec186036f39b5728a1fadd6a0a8d 100644
|
| --- a/src/gpu/GrDrawTarget.cpp
|
| +++ b/src/gpu/GrDrawTarget.cpp
|
| @@ -386,8 +386,20 @@ bool GrDrawTarget::setupDstReadIfNecessary(const GrPipelineBuilder& pipelineBuil
|
| if (!pipelineBuilder.willXPNeedDstCopy(*this->caps(), colorPOI, coveragePOI)) {
|
| return true;
|
| }
|
| - SkIRect copyRect;
|
| +
|
| GrRenderTarget* rt = pipelineBuilder.getRenderTarget();
|
| +
|
| + if (this->caps()->textureBarrierSupport()) {
|
| + if (GrTexture* rtTex = rt->asTexture()) {
|
| + // The render target is a texture, se we can read from it directly in the shader. The XP
|
| + // will be responsible to detect this situation and request a texture barrier.
|
| + dstCopy->setTexture(rtTex);
|
| + dstCopy->setOffset(0, 0);
|
| + return true;
|
| + }
|
| + }
|
| +
|
| + SkIRect copyRect;
|
| pipelineBuilder.clip().getConservativeBounds(rt, ©Rect);
|
|
|
| if (drawBounds) {
|
|
|