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/tools/DDLPromiseImageHelper.cpp b/tools/DDLPromiseImageHelper.cpp
index 2dba0b9..e17dd1a 100644
--- a/tools/DDLPromiseImageHelper.cpp
+++ b/tools/DDLPromiseImageHelper.cpp
@@ -143,7 +143,7 @@
*/
void DDLPromiseImageHelper::CreateBETexturesForPromiseImage(GrContext* context,
PromiseImageInfo* info) {
- SkASSERT(context->priv().asDirectContext());
+ SkASSERT(context->asDirectContext());
if (info->isYUV()) {
int numPixmaps;
@@ -187,7 +187,7 @@
void DDLPromiseImageHelper::DeleteBETexturesForPromiseImage(GrContext* context,
PromiseImageInfo* info) {
- SkASSERT(context->priv().asDirectContext());
+ SkASSERT(context->asDirectContext());
if (info->isYUV()) {
int numPixmaps;
@@ -257,7 +257,7 @@
}
void DDLPromiseImageHelper::uploadAllToGPU(SkTaskGroup* taskGroup, GrContext* context) {
- SkASSERT(context->priv().asDirectContext());
+ SkASSERT(context->asDirectContext());
if (taskGroup) {
for (int i = 0; i < fImageInfo.count(); ++i) {
@@ -273,7 +273,7 @@
}
void DDLPromiseImageHelper::deleteAllFromGPU(SkTaskGroup* taskGroup, GrContext* context) {
- SkASSERT(context->priv().asDirectContext());
+ SkASSERT(context->asDirectContext());
if (taskGroup) {
for (int i = 0; i < fImageInfo.count(); ++i) {