diff options
author | Mathias Agopian <mathias@google.com> | 2012-08-02 18:32:23 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2012-08-02 22:24:12 -0700 |
commit | 92a979a92c34b7de609ce2b1662c73bb8a2728b9 (patch) | |
tree | cd480c10867c43b49b634ba712f0216ca915200f /services/surfaceflinger/DisplayDevice.h | |
parent | fcb239d3dac8bc80f28177f1951611c1d43286ff (diff) | |
download | frameworks_native-92a979a92c34b7de609ce2b1662c73bb8a2728b9.zip frameworks_native-92a979a92c34b7de609ce2b1662c73bb8a2728b9.tar.gz frameworks_native-92a979a92c34b7de609ce2b1662c73bb8a2728b9.tar.bz2 |
We now have a real list of displays.
displays can be dynamically added or removed, and the
list is part of the SF's transaction.
Change-Id: I4186ea39f1317c0e7c044f869004017738968fab
Diffstat (limited to 'services/surfaceflinger/DisplayDevice.h')
-rw-r--r-- | services/surfaceflinger/DisplayDevice.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/services/surfaceflinger/DisplayDevice.h b/services/surfaceflinger/DisplayDevice.h index e1c2d11..96590a0 100644 --- a/services/surfaceflinger/DisplayDevice.h +++ b/services/surfaceflinger/DisplayDevice.h @@ -49,10 +49,17 @@ public: Region undefinedRegion; enum { + DISPLAY_ID_MAIN = 0, + DISPLAY_ID_HDMI = 1 + }; + + enum { PARTIAL_UPDATES = 0x00020000, // video driver feature SWAP_RECTANGLE = 0x00080000, }; + DisplayDevice(); + DisplayDevice( const sp<SurfaceFlinger>& flinger, int dpy, @@ -61,6 +68,14 @@ public: ~DisplayDevice(); + // must be called when this object is no longer needed. this will + // render the associated EGLSurface invalid. + void terminate(); + + // whether this is a valid object. An invalid DisplayDevice is returned + // when an non existing id is requested + bool isValid() const; + // Flip the front and back buffers if the back buffer is "dirty". Might // be instantaneous, might involve copying the frame buffer around. void flip(const Region& dirty) const; @@ -110,6 +125,9 @@ public: uint32_t getPageFlipCount() const; void dump(String8& res) const; + inline bool operator < (const DisplayDevice& rhs) const { + return mId < rhs.mId; + } private: void init(EGLConfig config); @@ -118,7 +136,7 @@ private: * Constants, set during initialization */ sp<SurfaceFlinger> mFlinger; - int mDisplayId; + int32_t mId; // ANativeWindow this display is rendering into sp<SurfaceTextureClient> mNativeWindow; |