Merge "Expose acquire_fence though ConsumerQueue::Dequeue"
diff --git a/libs/nativewindow/include/android/hardware_buffer.h b/libs/nativewindow/include/android/hardware_buffer.h
index ef49995..572cb4e 100644
--- a/libs/nativewindow/include/android/hardware_buffer.h
+++ b/libs/nativewindow/include/android/hardware_buffer.h
@@ -97,8 +97,6 @@
AHARDWAREBUFFER_USAGE0_GPU_SAMPLED_IMAGE = 1ULL << 10,
/* The buffer will be written to by the GPU */
AHARDWAREBUFFER_USAGE0_GPU_COLOR_OUTPUT = 1ULL << 11,
- /* The buffer will be used as a cubemap texture */
- AHARDWAREBUFFER_USAGE0_GPU_CUBEMAP = 1ULL << 13,
/* The buffer will be used as a shader storage or uniform buffer object*/
AHARDWAREBUFFER_USAGE0_GPU_DATA_BUFFER = 1ULL << 14,
/* The buffer must not be used outside of a protected hardware path */
diff --git a/services/surfaceflinger/Android.mk b/services/surfaceflinger/Android.mk
index 1b13ea9..3aab4cf 100644
--- a/services/surfaceflinger/Android.mk
+++ b/services/surfaceflinger/Android.mk
@@ -73,6 +73,12 @@
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 := \
diff --git a/services/surfaceflinger/DisplayHardware/HWComposer.cpp b/services/surfaceflinger/DisplayHardware/HWComposer.cpp
index 23b7a45..6644bd9 100644
--- a/services/surfaceflinger/DisplayHardware/HWComposer.cpp
+++ b/services/surfaceflinger/DisplayHardware/HWComposer.cpp
@@ -267,12 +267,12 @@
return NO_MEMORY;
}
- if (SurfaceFlinger::maxVirtualDisplaySize != 0 &&
- (width > SurfaceFlinger::maxVirtualDisplaySize ||
- height > SurfaceFlinger::maxVirtualDisplaySize)) {
+ if (MAX_VIRTUAL_DISPLAY_DIMENSION != 0 &&
+ (width > MAX_VIRTUAL_DISPLAY_DIMENSION ||
+ height > MAX_VIRTUAL_DISPLAY_DIMENSION)) {
ALOGE("createVirtualDisplay: Can't create a virtual display with"
- " a dimension > %" PRIu64 " (tried %u x %u)",
- SurfaceFlinger::maxVirtualDisplaySize, width, height);
+ " a dimension > %u (tried %u x %u)",
+ MAX_VIRTUAL_DISPLAY_DIMENSION, width, height);
return INVALID_OPERATION;
}
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index cfde375..5f1d16f 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -99,7 +99,6 @@
namespace android {
-
using namespace android::hardware::configstore;
using namespace android::hardware::configstore::V1_0;
@@ -116,7 +115,6 @@
bool SurfaceFlinger::useContextPriority;
int64_t SurfaceFlinger::dispSyncPresentTimeOffset;
bool SurfaceFlinger::useHwcForRgbToYuv;
-uint64_t SurfaceFlinger::maxVirtualDisplaySize;
SurfaceFlinger::SurfaceFlinger()
: BnSurfaceComposer(),
@@ -178,9 +176,6 @@
useHwcForRgbToYuv = getBool< ISurfaceFlingerConfigs,
&ISurfaceFlingerConfigs::useHwcForRGBtoYUV>(false);
- maxVirtualDisplaySize = getUInt64<ISurfaceFlingerConfigs,
- &ISurfaceFlingerConfigs::maxVirtualDisplaySize>(0);
-
// debugging stuff...
char value[PROPERTY_VALUE_MAX];
@@ -3248,7 +3243,6 @@
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("]");
}
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index 85b6f2a..e6ccc41 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -105,6 +105,7 @@
{
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
@@ -141,10 +142,6 @@
// 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";
}
diff --git a/services/surfaceflinger/SurfaceFlinger_hwc1.cpp b/services/surfaceflinger/SurfaceFlinger_hwc1.cpp
index 04ef57c..6f6c08b 100644
--- a/services/surfaceflinger/SurfaceFlinger_hwc1.cpp
+++ b/services/surfaceflinger/SurfaceFlinger_hwc1.cpp
@@ -114,7 +114,6 @@
bool SurfaceFlinger::useContextPriority;
int64_t SurfaceFlinger::dispSyncPresentTimeOffset;
bool SurfaceFlinger::useHwcForRgbToYuv;
-uint64_t SurfaceFlinger::maxVirtualDisplaySize;
SurfaceFlinger::SurfaceFlinger()
: BnSurfaceComposer(),
@@ -151,17 +150,13 @@
mLastSwapTime(0),
mNumLayers(0)
{
-
- ALOGI("SurfaceFlinger is starting");
-
vsyncPhaseOffsetNs = getInt64< ISurfaceFlingerConfigs,
&ISurfaceFlingerConfigs::vsyncEventPhaseOffsetNs>(1000000);
sfVsyncPhaseOffsetNs = getInt64< ISurfaceFlingerConfigs,
&ISurfaceFlingerConfigs::vsyncSfEventPhaseOffsetNs>(1000000);
- maxVirtualDisplaySize = getUInt64<ISurfaceFlingerConfigs,
- &ISurfaceFlingerConfigs::maxVirtualDisplaySize>(0);
+ ALOGI("SurfaceFlinger is starting");
useContextPriority = getBool< ISurfaceFlingerConfigs,
&ISurfaceFlingerConfigs::useContextPriority>(false);
@@ -1706,9 +1701,9 @@
ALOGE_IF(status != NO_ERROR,
"Unable to query height (%d)", status);
if (mUseHwcVirtualDisplays &&
- (SurfaceFlinger::maxVirtualDisplaySize == 0 ||
- (width <= SurfaceFlinger::maxVirtualDisplaySize &&
- height <= SurfaceFlinger::maxVirtualDisplaySize))) {
+ (MAX_VIRTUAL_DISPLAY_DIMENSION == 0 ||
+ (width <= MAX_VIRTUAL_DISPLAY_DIMENSION &&
+ height <= MAX_VIRTUAL_DISPLAY_DIMENSION))) {
hwcDisplayId = allocateHwcDisplayId(state.type);
}
@@ -3020,7 +3015,6 @@
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("]");
}