factor EGL/GL and surface creation out of DisplayHardware
Change-Id: Icd85a6a4caad06f056578008af3e21666fa8b1f4
diff --git a/services/surfaceflinger/DisplayHardware/FramebufferSurface.h b/services/surfaceflinger/DisplayHardware/FramebufferSurface.h
index 5b4fd01..672bfbb 100644
--- a/services/surfaceflinger/DisplayHardware/FramebufferSurface.h
+++ b/services/surfaceflinger/DisplayHardware/FramebufferSurface.h
@@ -37,11 +37,11 @@
class FramebufferSurface : public SurfaceTextureClient {
public:
- FramebufferSurface();
- virtual void onFirstRef();
+ static sp<FramebufferSurface> create();
- framebuffer_device_t const * getDevice() const { return fbDev; }
+ // TODO: this should be coming from HWC
+ float getRefreshRate() const;
bool isUpdateOnDemand() const { return mUpdateOnDemand; }
status_t setUpdateRectangle(const Rect& updateRect);
@@ -49,7 +49,11 @@
void dump(String8& result);
+protected:
+ virtual void onFirstRef();
+
private:
+ FramebufferSurface();
virtual ~FramebufferSurface(); // this class cannot be overloaded
virtual int query(int what, int* value) const;