| Index: include/gpu/GrDrawContext.h
|
| diff --git a/include/gpu/GrDrawContext.h b/include/gpu/GrDrawContext.h
|
| index 1a7580ea03947db7fb84de27f06545f1fe12fbb2..9e71165fed0b1e1e45ca49da8ce90d5c92113d04 100644
|
| --- a/include/gpu/GrDrawContext.h
|
| +++ b/include/gpu/GrDrawContext.h
|
| @@ -264,8 +264,8 @@ public:
|
| }
|
|
|
| const GrSurfaceDesc& desc() const { return fRenderTarget->desc(); }
|
| - int width() const { return fRenderTarget->width(); }
|
| - int height() const { return fRenderTarget->height(); }
|
| + int width() const { return fWidth; }
|
| + int height() const { return fHeight; }
|
| GrPixelConfig config() const { return fRenderTarget->config(); }
|
| int numColorSamples() const { return fRenderTarget->numColorSamples(); }
|
| bool isGammaCorrect() const { return fSurfaceProps.isGammaCorrect(); }
|
| @@ -286,7 +286,7 @@ public:
|
| GrAuditTrail* auditTrail() { return fAuditTrail; }
|
|
|
| protected:
|
| - GrDrawContext(GrContext*, GrDrawingManager*, sk_sp<GrRenderTarget>,
|
| + GrDrawContext(GrContext*, GrDrawingManager*, int width, int height, sk_sp<GrRenderTarget>,
|
| const SkSurfaceProps* surfaceProps, GrAuditTrail*, GrSingleOwner*);
|
|
|
| GrDrawingManager* drawingManager() { return fDrawingManager; }
|
| @@ -350,6 +350,11 @@ private:
|
| GrDrawTarget* getDrawTarget();
|
|
|
| GrDrawingManager* fDrawingManager;
|
| +
|
| + // The width & height of the drawContext may be less than the width & height of the
|
| + // underlying renderTarget
|
| + int fWidth;
|
| + int fHeight;
|
| sk_sp<GrRenderTarget> fRenderTarget;
|
|
|
| // In MDB-mode the drawTarget can be closed by some other drawContext that has picked
|
|
|