diff options
| author | 2012-04-03 15:54:58 -0700 | |
|---|---|---|
| committer | 2012-04-12 17:49:03 -0700 | |
| commit | 016c8cbce4dde21f2703b9865f52d16b8d5d5ae2 (patch) | |
| tree | 70b2f2867998a07541eb206642b54e918cbf08e1 /libs/gui/BufferQueue.cpp | |
| parent | 3bc59682cd3e330f8cc0a38a20a0e37e083671ee (diff) | |
Enabled cropping support in SurfaceTexture
SurfaceTexture will modify the crop rect so it matches
the desired output aspect ratio when the scaling
mode is NATIVE_WINDOW_SCALING_MODE_CROP. Added a test
for this new scaling mode.
Change-Id: I60f24dcbc294b65cd10a393d9e27d40f07d27bb6
Diffstat (limited to 'libs/gui/BufferQueue.cpp')
| -rw-r--r-- | libs/gui/BufferQueue.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/gui/BufferQueue.cpp b/libs/gui/BufferQueue.cpp index ddbfe05409..3c1fcc5cd3 100644 --- a/libs/gui/BufferQueue.cpp +++ b/libs/gui/BufferQueue.cpp @@ -531,7 +531,8 @@ status_t BufferQueue::queueBuffer(int buf, ATRACE_CALL(); ATRACE_BUFFER_INDEX(buf); - ST_LOGV("queueBuffer: slot=%d time=%lld", buf, timestamp); + ST_LOGV("queueBuffer: slot=%d time=%lld crop=[%d,%d,%d,%d]", buf, timestamp, + crop.left, crop.top, crop.right, crop.bottom); sp<ConsumerListener> listener; @@ -592,6 +593,7 @@ status_t BufferQueue::queueBuffer(int buf, switch (scalingMode) { case NATIVE_WINDOW_SCALING_MODE_FREEZE: case NATIVE_WINDOW_SCALING_MODE_SCALE_TO_WINDOW: + case NATIVE_WINDOW_SCALING_MODE_SCALE_CROP: break; default: ST_LOGE("unknown scaling mode: %d (ignoring)", scalingMode); |