summaryrefslogtreecommitdiff
path: root/include/gui/SurfaceComposerClient.h
diff options
context:
space:
mode:
author Jeff Brown <jeffbrown@google.com> 2012-08-24 20:00:51 -0700
committer Jeff Brown <jeffbrown@google.com> 2012-08-27 14:40:17 -0700
commit9d4e3d2f42e93e2d12bacabe97d307d30c3c20dd (patch)
tree3db010ef45a3793c5b09887ae321b4a8095a5001 /include/gui/SurfaceComposerClient.h
parent225c66a48cdc3acef21ee380dc134449749d3cb3 (diff)
Banish DisplayID from the SurfaceFlinger API.
Use only display tokens in the API to refer to new displays. Don't require the caller to specify the display when creating a surface (since in general a surface could be shown on any display). This is intended to be a minimum change just to update the API. Note that SurfaceFlinger still uses DisplayID in a few places internally that might cause some features not to work properly when there are multiple displays (LayerScreenshot, for example). Change-Id: I3d91eec2da406eefd97bcd53655d403ad865a7e6
Diffstat (limited to 'include/gui/SurfaceComposerClient.h')
-rw-r--r--include/gui/SurfaceComposerClient.h28
1 files changed, 12 insertions, 16 deletions
diff --git a/include/gui/SurfaceComposerClient.h b/include/gui/SurfaceComposerClient.h
index 5776038c79..15a0c1eec8 100644
--- a/include/gui/SurfaceComposerClient.h
+++ b/include/gui/SurfaceComposerClient.h
@@ -39,6 +39,7 @@ class DisplayInfo;
class Composer;
class IMemoryHeap;
class ISurfaceComposerClient;
+class ISurfaceTexture;
class Region;
// ---------------------------------------------------------------------------
@@ -64,7 +65,7 @@ public:
void* cookie = NULL, uint32_t flags = 0);
// Get information about a display
- static status_t getDisplayInfo(DisplayID dpy, DisplayInfo* info);
+ static status_t getDisplayInfo(const sp<IBinder>& display, DisplayInfo* info);
// ------------------------------------------------------------------------
// surface creation / destruction
@@ -72,23 +73,19 @@ public:
//! Create a surface
sp<SurfaceControl> createSurface(
const String8& name,// name of the surface
- DisplayID display, // Display to create this surface on
- uint32_t w, // width in pixel
- uint32_t h, // height in pixel
- PixelFormat format, // pixel-format desired
- uint32_t flags = 0 // usage flags
- );
-
- sp<SurfaceControl> createSurface(
- DisplayID display, // Display to create this surface on
uint32_t w, // width in pixel
uint32_t h, // height in pixel
PixelFormat format, // pixel-format desired
uint32_t flags = 0 // usage flags
);
+ //! Create a display
static sp<IBinder> createDisplay();
+ //! Get the token for the existing default displays.
+ //! Possible values for id are eDisplayIdMain and eDisplayIdHdmi.
+ static sp<IBinder> getBuiltInDisplay(int32_t id);
+
// ------------------------------------------------------------------------
// Composer parameters
// All composer parameters must be changed within a transaction
@@ -102,9 +99,6 @@ public:
//! Close a composer transaction on all active SurfaceComposerClients.
static void closeGlobalTransaction(bool synchronous = false);
- //! Set the orientation of the given display
- static int setOrientation(DisplayID dpy, int orientation, uint32_t flags);
-
status_t hide(SurfaceID id);
status_t show(SurfaceID id, int32_t layer = -1);
status_t setFlags(SurfaceID id, uint32_t flags, uint32_t mask);
@@ -150,9 +144,11 @@ public:
ScreenshotClient();
// frees the previous screenshot and capture a new one
- status_t update();
- status_t update(uint32_t reqWidth, uint32_t reqHeight);
- status_t update(uint32_t reqWidth, uint32_t reqHeight,
+ status_t update(const sp<IBinder>& display);
+ status_t update(const sp<IBinder>& display,
+ uint32_t reqWidth, uint32_t reqHeight);
+ status_t update(const sp<IBinder>& display,
+ uint32_t reqWidth, uint32_t reqHeight,
uint32_t minLayerZ, uint32_t maxLayerZ);
// release memory occupied by the screenshot