diff options
author | John Reck <jreck@google.com> | 2016-04-28 13:18:51 -0700 |
---|---|---|
committer | John Reck <jreck@google.com> | 2016-04-28 13:32:27 -0700 |
commit | 2f69d6d4fdd4994912e5515016421625d1e1c4ec (patch) | |
tree | 66c4345be78f555c646506e7a41111951087f229 /libs/hwui/Readback.cpp | |
parent | f3a51d652ff9fbcb5a41c71c801de71a3b1ece78 (diff) |
Support transform'd GraphicBuffers
Bug: 28428955
Change-Id: I23e2fc9b96a67c7cfda42d9d7319e478194a7fa7
Diffstat (limited to 'libs/hwui/Readback.cpp')
-rw-r--r-- | libs/hwui/Readback.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libs/hwui/Readback.cpp b/libs/hwui/Readback.cpp index 49596e143ebf..55f823dfe226 100644 --- a/libs/hwui/Readback.cpp +++ b/libs/hwui/Readback.cpp @@ -101,7 +101,10 @@ CopyResult Readback::copySurfaceInto(renderthread::RenderThread& renderThread, // Setup the source sp<GraphicBuffer> sourceBuffer; sp<Fence> sourceFence; - status_t err = surface.getLastQueuedBuffer(&sourceBuffer, &sourceFence); + Matrix4 texTransform; + status_t err = surface.getLastQueuedBuffer(&sourceBuffer, &sourceFence, + texTransform.data); + texTransform.invalidateType(); if (err != NO_ERROR) { ALOGW("Failed to get last queued buffer, error = %d", err); return CopyResult::UnknownError; @@ -163,8 +166,8 @@ CopyResult Readback::copySurfaceInto(renderthread::RenderThread& renderThread, Glop glop; GlopBuilder(renderState, caches, &glop) .setRoundRectClipState(nullptr) - .setMeshTexturedUvQuad(nullptr, Rect(0, 1, 1, 0)) // TODO: simplify with VBO - .setFillExternalTexture(sourceTexture) + .setMeshTexturedUnitQuad(nullptr) + .setFillExternalTexture(sourceTexture, texTransform) .setTransform(Matrix4::identity(), TransformFlags::None) .setModelViewMapUnitToRect(destRect) .build(); |