From dc700ae269b2f7048657dff5521e94ee194666fc Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Thu, 6 Aug 2020 15:11:36 -0400 Subject: [PATCH] android_external_texture: Use the available GrDirectContext arg (flutter/engine#20303) getGrContext is going away, plus we already have the fully-powered-up GrDirectContext available and we previously weren't using it. --- .../shell/platform/android/android_external_texture_gl.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/engine/src/flutter/shell/platform/android/android_external_texture_gl.cc b/engine/src/flutter/shell/platform/android/android_external_texture_gl.cc index 8e071ffba24..ae5101012f7 100644 --- a/engine/src/flutter/shell/platform/android/android_external_texture_gl.cc +++ b/engine/src/flutter/shell/platform/android/android_external_texture_gl.cc @@ -7,6 +7,7 @@ #include #include "third_party/skia/include/gpu/GrBackendSurface.h" +#include "third_party/skia/include/gpu/GrDirectContext.h" namespace flutter { @@ -54,8 +55,8 @@ void AndroidExternalTextureGL::Paint(SkCanvas& canvas, GL_RGBA8_OES}; GrBackendTexture backendTexture(1, 1, GrMipMapped::kNo, textureInfo); sk_sp image = SkImage::MakeFromTexture( - canvas.getGrContext(), backendTexture, kTopLeft_GrSurfaceOrigin, - kRGBA_8888_SkColorType, kPremul_SkAlphaType, nullptr); + context, backendTexture, kTopLeft_GrSurfaceOrigin, kRGBA_8888_SkColorType, + kPremul_SkAlphaType, nullptr); if (image) { SkAutoCanvasRestore autoRestore(&canvas, true); canvas.translate(bounds.x(), bounds.y());