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/GrSWMaskHelper.cpp b/src/gpu/GrSWMaskHelper.cpp
index 2f21a67..7638bf1 100644
--- a/src/gpu/GrSWMaskHelper.cpp
+++ b/src/gpu/GrSWMaskHelper.cpp
@@ -7,9 +7,9 @@
#include "GrSWMaskHelper.h"
-#include "GrContext.h"
-#include "GrContextPriv.h"
#include "GrProxyProvider.h"
+#include "GrRecordingContext.h"
+#include "GrRecordingContextPriv.h"
#include "GrShape.h"
#include "GrSurfaceContext.h"
#include "GrTextureProxy.h"
@@ -91,7 +91,8 @@
return true;
}
-sk_sp<GrTextureProxy> GrSWMaskHelper::toTextureProxy(GrContext* context, SkBackingFit fit) {
+sk_sp<GrTextureProxy> GrSWMaskHelper::toTextureProxy(GrRecordingContext* context,
+ SkBackingFit fit) {
SkImageInfo ii = SkImageInfo::MakeA8(fPixels->width(), fPixels->height());
size_t rowBytes = fPixels->rowBytes();
@@ -108,7 +109,7 @@
// TODO: http://skbug.com/8422: Although this fixes http://skbug.com/8351, it seems like these
// should just participate in the normal allocation process and not need the pending IO flag.
auto surfaceFlags = GrInternalSurfaceFlags::kNone;
- if (!context->priv().resourceProvider()) {
+ if (!context->priv().proxyProvider()->renderingDirectly()) {
// In DDL mode, this texture proxy will be instantiated at flush time, therfore it cannot
// have pending IO.
surfaceFlags |= GrInternalSurfaceFlags::kNoPendingIO;