Loading include/gui/SurfaceTextureClient.h +2 −14 Original line number Diff line number Diff line Loading @@ -135,24 +135,12 @@ private: // a timestamp is auto-generated when queueBuffer is called. int64_t mTimestamp; // mQueryWidth is the width returned by query(). It is set to width // of the last dequeued buffer or to mReqWidth if no buffer was dequeued. uint32_t mQueryWidth; // mQueryHeight is the height returned by query(). It is set to height // of the last dequeued buffer or to mReqHeight if no buffer was dequeued. uint32_t mQueryHeight; // mQueryFormat is the format returned by query(). It is set to the last // dequeued format or to mReqFormat if no buffer was dequeued. uint32_t mQueryFormat; // mDefaultWidth is default width of the window, regardless of the // set_dimension call // native_window_set_buffers_dimensions call uint32_t mDefaultWidth; // mDefaultHeight is default width of the window, regardless of the // set_dimension call // native_window_set_buffers_dimensions call uint32_t mDefaultHeight; // mTransformHint is the transform probably applied to buffers of this Loading libs/gui/SurfaceTexture.cpp +7 −8 Original line number Diff line number Diff line Loading @@ -196,11 +196,14 @@ status_t SurfaceTexture::setBufferCount(int bufferCount) { status_t SurfaceTexture::setDefaultBufferSize(uint32_t w, uint32_t h) { if (!w || !h) { LOGE("setDefaultBufferSize: dimensions cannot be 0 (w=%d, h=%d)", w, h); return BAD_VALUE; } Mutex::Autolock lock(mMutex); if ((w != mDefaultWidth) || (h != mDefaultHeight)) { mDefaultWidth = w; mDefaultHeight = h; } return OK; } Loading Loading @@ -885,13 +888,9 @@ int SurfaceTexture::query(int what, int* outValue) switch (what) { case NATIVE_WINDOW_WIDTH: value = mDefaultWidth; if (!mDefaultWidth && !mDefaultHeight && mCurrentTextureBuf!=0) value = mCurrentTextureBuf->width; break; case NATIVE_WINDOW_HEIGHT: value = mDefaultHeight; if (!mDefaultWidth && !mDefaultHeight && mCurrentTextureBuf!=0) value = mCurrentTextureBuf->height; break; case NATIVE_WINDOW_FORMAT: value = mPixelFormat; Loading libs/gui/SurfaceTextureClient.cpp +0 −6 Original line number Diff line number Diff line Loading @@ -52,9 +52,6 @@ void SurfaceTextureClient::init() { mReqFormat = 0; mReqUsage = 0; mTimestamp = NATIVE_WINDOW_TIMESTAMP_AUTO; mQueryWidth = 0; mQueryHeight = 0; mQueryFormat = 0; mDefaultWidth = 0; mDefaultHeight = 0; mTransformHint = 0; Loading Loading @@ -154,9 +151,6 @@ int SurfaceTextureClient::dequeueBuffer(android_native_buffer_t** buffer) { result); return result; } mQueryWidth = gbuf->width; mQueryHeight = gbuf->height; mQueryFormat = gbuf->format; } *buffer = gbuf.get(); return OK; Loading services/surfaceflinger/Layer.cpp +11 −2 Original line number Diff line number Diff line Loading @@ -352,12 +352,13 @@ uint32_t Layer::doTransaction(uint32_t flags) if (sizeChanged) { // the size changed, we need to ask our client to request a new buffer LOGD_IF(DEBUG_RESIZE, "doTransaction: " "resize (layer=%p), requested (%dx%d), drawing (%d,%d), " "fixedSize=%d", "scalingMode=%d", this, int(temp.requested_w), int(temp.requested_h), int(front.requested_w), int(front.requested_h), isFixedSize()); mCurrentScalingMode); if (!isFixedSize()) { // we're being resized and there is a freeze display request, Loading Loading @@ -492,6 +493,14 @@ void Layer::lockPageFlip(bool& recomputeVisibleRegions) // we now have the correct size, unfreeze the screen mFreezeLock.clear(); } LOGD_IF(DEBUG_RESIZE, "lockPageFlip : " " (layer=%p), buffer (%ux%u, tr=%02x), " "requested (%dx%d)", this, bufWidth, bufHeight, mCurrentTransform, front.requested_w, front.requested_h); } } } Loading Loading
include/gui/SurfaceTextureClient.h +2 −14 Original line number Diff line number Diff line Loading @@ -135,24 +135,12 @@ private: // a timestamp is auto-generated when queueBuffer is called. int64_t mTimestamp; // mQueryWidth is the width returned by query(). It is set to width // of the last dequeued buffer or to mReqWidth if no buffer was dequeued. uint32_t mQueryWidth; // mQueryHeight is the height returned by query(). It is set to height // of the last dequeued buffer or to mReqHeight if no buffer was dequeued. uint32_t mQueryHeight; // mQueryFormat is the format returned by query(). It is set to the last // dequeued format or to mReqFormat if no buffer was dequeued. uint32_t mQueryFormat; // mDefaultWidth is default width of the window, regardless of the // set_dimension call // native_window_set_buffers_dimensions call uint32_t mDefaultWidth; // mDefaultHeight is default width of the window, regardless of the // set_dimension call // native_window_set_buffers_dimensions call uint32_t mDefaultHeight; // mTransformHint is the transform probably applied to buffers of this Loading
libs/gui/SurfaceTexture.cpp +7 −8 Original line number Diff line number Diff line Loading @@ -196,11 +196,14 @@ status_t SurfaceTexture::setBufferCount(int bufferCount) { status_t SurfaceTexture::setDefaultBufferSize(uint32_t w, uint32_t h) { if (!w || !h) { LOGE("setDefaultBufferSize: dimensions cannot be 0 (w=%d, h=%d)", w, h); return BAD_VALUE; } Mutex::Autolock lock(mMutex); if ((w != mDefaultWidth) || (h != mDefaultHeight)) { mDefaultWidth = w; mDefaultHeight = h; } return OK; } Loading Loading @@ -885,13 +888,9 @@ int SurfaceTexture::query(int what, int* outValue) switch (what) { case NATIVE_WINDOW_WIDTH: value = mDefaultWidth; if (!mDefaultWidth && !mDefaultHeight && mCurrentTextureBuf!=0) value = mCurrentTextureBuf->width; break; case NATIVE_WINDOW_HEIGHT: value = mDefaultHeight; if (!mDefaultWidth && !mDefaultHeight && mCurrentTextureBuf!=0) value = mCurrentTextureBuf->height; break; case NATIVE_WINDOW_FORMAT: value = mPixelFormat; Loading
libs/gui/SurfaceTextureClient.cpp +0 −6 Original line number Diff line number Diff line Loading @@ -52,9 +52,6 @@ void SurfaceTextureClient::init() { mReqFormat = 0; mReqUsage = 0; mTimestamp = NATIVE_WINDOW_TIMESTAMP_AUTO; mQueryWidth = 0; mQueryHeight = 0; mQueryFormat = 0; mDefaultWidth = 0; mDefaultHeight = 0; mTransformHint = 0; Loading Loading @@ -154,9 +151,6 @@ int SurfaceTextureClient::dequeueBuffer(android_native_buffer_t** buffer) { result); return result; } mQueryWidth = gbuf->width; mQueryHeight = gbuf->height; mQueryFormat = gbuf->format; } *buffer = gbuf.get(); return OK; Loading
services/surfaceflinger/Layer.cpp +11 −2 Original line number Diff line number Diff line Loading @@ -352,12 +352,13 @@ uint32_t Layer::doTransaction(uint32_t flags) if (sizeChanged) { // the size changed, we need to ask our client to request a new buffer LOGD_IF(DEBUG_RESIZE, "doTransaction: " "resize (layer=%p), requested (%dx%d), drawing (%d,%d), " "fixedSize=%d", "scalingMode=%d", this, int(temp.requested_w), int(temp.requested_h), int(front.requested_w), int(front.requested_h), isFixedSize()); mCurrentScalingMode); if (!isFixedSize()) { // we're being resized and there is a freeze display request, Loading Loading @@ -492,6 +493,14 @@ void Layer::lockPageFlip(bool& recomputeVisibleRegions) // we now have the correct size, unfreeze the screen mFreezeLock.clear(); } LOGD_IF(DEBUG_RESIZE, "lockPageFlip : " " (layer=%p), buffer (%ux%u, tr=%02x), " "requested (%dx%d)", this, bufWidth, bufHeight, mCurrentTransform, front.requested_w, front.requested_h); } } } Loading