diff options
| author | 2012-08-24 20:00:51 -0700 | |
|---|---|---|
| committer | 2012-08-27 14:40:17 -0700 | |
| commit | 9d4e3d2f42e93e2d12bacabe97d307d30c3c20dd (patch) | |
| tree | 3db010ef45a3793c5b09887ae321b4a8095a5001 /services/surfaceflinger/Client.cpp | |
| parent | 225c66a48cdc3acef21ee380dc134449749d3cb3 (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 'services/surfaceflinger/Client.cpp')
| -rw-r--r-- | services/surfaceflinger/Client.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/services/surfaceflinger/Client.cpp b/services/surfaceflinger/Client.cpp index d5d551efa0..b0f23305e3 100644 --- a/services/surfaceflinger/Client.cpp +++ b/services/surfaceflinger/Client.cpp @@ -111,7 +111,7 @@ status_t Client::onTransact( sp<ISurface> Client::createSurface( ISurfaceComposerClient::surface_data_t* params, const String8& name, - DisplayID display, uint32_t w, uint32_t h, PixelFormat format, + uint32_t w, uint32_t h, PixelFormat format, uint32_t flags) { /* @@ -125,7 +125,6 @@ sp<ISurface> Client::createSurface( ISurfaceComposerClient::surface_data_t* params; Client* client; const String8& name; - DisplayID display; uint32_t w, h; PixelFormat format; uint32_t flags; @@ -133,22 +132,23 @@ sp<ISurface> Client::createSurface( MessageCreateLayer(SurfaceFlinger* flinger, ISurfaceComposerClient::surface_data_t* params, const String8& name, Client* client, - DisplayID display, uint32_t w, uint32_t h, PixelFormat format, + uint32_t w, uint32_t h, PixelFormat format, uint32_t flags) : flinger(flinger), params(params), client(client), name(name), - display(display), w(w), h(h), format(format), flags(flags) + w(w), h(h), format(format), flags(flags) { } sp<ISurface> getResult() const { return result; } virtual bool handler() { + // TODO don't require display id to create a layer result = flinger->createLayer(params, name, client, - display, w, h, format, flags); + ISurfaceComposer::eDisplayIdMain, w, h, format, flags); return true; } }; sp<MessageBase> msg = new MessageCreateLayer(mFlinger.get(), - params, name, this, display, w, h, format, flags); + params, name, this, w, h, format, flags); mFlinger->postMessageSync(msg); return static_cast<MessageCreateLayer*>( msg.get() )->getResult(); } |