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/SkGpuDevice_drawTexture.cpp b/src/gpu/SkGpuDevice_drawTexture.cpp
index f68abf3..3f5a645 100644
--- a/src/gpu/SkGpuDevice_drawTexture.cpp
+++ b/src/gpu/SkGpuDevice_drawTexture.cpp
@@ -185,7 +185,7 @@
     // and theoretically, the resource cache's limits could be being changed on another thread, so
     // even having access to just the limit wouldn't be a reliable test during recording here.
     // Instead, we will just upload the entire image to be on the safe side and not tile.
-    if (!context->priv().asDirectContext()) {
+    if (!context->asDirectContext()) {
         return false;
     }