From aa67ab736ec449b9ffacca5fffaa805e98d2e363 Mon Sep 17 00:00:00 2001 From: wwyang <137208408@qq.com> Date: Wed, 22 May 2024 11:37:45 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E8=A7=86=E9=A2=91=E6=92=AD?= =?UTF-8?q?=E6=94=BE=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wwyang <137208408@qq.com> --- shell/platform/ohos/ohos_external_texture_gl.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/shell/platform/ohos/ohos_external_texture_gl.cpp b/shell/platform/ohos/ohos_external_texture_gl.cpp index e59276ac77..67b333ca4f 100755 --- a/shell/platform/ohos/ohos_external_texture_gl.cpp +++ b/shell/platform/ohos/ohos_external_texture_gl.cpp @@ -118,8 +118,8 @@ void OHOSExternalTextureGL::Paint(PaintContext& context, // The incoming texture is vertically flipped, so we flip it // back. OpenGL's coordinate system has Positive Y equivalent to up, while // Skia's coordinate system has Negative Y equvalent to up. - context.canvas->translate(bounds.x(), bounds.y()); - context.canvas->scale(bounds.width(), bounds.height()); + context.canvas->translate(bounds.x(), bounds.y() + bounds.height()); + context.canvas->scale(bounds.width(), -bounds.height()); if (!transform.isIdentity()) { sk_sp shader = image->makeShader( @@ -185,9 +185,9 @@ void OHOSExternalTextureGL::Detach() void OHOSExternalTextureGL::UpdateTransform() { float m[16] = { 0.0f }; - int32_t ret = OH_NativeImage_GetTransformMatrix(nativeImage_, m); + int32_t ret = OH_NativeImage_GetTransformMatrixV2(nativeImage_, m); if (ret != 0) { - FML_DLOG(FATAL)<<"OHOSExternalTextureGL OH_NativeImage_GetTransformMatrix err code:"<< ret; + FML_DLOG(FATAL)<<"OHOSExternalTextureGL OH_NativeImage_GetTransformMatrixV2 err code:"<< ret; } // transform ohos 4x4 matrix to skia 3x3 matrix SkScalar matrix3[] = { -- Gitee