summaryrefslogtreecommitdiff
path: root/libs/hwui/renderthread/RenderProxy.cpp
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2016-09-01 09:44:09 -0700
committerJohn Reck <jreck@google.com>2016-09-07 11:41:15 -0700
commit9580146f5076aaa7c498f86bd3d724c00599f6f4 (patch)
tree33df26fef261fe9ce563b20438726e0094d3c583 /libs/hwui/renderthread/RenderProxy.cpp
parent51c1b3466acfb77c14ee5332ff1ff2a273af4670 (diff)
Add API to copy a window
Change-Id: I9bb5209010db6665be4b6f8db81a6fc1b7debc45
Diffstat (limited to 'libs/hwui/renderthread/RenderProxy.cpp')
-rw-r--r--libs/hwui/renderthread/RenderProxy.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/libs/hwui/renderthread/RenderProxy.cpp b/libs/hwui/renderthread/RenderProxy.cpp
index 3edd42372653..dcbc980763ec 100644
--- a/libs/hwui/renderthread/RenderProxy.cpp
+++ b/libs/hwui/renderthread/RenderProxy.cpp
@@ -617,17 +617,19 @@ void RenderProxy::removeFrameMetricsObserver(FrameMetricsObserver* observer) {
post(task);
}
-CREATE_BRIDGE3(copySurfaceInto, RenderThread* thread,
- Surface* surface, SkBitmap* bitmap) {
+CREATE_BRIDGE4(copySurfaceInto, RenderThread* thread,
+ Surface* surface, Rect srcRect, SkBitmap* bitmap) {
return (void*) Readback::copySurfaceInto(*args->thread,
- *args->surface, args->bitmap);
+ *args->surface, args->srcRect, args->bitmap);
}
-int RenderProxy::copySurfaceInto(sp<Surface>& surface, SkBitmap* bitmap) {
+int RenderProxy::copySurfaceInto(sp<Surface>& surface, int left, int top,
+ int right, int bottom, SkBitmap* bitmap) {
SETUP_TASK(copySurfaceInto);
args->bitmap = bitmap;
args->surface = surface.get();
args->thread = &RenderThread::getInstance();
+ args->srcRect.set(left, top, right, bottom);
return static_cast<int>(
reinterpret_cast<intptr_t>( staticPostAndWait(task) ));
}