Make asDirectContext public
External clients will eventually have to call this to get access
to a direct context from an SkCanvas or SkSurface (which will
only have 'recordingContext' accessors).
Bug: skia:10441
Change-Id: I10e34081277b685fa59d03e1fce1887f3524e0fa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300178
Reviewed-by: Adlai Holler <adlai@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrRenderTargetContext.cpp b/src/gpu/GrRenderTargetContext.cpp
index eab1436..acc8118 100644
--- a/src/gpu/GrRenderTargetContext.cpp
+++ b/src/gpu/GrRenderTargetContext.cpp
@@ -39,7 +39,6 @@
#include "src/gpu/GrMemoryPool.h"
#include "src/gpu/GrPathRenderer.h"
#include "src/gpu/GrProxyProvider.h"
-#include "src/gpu/GrRecordingContextPriv.h"
#include "src/gpu/GrRenderTarget.h"
#include "src/gpu/GrRenderTargetContextPriv.h"
#include "src/gpu/GrResourceProvider.h"
@@ -1712,7 +1711,7 @@
return false;
}
- auto direct = fContext->priv().asDirectContext();
+ auto direct = fContext->asDirectContext();
if (!direct) {
return false;
}