Index: include/gpu/GrContext.h |
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h |
index 087d821beb1f06285b9bdff0211786cd14898bb1..cb407aa5bfa16db1d2c3e7800e0c2c237e7b2804 100644 |
--- a/include/gpu/GrContext.h |
+++ b/include/gpu/GrContext.h |
@@ -194,6 +194,21 @@ public: |
*/ |
sk_sp<GrDrawContext> drawContext(sk_sp<GrRenderTarget> rt, const SkSurfaceProps* = nullptr); |
+ enum BackingFit { |
+ kTight_BackingFit, |
+ kLoose_BackingFit |
+ }; |
+ |
+ /** |
+ * Create both a GrRenderTarget and a matching GrDrawContext to wrap it. |
+ * The created GrRenderTarget will always be budgeted. |
+ */ |
+ sk_sp<GrDrawContext> newDrawContext(BackingFit fit, |
+ int width, int height, |
+ GrPixelConfig config, |
+ int sampleCnt = 0, |
+ GrSurfaceOrigin origin = kDefault_GrSurfaceOrigin); |
+ |
/////////////////////////////////////////////////////////////////////////// |
// Misc. |