Revert "Remove gl surfaces from DisplayDevice."

This reverts commit ce0ad96d3c23b6b7bc4d6a540141ea1111b4430e.

Reason for revert: breaks screenrecord (b/119534075)

Change-Id: I45af7b49a490601fcc68ca55c79f590bb0db1b01
diff --git a/services/surfaceflinger/DisplayDevice.h b/services/surfaceflinger/DisplayDevice.h
index eb2c5c3..560a958 100644
--- a/services/surfaceflinger/DisplayDevice.h
+++ b/services/surfaceflinger/DisplayDevice.h
@@ -24,13 +24,12 @@
 #include <string>
 #include <unordered_map>
 
-#include <android/native_window.h>
 #include <binder/IBinder.h>
 #include <gui/LayerState.h>
 #include <hardware/hwcomposer_defs.h>
 #include <math/mat4.h>
 #include <renderengine/RenderEngine.h>
-#include <system/window.h>
+#include <renderengine/Surface.h>
 #include <ui/GraphicTypes.h>
 #include <ui/HdrCapabilities.h>
 #include <ui/Region.h>
@@ -43,6 +42,8 @@
 #include "DisplayHardware/DisplayIdentification.h"
 #include "RenderArea.h"
 
+struct ANativeWindow;
+
 namespace android {
 
 class DisplaySurface;
@@ -162,6 +163,7 @@
     void setDisplayName(const std::string& displayName);
     const std::string& getDisplayName() const { return mDisplayName; }
 
+    bool makeCurrent() const;
     // Acquires a new buffer for GPU composition.
     void readyNewBuffer();
     // Marks the current buffer has finished, so that it can be presented and
@@ -218,6 +220,7 @@
     // that drawing to the buffer is now complete.
     base::unique_fd mBufferReady;
 
+    std::unique_ptr<renderengine::Surface> mSurface;
     int             mDisplayWidth;
     int             mDisplayHeight;
     const int       mDisplayInstallOrientation;
@@ -337,6 +340,7 @@
     bool isSecure{false};
     sp<ANativeWindow> nativeWindow;
     sp<DisplaySurface> displaySurface;
+    std::unique_ptr<renderengine::Surface> renderSurface;
     int displayInstallOrientation{DisplayState::eOrientationDefault};
     bool hasWideColorGamut{false};
     HdrCapabilities hdrCapabilities;