Loading configstore/1.0/ISurfaceFlingerConfigs.hal +8 −0 Original line number Diff line number Diff line Loading @@ -76,4 +76,12 @@ interface ISurfaceFlingerConfigs { * present fences. */ presentTimeOffsetFromVSyncNs() generates(OptionalInt64 value); /* * Some hardware can do RGB->YUV conversion more efficiently in hardware * controlled by HWC than in hardware controlled by the video encoder. * This instruct VirtualDisplaySurface to use HWC for such conversion on * GL composition. */ useHwcForRGBtoYUV() generates(OptionalBool value); }; configstore/1.0/default/SurfaceFlingerConfigs.cpp +10 −1 Original line number Diff line number Diff line Loading @@ -79,8 +79,17 @@ Return<void> SurfaceFlingerConfigs::presentTimeOffsetFromVSyncNs(presentTimeOffs return Void(); } // Methods from ::android::hidl::base::V1_0::IBase follow. Return<void> SurfaceFlingerConfigs::useHwcForRGBtoYUV(useHwcForRGBtoYUV_cb _hidl_cb) { bool value = false; #ifdef FORCE_HWC_COPY_FOR_VIRTUAL_DISPLAYS value = true; #endif _hidl_cb({true, value}); LOG(INFO) << "SurfaceFlinger forceHwcForRGBtoYUV: " << value; return Void(); } // Methods from ::android::hidl::base::V1_0::IBase follow. ISurfaceFlingerConfigs* HIDL_FETCH_ISurfaceFlingerConfigs(const char* /* name */) { return new SurfaceFlingerConfigs(); } Loading configstore/1.0/default/SurfaceFlingerConfigs.h +1 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ struct SurfaceFlingerConfigs : public ISurfaceFlingerConfigs { Return<void> hasWideColorDisplay(hasWideColorDisplay_cb _hidl_cb) override; Return<void> hasHDRDisplay(hasHDRDisplay_cb _hidl_cb) override; Return<void> presentTimeOffsetFromVSyncNs(presentTimeOffsetFromVSyncNs_cb _hidl_cb) override; Return<void> useHwcForRGBtoYUV(useHwcForRGBtoYUV_cb _hidl_cb) override; // Methods from ::android::hidl::base::V1_0::IBase follow. Loading configstore/1.0/default/surfaceflinger.mk +4 −0 Original line number Diff line number Diff line Loading @@ -34,3 +34,7 @@ ifneq ($(PRESENT_TIME_OFFSET_FROM_VSYNC_NS),) else LOCAL_CFLAGS += -DPRESENT_TIME_OFFSET_FROM_VSYNC_NS=0 endif ifeq ($(TARGET_FORCE_HWC_FOR_VIRTUAL_DISPLAYS),true) LOCAL_CFLAGS += -DFORCE_HWC_COPY_FOR_VIRTUAL_DISPLAYS endif Loading
configstore/1.0/ISurfaceFlingerConfigs.hal +8 −0 Original line number Diff line number Diff line Loading @@ -76,4 +76,12 @@ interface ISurfaceFlingerConfigs { * present fences. */ presentTimeOffsetFromVSyncNs() generates(OptionalInt64 value); /* * Some hardware can do RGB->YUV conversion more efficiently in hardware * controlled by HWC than in hardware controlled by the video encoder. * This instruct VirtualDisplaySurface to use HWC for such conversion on * GL composition. */ useHwcForRGBtoYUV() generates(OptionalBool value); };
configstore/1.0/default/SurfaceFlingerConfigs.cpp +10 −1 Original line number Diff line number Diff line Loading @@ -79,8 +79,17 @@ Return<void> SurfaceFlingerConfigs::presentTimeOffsetFromVSyncNs(presentTimeOffs return Void(); } // Methods from ::android::hidl::base::V1_0::IBase follow. Return<void> SurfaceFlingerConfigs::useHwcForRGBtoYUV(useHwcForRGBtoYUV_cb _hidl_cb) { bool value = false; #ifdef FORCE_HWC_COPY_FOR_VIRTUAL_DISPLAYS value = true; #endif _hidl_cb({true, value}); LOG(INFO) << "SurfaceFlinger forceHwcForRGBtoYUV: " << value; return Void(); } // Methods from ::android::hidl::base::V1_0::IBase follow. ISurfaceFlingerConfigs* HIDL_FETCH_ISurfaceFlingerConfigs(const char* /* name */) { return new SurfaceFlingerConfigs(); } Loading
configstore/1.0/default/SurfaceFlingerConfigs.h +1 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ struct SurfaceFlingerConfigs : public ISurfaceFlingerConfigs { Return<void> hasWideColorDisplay(hasWideColorDisplay_cb _hidl_cb) override; Return<void> hasHDRDisplay(hasHDRDisplay_cb _hidl_cb) override; Return<void> presentTimeOffsetFromVSyncNs(presentTimeOffsetFromVSyncNs_cb _hidl_cb) override; Return<void> useHwcForRGBtoYUV(useHwcForRGBtoYUV_cb _hidl_cb) override; // Methods from ::android::hidl::base::V1_0::IBase follow. Loading
configstore/1.0/default/surfaceflinger.mk +4 −0 Original line number Diff line number Diff line Loading @@ -34,3 +34,7 @@ ifneq ($(PRESENT_TIME_OFFSET_FROM_VSYNC_NS),) else LOCAL_CFLAGS += -DPRESENT_TIME_OFFSET_FROM_VSYNC_NS=0 endif ifeq ($(TARGET_FORCE_HWC_FOR_VIRTUAL_DISPLAYS),true) LOCAL_CFLAGS += -DFORCE_HWC_COPY_FOR_VIRTUAL_DISPLAYS endif