diff --git a/shell/platform/ohos/ohos_external_texture_gl.cpp b/shell/platform/ohos/ohos_external_texture_gl.cpp index df9a3adef6f70be54d09f7bfa80621cdfb2a4191..e97cb8b27d0c2f33482c458271f57d357950a90c 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) {