Support Surface and Layer Readback in the SkiaPipelines.
Test: CTS TextureViewTests and UIRendering
Change-Id: I2969c8f5a975bfd9aebcbb585c64d1fcbb2487c2
diff --git a/libs/hwui/Readback.h b/libs/hwui/Readback.h
index 55c943c..7fbc4bf 100644
--- a/libs/hwui/Readback.h
+++ b/libs/hwui/Readback.h
@@ -25,8 +25,6 @@
namespace android {
namespace uirenderer {
-class Layer;
-
// Keep in sync with PixelCopy.java codes
enum class CopyResult {
Success = 0,
@@ -42,15 +40,14 @@
/**
* Copies the surface's most recently queued buffer into the provided bitmap.
*/
- static CopyResult copySurfaceInto(renderthread::RenderThread& renderThread,
- Surface& surface, const Rect& srcRect, SkBitmap* bitmap);
+ virtual CopyResult copySurfaceInto(Surface& surface, const Rect& srcRect,
+ SkBitmap* bitmap) = 0;
- /**
- * Copies the TextureLayer's texture content (thus, the currently rendering buffer) into the
- * provided bitmap.
- */
- static CopyResult copyTextureLayerInto(renderthread::RenderThread& renderThread,
- Layer& layer, SkBitmap* bitmap);
+protected:
+ explicit Readback(renderthread::RenderThread& thread) : mRenderThread(thread) {}
+ virtual ~Readback() {}
+
+ renderthread::RenderThread& mRenderThread;
};
} // namespace uirenderer