diff options
Diffstat (limited to 'include/gpu/GrContext.h')
-rw-r--r-- | include/gpu/GrContext.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h index 5785553dfd..f14c36e35c 100644 --- a/include/gpu/GrContext.h +++ b/include/gpu/GrContext.h @@ -194,6 +194,22 @@ public: const SkSurfaceProps* surfaceProps = nullptr, SkBudgeted = SkBudgeted::kYes); + /* + * This method will attempt to create a drawContext that has, at least, the number of + * channels and precision per channel as requested in 'config' (e.g., A8 and 888 can be + * converted to 8888). It may also swizzle the channels (e.g., BGRA -> RGBA). + * SRGB-ness will be preserved. + */ + sk_sp<GrDrawContext> makeDrawContextWithFallback( + SkBackingFit fit, + int width, int height, + GrPixelConfig config, + sk_sp<SkColorSpace> colorSpace, + int sampleCnt = 0, + GrSurfaceOrigin origin = kDefault_GrSurfaceOrigin, + const SkSurfaceProps* surfaceProps = nullptr, + SkBudgeted budgeted = SkBudgeted::kYes); + /////////////////////////////////////////////////////////////////////////// // Misc. |