Switch path renderers over to using GrRecordingContext
The path renderers convert paths into Ganesh ops when recording so should also be able to make due with only the GrRecordingContext.
Change-Id: Ie796af73ca5aa2a074ebd037d6d558ec85ff5928
Reviewed-on: https://skia-review.googlesource.com/c/191568
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/GrContextPriv.h b/src/gpu/GrContextPriv.h
index 301a2b3..f2c66db 100644
--- a/src/gpu/GrContextPriv.h
+++ b/src/gpu/GrContextPriv.h
@@ -53,6 +53,10 @@
SkDEBUGCODE(GrSingleOwner* singleOwner() const { return fContext->singleOwner(); } )
// from GrRecordingContext
+
+ // CONTEXT TODO: move GrDrawingManager to GrRecordingContext for real
+ GrDrawingManager* drawingManager() { return fContext->drawingManager(); }
+
sk_sp<GrOpMemoryPool> refOpMemoryPool();
GrOpMemoryPool* opMemoryPool() { return fContext->opMemoryPool(); }
@@ -73,6 +77,24 @@
const SkSurfaceProps* surfaceProps = nullptr,
SkBudgeted = SkBudgeted::kYes);
+ /*
+ * This method will attempt to create a renderTargetContext 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<GrRenderTargetContext> makeDeferredRenderTargetContextWithFallback(
+ const GrBackendFormat& format,
+ SkBackingFit fit,
+ int width, int height,
+ GrPixelConfig config,
+ sk_sp<SkColorSpace> colorSpace,
+ int sampleCnt = 1,
+ GrMipMapped = GrMipMapped::kNo,
+ GrSurfaceOrigin origin = kBottomLeft_GrSurfaceOrigin,
+ const SkSurfaceProps* surfaceProps = nullptr,
+ SkBudgeted budgeted = SkBudgeted::kYes);
+
GrAuditTrail* auditTrail() { return fContext->auditTrail(); }
/**
@@ -80,8 +102,6 @@
*/
static sk_sp<GrContext> MakeDDL(const sk_sp<GrContextThreadSafeProxy>&);
- GrDrawingManager* drawingManager() { return fContext->fDrawingManager.get(); }
-
sk_sp<GrSurfaceContext> makeWrappedSurfaceContext(sk_sp<GrSurfaceProxy>,
sk_sp<SkColorSpace> = nullptr,
const SkSurfaceProps* = nullptr);
@@ -248,24 +268,6 @@
void moveOpListsToDDL(SkDeferredDisplayList*);
void copyOpListsFromDDL(const SkDeferredDisplayList*, GrRenderTargetProxy* newDest);
- /*
- * This method will attempt to create a renderTargetContext 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<GrRenderTargetContext> makeDeferredRenderTargetContextWithFallback(
- const GrBackendFormat& format,
- SkBackingFit fit,
- int width, int height,
- GrPixelConfig config,
- sk_sp<SkColorSpace> colorSpace,
- int sampleCnt = 1,
- GrMipMapped = GrMipMapped::kNo,
- GrSurfaceOrigin origin = kBottomLeft_GrSurfaceOrigin,
- const SkSurfaceProps* surfaceProps = nullptr,
- SkBudgeted budgeted = SkBudgeted::kYes);
-
GrContextOptions::PersistentCache* getPersistentCache() { return fContext->fPersistentCache; }
#ifdef SK_ENABLE_DUMP_GPU