Add DisplaySurface abstraction
DisplayDevice now has a DisplaySurface instead of using
FramebufferSurface directly. FramebufferSurface implements
DisplaySurface, and so does the new VirtualDisplaySurface class.
DisplayDevice now always has a surface, not just for virtual displays.
In this change VirtualDisplaySurface is just a stub; buffers still go
directly from GLES to the final consumer.
Bug: 8384764
Change-Id: I57cb668edbc6c37bfebda90b9222d435bf589f37
diff --git a/services/surfaceflinger/DisplayDevice.h b/services/surfaceflinger/DisplayDevice.h
index f671017..d8f55b4 100644
--- a/services/surfaceflinger/DisplayDevice.h
+++ b/services/surfaceflinger/DisplayDevice.h
@@ -37,7 +37,7 @@
namespace android {
class DisplayInfo;
-class FramebufferSurface;
+class DisplaySurface;
class Layer;
class SurfaceFlinger;
class HWComposer;
@@ -74,8 +74,7 @@
DisplayType type,
bool isSecure,
const wp<IBinder>& displayToken,
- const sp<ANativeWindow>& nativeWindow,
- const sp<FramebufferSurface>& framebufferSurface,
+ const sp<DisplaySurface>& displaySurface,
EGLConfig config);
~DisplayDevice();
@@ -165,9 +164,7 @@
// ANativeWindow this display is rendering into
sp<ANativeWindow> mNativeWindow;
-
- // set if mNativeWindow is a FramebufferSurface
- sp<FramebufferSurface> mFramebufferSurface;
+ sp<DisplaySurface> mDisplaySurface;
EGLDisplay mDisplay;
EGLSurface mSurface;