diff --git a/device_board_phytium/d2000/patch/0020=foundation-graphic-graphic_2d=change_dc_buffer_formate_to_bgra_for_jm9100.patch b/device_board_phytium/d2000/patch/0020=foundation-graphic-graphic_2d=change_dc_buffer_formate_to_bgra_for_jm9100.patch new file mode 100755 index 0000000000000000000000000000000000000000..9ac89ea722592f83bfd68aa9db86893303ee28d1 --- /dev/null +++ b/device_board_phytium/d2000/patch/0020=foundation-graphic-graphic_2d=change_dc_buffer_formate_to_bgra_for_jm9100.patch @@ -0,0 +1,28 @@ +diff --git a/frameworks/surface/src/native_window.cpp b/frameworks/surface/src/native_window.cpp +index c0955d121c..edcd44cd2f 100644 +--- a/frameworks/surface/src/native_window.cpp ++++ b/frameworks/surface/src/native_window.cpp +@@ -43,7 +43,8 @@ OHNativeWindow* CreateNativeWindowFromSurface(void* pSurface) + nativeWindow->config.width = nativeWindow->surface->GetDefaultWidth(); + nativeWindow->config.height = nativeWindow->surface->GetDefaultHeight(); + nativeWindow->config.usage = BUFFER_USAGE_CPU_READ | BUFFER_USAGE_MEM_DMA; +- nativeWindow->config.format = GRAPHIC_PIXEL_FMT_RGBA_8888; ++ // nativeWindow->config.format = GRAPHIC_PIXEL_FMT_RGBA_8888; ++ nativeWindow->config.format = GRAPHIC_PIXEL_FMT_BGRA_8888; + nativeWindow->config.strideAlignment = 8; // default stride is 8 + nativeWindow->config.timeout = 3000; // default timeout is 3000 ms + nativeWindow->config.colorGamut = GraphicColorGamut::GRAPHIC_COLOR_GAMUT_SRGB; +diff --git a/rosen/modules/render_service/core/pipeline/rs_base_render_util.h b/rosen/modules/render_service/core/pipeline/rs_base_render_util.h +index f97281a2ac..2bdfce7045 100644 +--- a/rosen/modules/render_service/core/pipeline/rs_base_render_util.h ++++ b/rosen/modules/render_service/core/pipeline/rs_base_render_util.h +@@ -117,7 +117,8 @@ public: + static bool IsBufferValid(const sptr& buffer); + static BufferRequestConfig GetFrameBufferRequestConfig(const ScreenInfo& screenInfo, bool isPhysical = true, + GraphicColorGamut colorGamut = GRAPHIC_COLOR_GAMUT_SRGB, +- GraphicPixelFormat pixelFormat = GRAPHIC_PIXEL_FMT_RGBA_8888); ++ // GraphicPixelFormat pixelFormat = GRAPHIC_PIXEL_FMT_RGBA_8888); ++ GraphicPixelFormat pixelFormat = GRAPHIC_PIXEL_FMT_BGRA_8888); + + #ifndef USE_ROSEN_DRAWING + static SkMatrix GetSurfaceTransformMatrix(GraphicTransformType rotationTransform, const RectF& bounds);