Index: src/gpu/GrContext.cpp |
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp |
index f8eca3682beec53c9357f718fb41883e38cbeeb8..f22d4dab2de73df8cd619f9188252f1c973ea5a1 100755 |
--- a/src/gpu/GrContext.cpp |
+++ b/src/gpu/GrContext.cpp |
@@ -1583,8 +1583,9 @@ void GrContext::copyTexture(GrTexture* src, GrRenderTarget* dst, const SkIPoint* |
this->flush(); |
} |
robertphillips
2014/09/23 13:21:53
So this prepareToDraw call does a bit of work on t
bsalomon
2014/09/23 15:08:57
I think there is a larger change coming related to
|
- GrDrawTarget::AutoStateRestore asr(fGpu, GrDrawTarget::kReset_ASRInit); |
- GrDrawState* drawState = fGpu->drawState(); |
+ GrDrawTarget* target = this->prepareToDraw(NULL, kYes_BufferedDraw, NULL, NULL); |
+ GrDrawTarget::AutoStateRestore asr(target, GrDrawTarget::kReset_ASRInit); |
+ GrDrawState* drawState = target->drawState(); |
drawState->setRenderTarget(dst); |
SkMatrix sampleM; |
sampleM.setIDiv(src->width(), src->height()); |
@@ -1599,7 +1600,7 @@ void GrContext::copyTexture(GrTexture* src, GrRenderTarget* dst, const SkIPoint* |
sampleM.preTranslate(SkIntToScalar(srcRect.fLeft), SkIntToScalar(srcRect.fTop)); |
drawState->addColorTextureEffect(src, sampleM); |
SkRect dstR = SkRect::MakeWH(SkIntToScalar(srcRect.width()), SkIntToScalar(srcRect.height())); |
- fGpu->drawSimpleRect(dstR); |
+ target->drawSimpleRect(dstR); |
} |
bool GrContext::writeRenderTargetPixels(GrRenderTarget* target, |