summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--opengl/libagl/egl.cpp4
-rw-r--r--opengl/tests/gl_jni/jni/gl_code.cpp1
-rw-r--r--services/surfaceflinger/LayerBuffer.cpp2
3 files changed, 3 insertions, 4 deletions
diff --git a/opengl/libagl/egl.cpp b/opengl/libagl/egl.cpp
index 163b2dbcd3..460b74ff38 100644
--- a/opengl/libagl/egl.cpp
+++ b/opengl/libagl/egl.cpp
@@ -480,13 +480,13 @@ void egl_window_surface_v2_t::copyBlt(
copybit_device_t* const copybit = blitengine;
if (copybit) {
copybit_image_t simg;
- simg.w = src->width;
+ simg.w = src->stride;
simg.h = src->height;
simg.format = src->format;
simg.handle = const_cast<native_handle_t*>(src->handle);
copybit_image_t dimg;
- dimg.w = dst->width;
+ dimg.w = dst->stride;
dimg.h = dst->height;
dimg.format = dst->format;
dimg.handle = const_cast<native_handle_t*>(dst->handle);
diff --git a/opengl/tests/gl_jni/jni/gl_code.cpp b/opengl/tests/gl_jni/jni/gl_code.cpp
index f031c79cd3..ef66841f27 100644
--- a/opengl/tests/gl_jni/jni/gl_code.cpp
+++ b/opengl/tests/gl_jni/jni/gl_code.cpp
@@ -181,4 +181,3 @@ JNIEXPORT void JNICALL Java_com_android_gljni_GLJNILib_changeBackground(JNIEnv *
{
background = 1.0f - background;
}
-
diff --git a/services/surfaceflinger/LayerBuffer.cpp b/services/surfaceflinger/LayerBuffer.cpp
index 87cabedc04..c060895bf0 100644
--- a/services/surfaceflinger/LayerBuffer.cpp
+++ b/services/surfaceflinger/LayerBuffer.cpp
@@ -501,7 +501,7 @@ status_t LayerBuffer::BufferSource::initTempBuffer() const
const ISurface::BufferHeap& buffers(mBufferHeap);
uint32_t w = mLayer.mTransformedBounds.width();
uint32_t h = mLayer.mTransformedBounds.height();
- if (buffers.w * h != buffers.h * w) {
+ if (mLayer.getOrientation() & (Transform::ROT_90 | Transform::ROT_270)) {
int t = w; w = h; h = t;
}