diff options
author | John Reck <jreck@google.com> | 2021-06-09 22:43:05 -0400 |
---|---|---|
committer | John Reck <jreck@google.com> | 2021-06-11 01:52:14 +0000 |
commit | 760051854e03ab0d6fae3330363c2ecc96e25dc4 (patch) | |
tree | e7d183cd1a83fa4b629d2da7efea593ed8bb60d7 /libs/hwui/renderthread/RenderProxy.h | |
parent | 466698f9afc2b4930544c07776493d4bce915f24 (diff) |
Improve picture capture debug path
* Fixes hardware bitmap capture
* Fixes mutable bitmap capture (no flickering)
* Adds basic single-frame LRU cache to avoid
repeated readbacks of GPU resources
* Does up-front readback of GPU resources
* Moves serialization off RenderThread again thanks
to up-front readback avoiding needing GPU access
off-thread
* Reduces RAM usage & improves performance by serializing
directly to output stream instead of first copying to
a byte[]
Bug: 174223722
Test: PictureCaptureDemo mirrors the content
Change-Id: If7ec208b61d5b917e82087cc312880fc5a38c943
Diffstat (limited to 'libs/hwui/renderthread/RenderProxy.h')
-rw-r--r-- | libs/hwui/renderthread/RenderProxy.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libs/hwui/renderthread/RenderProxy.h b/libs/hwui/renderthread/RenderProxy.h index 0681dc5e16be..6d80949a4eba 100644 --- a/libs/hwui/renderthread/RenderProxy.h +++ b/libs/hwui/renderthread/RenderProxy.h @@ -136,6 +136,7 @@ public: static void prepareToDraw(Bitmap& bitmap); static int copyHWBitmapInto(Bitmap* hwBitmap, SkBitmap* bitmap); + static int copyImageInto(const sk_sp<SkImage>& image, SkBitmap* bitmap); static void disableVsync(); |