From 1dc94b176f30bd917ed17a73e8ebf92831e28ce2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rulong=20Chen=EF=BC=88=E9=99=88=E6=B1=9D=E9=BE=99=EF=BC=89?= Date: Fri, 14 Jun 2024 12:18:05 +0800 Subject: [PATCH] =?UTF-8?q?Revert:=20"=E8=A7=A3=E5=86=B3=E8=A7=86=E9=A2=91?= =?UTF-8?q?=E6=92=AD=E6=94=BE=E5=BC=82=E5=B8=B8=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?"=20REASON:=20=E4=B8=B4=E6=97=B6=E5=9B=9E=E6=BB=9A=EF=BC=8C?= =?UTF-8?q?=E8=A7=A3=E5=86=B3=E7=BA=B9=E7=90=86=E5=8F=8D=E8=BD=AC=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=EF=BC=8COH=5FNativeImage=5FGetTransformMatri?= =?UTF-8?q?xV2=E6=8E=A5=E5=8F=A3=E5=AF=B9=E5=A4=96=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E5=90=8E=E5=86=8D=E6=92=A4=E9=94=80=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I9421ebdb4315ff6829070a8502e0cdbb09231991 --- shell/platform/ohos/ohos_external_texture_gl.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/shell/platform/ohos/ohos_external_texture_gl.cpp b/shell/platform/ohos/ohos_external_texture_gl.cpp index df9a3adef6..e97cb8b27d 100755 --- a/shell/platform/ohos/ohos_external_texture_gl.cpp +++ b/shell/platform/ohos/ohos_external_texture_gl.cpp @@ -127,8 +127,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() + bounds.height()); - context.canvas->scale(bounds.width(), -bounds.height()); + context.canvas->translate(bounds.x(), bounds.y()); + context.canvas->scale(bounds.width(), bounds.height()); if (!transform.isIdentity()) { sk_sp shader = image->makeShader( @@ -195,9 +195,9 @@ void OHOSExternalTextureGL::Detach() void OHOSExternalTextureGL::UpdateTransform() { float m[16] = { 0.0f }; - int32_t ret = OH_NativeImage_GetTransformMatrixV2(nativeImage_, m); + int32_t ret = OH_NativeImage_GetTransformMatrix(nativeImage_, m); if (ret != 0) { - FML_DLOG(FATAL)<<"OHOSExternalTextureGL OH_NativeImage_GetTransformMatrixV2 err code:"<< ret; + FML_DLOG(FATAL)<<"OHOSExternalTextureGL OH_NativeImage_GetTransformMatrix err code:"<< ret; } // transform ohos 4x4 matrix to skia 3x3 matrix SkScalar matrix3[] = { @@ -328,7 +328,7 @@ void OHOSExternalTextureGL::ProducePixelMapToNativeImage() if (ret != 0) { FML_DLOG(ERROR) << "OHOSExternalTextureGL OH_PixelMap_GetImageInfo err:" << ret; } - + int code = SET_BUFFER_GEOMETRY; ret = OH_NativeWindow_NativeWindowHandleOpt(nativeWindow_, code, pixelMapInfo.width, pixelMapInfo.height); if (ret != 0) { -- Gitee