Loading services/surfaceflinger/Android.mk +0 −6 Original line number Diff line number Diff line Loading @@ -73,12 +73,6 @@ ifeq ($(TARGET_RUNNING_WITHOUT_SYNC_FRAMEWORK),true) LOCAL_CFLAGS += -DRUNNING_WITHOUT_SYNC_FRAMEWORK endif ifneq ($(MAX_VIRTUAL_DISPLAY_DIMENSION),) LOCAL_CFLAGS += -DMAX_VIRTUAL_DISPLAY_DIMENSION=$(MAX_VIRTUAL_DISPLAY_DIMENSION) else LOCAL_CFLAGS += -DMAX_VIRTUAL_DISPLAY_DIMENSION=0 endif LOCAL_CFLAGS += -fvisibility=hidden -Werror=format LOCAL_HEADER_LIBRARIES := \ Loading services/surfaceflinger/DisplayHardware/HWComposer.cpp +5 −5 Original line number Diff line number Diff line Loading @@ -267,12 +267,12 @@ status_t HWComposer::allocateVirtualDisplay(uint32_t width, uint32_t height, return NO_MEMORY; } if (MAX_VIRTUAL_DISPLAY_DIMENSION != 0 && (width > MAX_VIRTUAL_DISPLAY_DIMENSION || height > MAX_VIRTUAL_DISPLAY_DIMENSION)) { if (SurfaceFlinger::maxVirtualDisplaySize != 0 && (width > SurfaceFlinger::maxVirtualDisplaySize || height > SurfaceFlinger::maxVirtualDisplaySize)) { ALOGE("createVirtualDisplay: Can't create a virtual display with" " a dimension > %u (tried %u x %u)", MAX_VIRTUAL_DISPLAY_DIMENSION, width, height); " a dimension > %" PRIu64 " (tried %u x %u)", SurfaceFlinger::maxVirtualDisplaySize, width, height); return INVALID_OPERATION; } Loading services/surfaceflinger/SurfaceFlinger.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -99,6 +99,7 @@ EGLAPI const char* eglQueryStringImplementationANDROID(EGLDisplay dpy, EGLint na namespace android { using namespace android::hardware::configstore; using namespace android::hardware::configstore::V1_0; Loading @@ -115,6 +116,7 @@ int64_t SurfaceFlinger::sfVsyncPhaseOffsetNs; bool SurfaceFlinger::useContextPriority; int64_t SurfaceFlinger::dispSyncPresentTimeOffset; bool SurfaceFlinger::useHwcForRgbToYuv; uint64_t SurfaceFlinger::maxVirtualDisplaySize; SurfaceFlinger::SurfaceFlinger() : BnSurfaceComposer(), Loading Loading @@ -176,6 +178,9 @@ SurfaceFlinger::SurfaceFlinger() useHwcForRgbToYuv = getBool< ISurfaceFlingerConfigs, &ISurfaceFlingerConfigs::useHwcForRGBtoYUV>(false); maxVirtualDisplaySize = getUInt64<ISurfaceFlingerConfigs, &ISurfaceFlingerConfigs::maxVirtualDisplaySize>(0); // debugging stuff... char value[PROPERTY_VALUE_MAX]; Loading Loading @@ -3243,6 +3248,7 @@ void SurfaceFlinger::appendSfConfigString(String8& result) const result.appendFormat(" PRESENT_TIME_OFFSET=%" PRId64 , dispSyncPresentTimeOffset); result.appendFormat(" FORCE_HWC_FOR_RBG_TO_YUV=%d", useHwcForRgbToYuv); result.appendFormat(" MAX_VIRT_DISPLAY_DIM=%" PRIu64, maxVirtualDisplaySize); result.append("]"); } Loading services/surfaceflinger/SurfaceFlinger.h +4 −1 Original line number Diff line number Diff line Loading @@ -105,7 +105,6 @@ class SurfaceFlinger : public BnSurfaceComposer, { public: // This is the phase offset in nanoseconds of the software vsync event // relative to the vsync event reported by HWComposer. The software vsync // event is when SurfaceFlinger and Choreographer-based applications run each Loading Loading @@ -142,6 +141,10 @@ public: // GL composition. static bool useHwcForRgbToYuv; // Maximum dimension supported by HWC for virtual display. // Equal to min(max_height, max_width). static uint64_t maxVirtualDisplaySize; static char const* getServiceName() ANDROID_API { return "SurfaceFlinger"; } Loading services/surfaceflinger/SurfaceFlinger_hwc1.cpp +10 −4 Original line number Diff line number Diff line Loading @@ -114,6 +114,7 @@ int64_t SurfaceFlinger::sfVsyncPhaseOffsetNs; bool SurfaceFlinger::useContextPriority; int64_t SurfaceFlinger::dispSyncPresentTimeOffset; bool SurfaceFlinger::useHwcForRgbToYuv; uint64_t SurfaceFlinger::maxVirtualDisplaySize; SurfaceFlinger::SurfaceFlinger() : BnSurfaceComposer(), Loading Loading @@ -150,13 +151,17 @@ SurfaceFlinger::SurfaceFlinger() mLastSwapTime(0), mNumLayers(0) { ALOGI("SurfaceFlinger is starting"); vsyncPhaseOffsetNs = getInt64< ISurfaceFlingerConfigs, &ISurfaceFlingerConfigs::vsyncEventPhaseOffsetNs>(1000000); sfVsyncPhaseOffsetNs = getInt64< ISurfaceFlingerConfigs, &ISurfaceFlingerConfigs::vsyncSfEventPhaseOffsetNs>(1000000); ALOGI("SurfaceFlinger is starting"); maxVirtualDisplaySize = getUInt64<ISurfaceFlingerConfigs, &ISurfaceFlingerConfigs::maxVirtualDisplaySize>(0); useContextPriority = getBool< ISurfaceFlingerConfigs, &ISurfaceFlingerConfigs::useContextPriority>(false); Loading Loading @@ -1701,9 +1706,9 @@ void SurfaceFlinger::handleTransactionLocked(uint32_t transactionFlags) ALOGE_IF(status != NO_ERROR, "Unable to query height (%d)", status); if (mUseHwcVirtualDisplays && (MAX_VIRTUAL_DISPLAY_DIMENSION == 0 || (width <= MAX_VIRTUAL_DISPLAY_DIMENSION && height <= MAX_VIRTUAL_DISPLAY_DIMENSION))) { (SurfaceFlinger::maxVirtualDisplaySize == 0 || (width <= SurfaceFlinger::maxVirtualDisplaySize && height <= SurfaceFlinger::maxVirtualDisplaySize))) { hwcDisplayId = allocateHwcDisplayId(state.type); } Loading Loading @@ -3015,6 +3020,7 @@ void SurfaceFlinger::appendSfConfigString(String8& result) const result.appendFormat(" PRESENT_TIME_OFFSET=%" PRId64, dispSyncPresentTimeOffset); result.appendFormat(" FORCE_HWC_FOR_RBG_TO_YUV=%d", useHwcForRgbToYuv); result.appendFormat(" MAX_VIRT_DISPLAY_DIM=%" PRIu64, maxVirtualDisplaySize); result.append("]"); } Loading Loading
services/surfaceflinger/Android.mk +0 −6 Original line number Diff line number Diff line Loading @@ -73,12 +73,6 @@ ifeq ($(TARGET_RUNNING_WITHOUT_SYNC_FRAMEWORK),true) LOCAL_CFLAGS += -DRUNNING_WITHOUT_SYNC_FRAMEWORK endif ifneq ($(MAX_VIRTUAL_DISPLAY_DIMENSION),) LOCAL_CFLAGS += -DMAX_VIRTUAL_DISPLAY_DIMENSION=$(MAX_VIRTUAL_DISPLAY_DIMENSION) else LOCAL_CFLAGS += -DMAX_VIRTUAL_DISPLAY_DIMENSION=0 endif LOCAL_CFLAGS += -fvisibility=hidden -Werror=format LOCAL_HEADER_LIBRARIES := \ Loading
services/surfaceflinger/DisplayHardware/HWComposer.cpp +5 −5 Original line number Diff line number Diff line Loading @@ -267,12 +267,12 @@ status_t HWComposer::allocateVirtualDisplay(uint32_t width, uint32_t height, return NO_MEMORY; } if (MAX_VIRTUAL_DISPLAY_DIMENSION != 0 && (width > MAX_VIRTUAL_DISPLAY_DIMENSION || height > MAX_VIRTUAL_DISPLAY_DIMENSION)) { if (SurfaceFlinger::maxVirtualDisplaySize != 0 && (width > SurfaceFlinger::maxVirtualDisplaySize || height > SurfaceFlinger::maxVirtualDisplaySize)) { ALOGE("createVirtualDisplay: Can't create a virtual display with" " a dimension > %u (tried %u x %u)", MAX_VIRTUAL_DISPLAY_DIMENSION, width, height); " a dimension > %" PRIu64 " (tried %u x %u)", SurfaceFlinger::maxVirtualDisplaySize, width, height); return INVALID_OPERATION; } Loading
services/surfaceflinger/SurfaceFlinger.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -99,6 +99,7 @@ EGLAPI const char* eglQueryStringImplementationANDROID(EGLDisplay dpy, EGLint na namespace android { using namespace android::hardware::configstore; using namespace android::hardware::configstore::V1_0; Loading @@ -115,6 +116,7 @@ int64_t SurfaceFlinger::sfVsyncPhaseOffsetNs; bool SurfaceFlinger::useContextPriority; int64_t SurfaceFlinger::dispSyncPresentTimeOffset; bool SurfaceFlinger::useHwcForRgbToYuv; uint64_t SurfaceFlinger::maxVirtualDisplaySize; SurfaceFlinger::SurfaceFlinger() : BnSurfaceComposer(), Loading Loading @@ -176,6 +178,9 @@ SurfaceFlinger::SurfaceFlinger() useHwcForRgbToYuv = getBool< ISurfaceFlingerConfigs, &ISurfaceFlingerConfigs::useHwcForRGBtoYUV>(false); maxVirtualDisplaySize = getUInt64<ISurfaceFlingerConfigs, &ISurfaceFlingerConfigs::maxVirtualDisplaySize>(0); // debugging stuff... char value[PROPERTY_VALUE_MAX]; Loading Loading @@ -3243,6 +3248,7 @@ void SurfaceFlinger::appendSfConfigString(String8& result) const result.appendFormat(" PRESENT_TIME_OFFSET=%" PRId64 , dispSyncPresentTimeOffset); result.appendFormat(" FORCE_HWC_FOR_RBG_TO_YUV=%d", useHwcForRgbToYuv); result.appendFormat(" MAX_VIRT_DISPLAY_DIM=%" PRIu64, maxVirtualDisplaySize); result.append("]"); } Loading
services/surfaceflinger/SurfaceFlinger.h +4 −1 Original line number Diff line number Diff line Loading @@ -105,7 +105,6 @@ class SurfaceFlinger : public BnSurfaceComposer, { public: // This is the phase offset in nanoseconds of the software vsync event // relative to the vsync event reported by HWComposer. The software vsync // event is when SurfaceFlinger and Choreographer-based applications run each Loading Loading @@ -142,6 +141,10 @@ public: // GL composition. static bool useHwcForRgbToYuv; // Maximum dimension supported by HWC for virtual display. // Equal to min(max_height, max_width). static uint64_t maxVirtualDisplaySize; static char const* getServiceName() ANDROID_API { return "SurfaceFlinger"; } Loading
services/surfaceflinger/SurfaceFlinger_hwc1.cpp +10 −4 Original line number Diff line number Diff line Loading @@ -114,6 +114,7 @@ int64_t SurfaceFlinger::sfVsyncPhaseOffsetNs; bool SurfaceFlinger::useContextPriority; int64_t SurfaceFlinger::dispSyncPresentTimeOffset; bool SurfaceFlinger::useHwcForRgbToYuv; uint64_t SurfaceFlinger::maxVirtualDisplaySize; SurfaceFlinger::SurfaceFlinger() : BnSurfaceComposer(), Loading Loading @@ -150,13 +151,17 @@ SurfaceFlinger::SurfaceFlinger() mLastSwapTime(0), mNumLayers(0) { ALOGI("SurfaceFlinger is starting"); vsyncPhaseOffsetNs = getInt64< ISurfaceFlingerConfigs, &ISurfaceFlingerConfigs::vsyncEventPhaseOffsetNs>(1000000); sfVsyncPhaseOffsetNs = getInt64< ISurfaceFlingerConfigs, &ISurfaceFlingerConfigs::vsyncSfEventPhaseOffsetNs>(1000000); ALOGI("SurfaceFlinger is starting"); maxVirtualDisplaySize = getUInt64<ISurfaceFlingerConfigs, &ISurfaceFlingerConfigs::maxVirtualDisplaySize>(0); useContextPriority = getBool< ISurfaceFlingerConfigs, &ISurfaceFlingerConfigs::useContextPriority>(false); Loading Loading @@ -1701,9 +1706,9 @@ void SurfaceFlinger::handleTransactionLocked(uint32_t transactionFlags) ALOGE_IF(status != NO_ERROR, "Unable to query height (%d)", status); if (mUseHwcVirtualDisplays && (MAX_VIRTUAL_DISPLAY_DIMENSION == 0 || (width <= MAX_VIRTUAL_DISPLAY_DIMENSION && height <= MAX_VIRTUAL_DISPLAY_DIMENSION))) { (SurfaceFlinger::maxVirtualDisplaySize == 0 || (width <= SurfaceFlinger::maxVirtualDisplaySize && height <= SurfaceFlinger::maxVirtualDisplaySize))) { hwcDisplayId = allocateHwcDisplayId(state.type); } Loading Loading @@ -3015,6 +3020,7 @@ void SurfaceFlinger::appendSfConfigString(String8& result) const result.appendFormat(" PRESENT_TIME_OFFSET=%" PRId64, dispSyncPresentTimeOffset); result.appendFormat(" FORCE_HWC_FOR_RBG_TO_YUV=%d", useHwcForRgbToYuv); result.appendFormat(" MAX_VIRT_DISPLAY_DIM=%" PRIu64, maxVirtualDisplaySize); result.append("]"); } Loading