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/DDLTileHelper.cpp b/tools/DDLTileHelper.cpp
index ef7185f..16e2595 100644
--- a/tools/DDLTileHelper.cpp
+++ b/tools/DDLTileHelper.cpp
@@ -205,7 +205,7 @@
}
void DDLTileHelper::TileData::CreateBackendTexture(GrContext* context, TileData* tile) {
- SkASSERT(context->priv().asDirectContext());
+ SkASSERT(context->asDirectContext());
SkASSERT(tile->fCallbackContext && !tile->fCallbackContext->promiseImageTexture());
GrBackendTexture beTex = context->createBackendTexture(tile->fCharacterization);
@@ -213,7 +213,7 @@
}
void DDLTileHelper::TileData::DeleteBackendTexture(GrContext* context, TileData* tile) {
- SkASSERT(context->priv().asDirectContext());
+ SkASSERT(context->asDirectContext());
SkASSERT(tile->fCallbackContext);
// TODO: it seems that, on the Linux bots, backend texture creation is failing
@@ -355,7 +355,7 @@
}
void DDLTileHelper::createBackendTextures(SkTaskGroup* taskGroup, GrContext* context) {
- SkASSERT(context->priv().asDirectContext());
+ SkASSERT(context->asDirectContext());
if (taskGroup) {
for (int i = 0; i < this->numTiles(); ++i) {
@@ -371,7 +371,7 @@
}
void DDLTileHelper::deleteBackendTextures(SkTaskGroup* taskGroup, GrContext* context) {
- SkASSERT(context->priv().asDirectContext());
+ SkASSERT(context->asDirectContext());
if (taskGroup) {
for (int i = 0; i < this->numTiles(); ++i) {