Index: src/gpu/GrDrawContext.cpp |
diff --git a/src/gpu/GrDrawContext.cpp b/src/gpu/GrDrawContext.cpp |
index 8bbf55b8ec4d2987e62fa30012036681030a3771..8a49206702233849b0ec3f87d878cd75cd0d167e 100644 |
--- a/src/gpu/GrDrawContext.cpp |
+++ b/src/gpu/GrDrawContext.cpp |
@@ -67,11 +67,14 @@ bool GrDrawContext::wasAbandoned() const { |
// when the drawContext attempts to use it (via getDrawTarget). |
GrDrawContext::GrDrawContext(GrContext* context, |
GrDrawingManager* drawingMgr, |
+ int width, int height, |
sk_sp<GrRenderTarget> rt, |
const SkSurfaceProps* surfaceProps, |
GrAuditTrail* auditTrail, |
GrSingleOwner* singleOwner) |
: fDrawingManager(drawingMgr) |
+ , fWidth(width) |
+ , fHeight(height) |
, fRenderTarget(std::move(rt)) |
, fDrawTarget(SkSafeRef(fRenderTarget->getLastDrawTarget())) |
, fContext(context) |
@@ -197,7 +200,8 @@ void GrDrawContext::clear(const SkIRect* rect, |
AutoCheckFlush acf(fDrawingManager); |
- const SkIRect rtRect = SkIRect::MakeWH(this->width(), this->height()); |
+ const SkIRect rtRect = SkIRect::MakeWH(this->accessRenderTarget()->width(), |
+ this->accessRenderTarget()->height()); |
SkIRect clippedRect; |
if (!rect || |
(canIgnoreRect && fContext->caps()->fullClearIsFree()) || |
@@ -1116,8 +1120,7 @@ bool GrDrawContextPriv::drawAndStencilPath(const GrFixedClip& clip, |
if (path.isEmpty() && path.isInverseFillType()) { |
this->drawAndStencilRect(clip, ss, op, invert, false, SkMatrix::I(), |
- SkRect::MakeIWH(fDrawContext->width(), |
- fDrawContext->height())); |
+ SkRect::MakeIWH(fDrawContext->width(), fDrawContext->height())); |
return true; |
} |