Loading libs/gui/Surface.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -1509,6 +1509,12 @@ int Surface::setBuffersDataSpace(android_dataspace dataSpace) 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; Loading libs/gui/include/gui/Surface.h +2 −0 Original line number Diff line number Diff line Loading @@ -281,6 +281,8 @@ public: // detachNextBuffer, or attachBuffer call. status_t getAndFlushRemovedBuffers(std::vector<sp<GraphicBuffer>>* out); android_dataspace_t getBuffersDataSpace(); protected: enum { NUM_BUFFER_SLOTS = BufferQueueDefs::NUM_BUFFER_SLOTS }; enum { DEFAULT_FORMAT = PIXEL_FORMAT_RGBA_8888 }; Loading services/surfaceflinger/DisplayDevice.cpp +8 −3 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ #include <utils/RefBase.h> #include <utils/Log.h> #include <ui/DebugUtils.h> #include <ui/DisplayInfo.h> #include <ui/PixelFormat.h> Loading Loading @@ -617,6 +618,7 @@ uint32_t DisplayDevice::getPrimaryDisplayOrientationTransform() { void DisplayDevice::dump(String8& result) const { const Transform& tr(mGlobalTransform); ANativeWindow* const window = mNativeWindow.get(); EGLint redSize, greenSize, blueSize, alphaSize; eglGetConfigAttrib(mDisplay, mConfig, EGL_RED_SIZE, &redSize); eglGetConfigAttrib(mDisplay, mConfig, EGL_GREEN_SIZE, &greenSize); Loading @@ -626,9 +628,9 @@ void DisplayDevice::dump(String8& result) const { result.appendFormat(" type=%x, hwcId=%d, layerStack=%u, (%4dx%4d), ANativeWindow=%p " "(%d:%d:%d:%d), orient=%2d (type=%08x), " "flips=%u, isSecure=%d, powerMode=%d, activeConfig=%d, numLayers=%zu\n", mType, mHwcDisplayId, mLayerStack, mDisplayWidth, mDisplayHeight, mNativeWindow.get(), redSize, greenSize, blueSize, alphaSize, mOrientation, tr.getType(), getPageFlipCount(), mIsSecure, mPowerMode, mActiveConfig, mType, mHwcDisplayId, mLayerStack, mDisplayWidth, mDisplayHeight, window, redSize, greenSize, blueSize, alphaSize, mOrientation, tr.getType(), getPageFlipCount(), mIsSecure, mPowerMode, mActiveConfig, mVisibleLayersSortedByZ.size()); result.appendFormat(" v:[%d,%d,%d,%d], f:[%d,%d,%d,%d], s:[%d,%d,%d,%d]," "transform:[[%0.3f,%0.3f,%0.3f][%0.3f,%0.3f,%0.3f][%0.3f,%0.3f,%0.3f]]\n", Loading @@ -636,6 +638,9 @@ void DisplayDevice::dump(String8& result) const { mFrame.left, mFrame.top, mFrame.right, mFrame.bottom, mScissor.left, mScissor.top, mScissor.right, mScissor.bottom, tr[0][0], tr[1][0], tr[2][0], tr[0][1], tr[1][1], tr[2][1], tr[0][2], tr[1][2], tr[2][2]); auto const surface = static_cast<Surface*>(window); android_dataspace dataspace = surface->getBuffersDataSpace(); result.appendFormat(" dataspace: %s (%d)\n", dataspaceDetails(dataspace).c_str(), dataspace); String8 surfaceDump; mDisplaySurface->dumpAsString(surfaceDump); Loading Loading
libs/gui/Surface.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -1509,6 +1509,12 @@ int Surface::setBuffersDataSpace(android_dataspace dataSpace) 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; Loading
libs/gui/include/gui/Surface.h +2 −0 Original line number Diff line number Diff line Loading @@ -281,6 +281,8 @@ public: // detachNextBuffer, or attachBuffer call. status_t getAndFlushRemovedBuffers(std::vector<sp<GraphicBuffer>>* out); android_dataspace_t getBuffersDataSpace(); protected: enum { NUM_BUFFER_SLOTS = BufferQueueDefs::NUM_BUFFER_SLOTS }; enum { DEFAULT_FORMAT = PIXEL_FORMAT_RGBA_8888 }; Loading
services/surfaceflinger/DisplayDevice.cpp +8 −3 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ #include <utils/RefBase.h> #include <utils/Log.h> #include <ui/DebugUtils.h> #include <ui/DisplayInfo.h> #include <ui/PixelFormat.h> Loading Loading @@ -617,6 +618,7 @@ uint32_t DisplayDevice::getPrimaryDisplayOrientationTransform() { void DisplayDevice::dump(String8& result) const { const Transform& tr(mGlobalTransform); ANativeWindow* const window = mNativeWindow.get(); EGLint redSize, greenSize, blueSize, alphaSize; eglGetConfigAttrib(mDisplay, mConfig, EGL_RED_SIZE, &redSize); eglGetConfigAttrib(mDisplay, mConfig, EGL_GREEN_SIZE, &greenSize); Loading @@ -626,9 +628,9 @@ void DisplayDevice::dump(String8& result) const { result.appendFormat(" type=%x, hwcId=%d, layerStack=%u, (%4dx%4d), ANativeWindow=%p " "(%d:%d:%d:%d), orient=%2d (type=%08x), " "flips=%u, isSecure=%d, powerMode=%d, activeConfig=%d, numLayers=%zu\n", mType, mHwcDisplayId, mLayerStack, mDisplayWidth, mDisplayHeight, mNativeWindow.get(), redSize, greenSize, blueSize, alphaSize, mOrientation, tr.getType(), getPageFlipCount(), mIsSecure, mPowerMode, mActiveConfig, mType, mHwcDisplayId, mLayerStack, mDisplayWidth, mDisplayHeight, window, redSize, greenSize, blueSize, alphaSize, mOrientation, tr.getType(), getPageFlipCount(), mIsSecure, mPowerMode, mActiveConfig, mVisibleLayersSortedByZ.size()); result.appendFormat(" v:[%d,%d,%d,%d], f:[%d,%d,%d,%d], s:[%d,%d,%d,%d]," "transform:[[%0.3f,%0.3f,%0.3f][%0.3f,%0.3f,%0.3f][%0.3f,%0.3f,%0.3f]]\n", Loading @@ -636,6 +638,9 @@ void DisplayDevice::dump(String8& result) const { mFrame.left, mFrame.top, mFrame.right, mFrame.bottom, mScissor.left, mScissor.top, mScissor.right, mScissor.bottom, tr[0][0], tr[1][0], tr[2][0], tr[0][1], tr[1][1], tr[2][1], tr[0][2], tr[1][2], tr[2][2]); auto const surface = static_cast<Surface*>(window); android_dataspace dataspace = surface->getBuffersDataSpace(); result.appendFormat(" dataspace: %s (%d)\n", dataspaceDetails(dataspace).c_str(), dataspace); String8 surfaceDump; mDisplaySurface->dumpAsString(surfaceDump); Loading