SurfaceFlinger: screenshots w/ protected buffers
This change modifies SurfaceFlinger's screenshot behavior when a layer
with a protected buffer is visible. The previous behavior was to simply
fail the screenshot. The new behavior is to render the screenshot using
a placeholder texture where the protected buffer would have been.
Change-Id: I5e50cb2f3b31b2ea81cfe291c9b4a42e9ee71874
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index 128a64d..92b265e 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -192,6 +192,8 @@
sp<Layer> getLayer(const sp<ISurface>& sur) const;
+ GLuint getProtectedTexName() const { return mProtectedTexName; }
+
private:
// DeathRecipient interface
virtual void binderDied(const wp<IBinder>& who);
@@ -349,6 +351,7 @@
sp<IMemoryHeap> mServerHeap;
surface_flinger_cblk_t* mServerCblk;
GLuint mWormholeTexName;
+ GLuint mProtectedTexName;
nsecs_t mBootTime;
// Can only accessed from the main thread, these members