Add method to get surface dataspace
Add ability to query the dataspace of a FramebufferSurface so that
we can include that in the DisplayDevice dumpsys data.
Test: adb shell dumpsys SurfaceFlinger
Look for DisplayDevice section for dataspace.
Bug: 63146977
Change-Id: I1d30bd48782485a422db7a0a0af1e585bbffd508
diff --git a/libs/gui/Surface.cpp b/libs/gui/Surface.cpp
index 5b1c599..6c9d88b 100644
--- a/libs/gui/Surface.cpp
+++ b/libs/gui/Surface.cpp
@@ -1509,6 +1509,12 @@
return NO_ERROR;
}
+android_dataspace_t Surface::getBuffersDataSpace() {
+ ALOGV("Surface::getBuffersDataSpace");
+ Mutex::Autolock lock(mMutex);
+ return mDataSpace;
+}
+
void Surface::freeAllBuffers() {
for (int i = 0; i < NUM_BUFFER_SLOTS; i++) {
mSlots[i].buffer = 0;