blob: 3ecaa7f954aac4761dc376e1d996348e7a0fe53e [file] [log] [blame]
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -08001/*
2 * Copyright (C) 2007 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef ANDROID_SURFACE_FLINGER_H
18#define ANDROID_SURFACE_FLINGER_H
19
20#include <stdint.h>
21#include <sys/types.h>
22
Mathias Agopian921e6ac2012-07-23 23:11:29 -070023#include <EGL/egl.h>
24#include <GLES/gl.h>
25
Glenn Kasten99ed2242011-12-15 09:51:17 -080026#include <cutils/compiler.h>
27
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080028#include <utils/Atomic.h>
29#include <utils/Errors.h>
Mathias Agopian99b49842011-06-27 16:05:52 -070030#include <utils/KeyedVector.h>
Mathias Agopian076b1cc2009-04-10 14:24:30 -070031#include <utils/RefBase.h>
Mathias Agopian99b49842011-06-27 16:05:52 -070032#include <utils/SortedVector.h>
33#include <utils/threads.h>
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080034
Mathias Agopiana1e6bc82010-07-14 18:41:18 -070035#include <binder/BinderService.h>
Mathias Agopian99b49842011-06-27 16:05:52 -070036#include <binder/IMemory.h>
Mathias Agopian375f5632009-06-15 18:24:59 -070037
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080038#include <ui/PixelFormat.h>
Mathias Agopian921e6ac2012-07-23 23:11:29 -070039
Mathias Agopian90ac7992012-02-25 18:48:35 -080040#include <gui/IGraphicBufferAlloc.h>
41#include <gui/ISurfaceComposer.h>
42#include <gui/ISurfaceComposerClient.h>
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080043
Mathias Agopian921e6ac2012-07-23 23:11:29 -070044#include <private/gui/LayerState.h>
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080045
Mathias Agopian921e6ac2012-07-23 23:11:29 -070046#include "Barrier.h"
Mathias Agopianf1d8e872009-04-20 19:39:12 -070047#include "MessageQueue.h"
48
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080049namespace android {
50
51// ---------------------------------------------------------------------------
52
53class Client;
Mathias Agopiand0566bc2011-11-17 17:49:17 -080054class DisplayEventConnection;
Mathias Agopian921e6ac2012-07-23 23:11:29 -070055class DisplayHardware;
Mathias Agopiand0566bc2011-11-17 17:49:17 -080056class EventThread;
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080057class Layer;
Mathias Agopian921e6ac2012-07-23 23:11:29 -070058class LayerBase;
59class LayerBaseClient;
Mathias Agopianb7e930d2010-06-01 15:12:58 -070060class LayerDim;
Mathias Agopian118d0242011-10-13 16:02:48 -070061class LayerScreenshot;
Mathias Agopian921e6ac2012-07-23 23:11:29 -070062class SurfaceTextureClient;
Mathias Agopiana67932f2011-04-20 14:20:59 -070063struct surface_flinger_cblk_t;
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080064
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080065// ---------------------------------------------------------------------------
66
Mathias Agopian921e6ac2012-07-23 23:11:29 -070067class GraphicBufferAlloc : public BnGraphicBufferAlloc {
Jamie Gennis9a78c902011-01-12 18:30:40 -080068public:
69 GraphicBufferAlloc();
70 virtual ~GraphicBufferAlloc();
Jamie Gennis9a78c902011-01-12 18:30:40 -080071 virtual sp<GraphicBuffer> createGraphicBuffer(uint32_t w, uint32_t h,
Mathias Agopiand9e8c642011-07-01 14:53:49 -070072 PixelFormat format, uint32_t usage, status_t* error);
Jamie Gennis9a78c902011-01-12 18:30:40 -080073};
74
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080075// ---------------------------------------------------------------------------
76
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080077enum {
Mathias Agopian921e6ac2012-07-23 23:11:29 -070078 eTransactionNeeded = 0x01, eTraversalNeeded = 0x02
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080079};
80
Mathias Agopian921e6ac2012-07-23 23:11:29 -070081class SurfaceFlinger : public BinderService<SurfaceFlinger>,
82 public BnSurfaceComposer,
83 private IBinder::DeathRecipient,
84 private Thread
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080085{
86public:
Mathias Agopian921e6ac2012-07-23 23:11:29 -070087 static char const* getServiceName() {
88 return "SurfaceFlinger";
89 }
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080090
Mathias Agopian921e6ac2012-07-23 23:11:29 -070091 SurfaceFlinger();
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080092
Mathias Agopian921e6ac2012-07-23 23:11:29 -070093 // post an asynchronous message to the main thread
94 status_t postMessageAsync(const sp<MessageBase>& msg, nsecs_t reltime = 0,
95 uint32_t flags = 0);
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080096
Mathias Agopian921e6ac2012-07-23 23:11:29 -070097 // post a synchronous message to the main thread
98 status_t postMessageSync(const sp<MessageBase>& msg, nsecs_t reltime = 0,
99 uint32_t flags = 0);
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800100
Mathias Agopian921e6ac2012-07-23 23:11:29 -0700101 // force full composition on all displays
102 void repaintEverything();
Mathias Agopianbf2c6a62010-12-10 16:22:31 -0800103
Mathias Agopian921e6ac2012-07-23 23:11:29 -0700104 // renders content on given display to a texture. thread-safe version.
105 status_t renderScreenToTexture(DisplayID dpy, GLuint* textureName,
106 GLfloat* uOut, GLfloat* vOut);
Mathias Agopianbf2c6a62010-12-10 16:22:31 -0800107
Mathias Agopian921e6ac2012-07-23 23:11:29 -0700108 // renders content on given display to a texture, w/o acquiring main lock
109 status_t renderScreenToTextureLocked(DisplayID dpy, GLuint* textureName,
110 GLfloat* uOut, GLfloat* vOut);
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800111
Mathias Agopian921e6ac2012-07-23 23:11:29 -0700112 // returns the default Display
113 const DisplayHardware& getDefaultDisplayHardware() const {
114 return getDisplayHardware(0);
115 }
Mathias Agopianb60314a2012-04-10 22:09:54 -0700116
Mathias Agopian921e6ac2012-07-23 23:11:29 -0700117 // called on the main thread by MessageQueue when an internal message
118 // is received
119 // TODO: this should be made accessible only to MessageQueue
120 void onMessageReceived(int32_t what);
Mathias Agopian3094df32012-06-18 18:06:45 -0700121
Mathias Agopian921e6ac2012-07-23 23:11:29 -0700122 // utility function to delete a texture on the main thread
123 void deleteTextureAsync(GLuint texture);
Mathias Agopian1f339ff2011-07-01 17:08:43 -0700124
125private:
Mathias Agopian96f08192010-06-02 23:28:45 -0700126 friend class Client;
Mathias Agopiand0566bc2011-11-17 17:49:17 -0800127 friend class DisplayEventConnection;
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800128 friend class LayerBase;
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800129 friend class LayerBaseClient;
130 friend class Layer;
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800131
Mathias Agopian921e6ac2012-07-23 23:11:29 -0700132 // We're reference counted, never destroy SurfaceFlinger directly
133 virtual ~SurfaceFlinger();
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800134
Mathias Agopian921e6ac2012-07-23 23:11:29 -0700135 /* ------------------------------------------------------------------------
136 * Internal data structures
137 */
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800138
Mathias Agopian921e6ac2012-07-23 23:11:29 -0700139 class LayerVector : public SortedVector<sp<LayerBase> > {
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800140 public:
Mathias Agopian921e6ac2012-07-23 23:11:29 -0700141 LayerVector();
142 LayerVector(const LayerVector& rhs);
143 virtual int do_compare(const void* lhs, const void* rhs) const;
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800144 };
145
146 struct State {
Mathias Agopian921e6ac2012-07-23 23:11:29 -0700147 State();
148 LayerVector layersSortedByZ;
149 uint8_t orientation;
150 uint8_t orientationFlags;
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800151 };
152
Mathias Agopian921e6ac2012-07-23 23:11:29 -0700153 /* ------------------------------------------------------------------------
154 * IBinder interface
155 */
156 virtual status_t onTransact(uint32_t code, const Parcel& data,
157 Parcel* reply, uint32_t flags);
158 virtual status_t dump(int fd, const Vector<String16>& args);
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800159
Mathias Agopian921e6ac2012-07-23 23:11:29 -0700160 /* ------------------------------------------------------------------------
161 * ISurfaceComposer interface
162 */
163 virtual sp<ISurfaceComposerClient> createConnection();
164 virtual sp<IGraphicBufferAlloc> createGraphicBufferAlloc();
165 virtual sp<IMemoryHeap> getCblk() const;
166 virtual void bootFinished();
167 virtual void setTransactionState(const Vector<ComposerState>& state,
Mathias Agopian8b33f032012-07-24 20:43:54 -0700168 const Vector<DisplayState>& displays, uint32_t flags);
Mathias Agopian921e6ac2012-07-23 23:11:29 -0700169 virtual bool authenticateSurfaceTexture(
170 const sp<ISurfaceTexture>& surface) const;
171 virtual sp<IDisplayEventConnection> createDisplayEventConnection();
172 virtual status_t captureScreen(DisplayID dpy, sp<IMemoryHeap>* heap,
173 uint32_t* width, uint32_t* height, PixelFormat* format,
174 uint32_t reqWidth, uint32_t reqHeight, uint32_t minLayerZ,
175 uint32_t maxLayerZ);
176 virtual status_t turnElectronBeamOff(int32_t mode);
177 virtual status_t turnElectronBeamOn(int32_t mode);
178 // called when screen needs to turn off
179 virtual void blank();
180 // called when screen is turning back on
181 virtual void unblank();
182 virtual void connectDisplay(const sp<ISurfaceTexture> display);
Mathias Agopian1b031492012-06-20 17:51:20 -0700183
Mathias Agopian921e6ac2012-07-23 23:11:29 -0700184 /* ------------------------------------------------------------------------
185 * DeathRecipient interface
186 */
187 virtual void binderDied(const wp<IBinder>& who);
Mathias Agopian99ce5cd2012-01-31 18:24:27 -0800188
Mathias Agopian921e6ac2012-07-23 23:11:29 -0700189 /* ------------------------------------------------------------------------
190 * Thread interface
191 */
192 virtual bool threadLoop();
193 virtual status_t readyToRun();
194 virtual void onFirstRef();
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800195
Mathias Agopian921e6ac2012-07-23 23:11:29 -0700196 /* ------------------------------------------------------------------------
197 * Message handling
198 */
199 void waitForEvent();
200 void signalTransaction();
201 void signalLayerUpdate();
202 void signalRefresh();
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800203
Mathias Agopian921e6ac2012-07-23 23:11:29 -0700204 // called on the main thread in response to screenReleased()
205 void onScreenReleased();
206 // called on the main thread in response to screenAcquired()
207 void onScreenAcquired();
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800208
Mathias Agopian921e6ac2012-07-23 23:11:29 -0700209 void handleMessageTransaction();
210 void handleMessageInvalidate();
211 void handleMessageRefresh();
Mathias Agopian4fec8732012-06-29 14:12:52 -0700212
Mathias Agopian921e6ac2012-07-23 23:11:29 -0700213 Region handleTransaction(uint32_t transactionFlags);
214 Region handleTransactionLocked(uint32_t transactionFlags);
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800215
Mathias Agopian921e6ac2012-07-23 23:11:29 -0700216 /* handlePageFilp: this is were we latch a new buffer
217 * if available and compute the dirty region.
218 * The return value is the dirty region expressed in the
219 * window manager's coordinate space (or the layer's state
220 * space, which is the same thing), in particular the dirty
221 * region is independent from a specific display's orientation.
222 */
223 Region handlePageFlip();
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800224
Mathias Agopian921e6ac2012-07-23 23:11:29 -0700225 void handleRefresh();
226 void handleWorkList(const DisplayHardware& hw);
227 void handleRepaint(const DisplayHardware& hw);
Mathias Agopian0dfb7b72011-10-21 15:18:28 -0700228
Mathias Agopian921e6ac2012-07-23 23:11:29 -0700229 /* ------------------------------------------------------------------------
230 * Transactions
231 */
232 uint32_t getTransactionFlags(uint32_t flags);
233 uint32_t peekTransactionFlags(uint32_t flags);
234 uint32_t setTransactionFlags(uint32_t flags);
235 void commitTransaction();
236 uint32_t setClientStateLocked(const sp<Client>& client,
237 const layer_state_t& s);
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800238
Mathias Agopian921e6ac2012-07-23 23:11:29 -0700239 /* ------------------------------------------------------------------------
240 * Layer management
241 */
242 sp<ISurface> createLayer(ISurfaceComposerClient::surface_data_t* params,
243 const String8& name, const sp<Client>& client, DisplayID display,
244 uint32_t w, uint32_t h, PixelFormat format, uint32_t flags);
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800245
Mathias Agopian921e6ac2012-07-23 23:11:29 -0700246 sp<Layer> createNormalLayer(const sp<Client>& client, DisplayID display,
247 uint32_t w, uint32_t h, uint32_t flags, PixelFormat& format);
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800248
Mathias Agopian921e6ac2012-07-23 23:11:29 -0700249 sp<LayerDim> createDimLayer(const sp<Client>& client, DisplayID display,
250 uint32_t w, uint32_t h, uint32_t flags);
Mathias Agopian74c40c02010-09-29 13:02:36 -0700251
Mathias Agopian921e6ac2012-07-23 23:11:29 -0700252 sp<LayerScreenshot> createScreenshotLayer(const sp<Client>& client,
253 DisplayID display, uint32_t w, uint32_t h, uint32_t flags);
Mathias Agopian59119e62010-10-11 12:37:43 -0700254
Mathias Agopian921e6ac2012-07-23 23:11:29 -0700255 // called in response to the window-manager calling
256 // ISurfaceComposerClient::destroySurface()
257 // The specified layer is first placed in a purgatory list
258 // until all references from the client are released.
259 status_t onLayerRemoved(const sp<Client>& client, SurfaceID sid);
Mathias Agopianb9494d52012-04-18 02:28:45 -0700260
Mathias Agopian921e6ac2012-07-23 23:11:29 -0700261 // called when all clients have released all their references to
262 // this layer meaning it is entirely safe to destroy all
263 // resources associated to this layer.
264 status_t onLayerDestroyed(const wp<LayerBaseClient>& layer);
Mathias Agopiana4912602012-07-12 14:25:33 -0700265
Mathias Agopian921e6ac2012-07-23 23:11:29 -0700266 // remove a layer from SurfaceFlinger immediately
267 status_t removeLayer(const sp<LayerBase>& layer);
Mathias Agopiana4912602012-07-12 14:25:33 -0700268
Mathias Agopian921e6ac2012-07-23 23:11:29 -0700269 // add a layer to SurfaceFlinger
270 ssize_t addClientLayer(const sp<Client>& client,
271 const sp<LayerBaseClient>& lbc);
Mathias Agopiana67e4182012-06-19 17:26:12 -0700272
Mathias Agopian921e6ac2012-07-23 23:11:29 -0700273 status_t removeLayer_l(const sp<LayerBase>& layer);
274 status_t purgatorizeLayer_l(const sp<LayerBase>& layer);
Mathias Agopianf1d8e872009-04-20 19:39:12 -0700275
Mathias Agopian921e6ac2012-07-23 23:11:29 -0700276 /* ------------------------------------------------------------------------
277 * Boot animation, on/off animations and screen capture
278 */
Mathias Agopianbb641242010-05-18 17:06:55 -0700279
Mathias Agopian921e6ac2012-07-23 23:11:29 -0700280 void startBootAnim();
Mathias Agopian96f08192010-06-02 23:28:45 -0700281
Mathias Agopian921e6ac2012-07-23 23:11:29 -0700282 status_t captureScreenImplLocked(DisplayID dpy, sp<IMemoryHeap>* heap,
283 uint32_t* width, uint32_t* height, PixelFormat* format,
284 uint32_t reqWidth, uint32_t reqHeight, uint32_t minLayerZ,
285 uint32_t maxLayerZ);
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800286
Mathias Agopian921e6ac2012-07-23 23:11:29 -0700287 status_t turnElectronBeamOffImplLocked(int32_t mode);
288 status_t turnElectronBeamOnImplLocked(int32_t mode);
289 status_t electronBeamOffAnimationImplLocked();
290 status_t electronBeamOnAnimationImplLocked();
Mathias Agopian0dfb7b72011-10-21 15:18:28 -0700291
Mathias Agopian921e6ac2012-07-23 23:11:29 -0700292 /* ------------------------------------------------------------------------
293 * EGL
294 */
295 static status_t selectConfigForPixelFormat(EGLDisplay dpy,
296 EGLint const* attrs, PixelFormat format, EGLConfig* outConfig);
297 static EGLConfig selectEGLConfig(EGLDisplay disp, EGLint visualId);
298 static EGLContext createGLContext(EGLDisplay disp, EGLConfig config);
299 void initializeGL(EGLDisplay display, EGLSurface surface);
300 uint32_t getMaxTextureSize() const;
301 uint32_t getMaxViewportDims() const;
Mathias Agopiana4912602012-07-12 14:25:33 -0700302
Mathias Agopian921e6ac2012-07-23 23:11:29 -0700303 /* ------------------------------------------------------------------------
304 * Display management
305 */
306 const DisplayHardware& getDisplayHardware(DisplayID dpy) const {
307 return *mDisplayHardwares[dpy];
308 }
Mathias Agopian99b49842011-06-27 16:05:52 -0700309
Mathias Agopian921e6ac2012-07-23 23:11:29 -0700310 /* ------------------------------------------------------------------------
311 * Compositing
312 */
313 void invalidateHwcGeometry();
314 void computeVisibleRegions(const LayerVector& currentLayers,
315 Region& dirtyRegion, Region& wormholeRegion);
316 void postFramebuffer();
317 void setupHardwareComposer(const DisplayHardware& hw);
318 void composeSurfaces(const DisplayHardware& hw, const Region& dirty);
319 void setInvalidateRegion(const Region& reg);
320 Region getAndClearInvalidateRegion();
321 void drawWormhole() const;
322 GLuint getProtectedTexName() const {
323 return mProtectedTexName;
324 }
Mathias Agopian4da75192010-08-10 17:19:56 -0700325
Mathias Agopian921e6ac2012-07-23 23:11:29 -0700326 /* ------------------------------------------------------------------------
327 * Debugging & dumpsys
328 */
329 void debugFlashRegions(const DisplayHardware& hw);
330 void listLayersLocked(const Vector<String16>& args, size_t& index,
331 String8& result, char* buffer, size_t SIZE) const;
332 void dumpStatsLocked(const Vector<String16>& args, size_t& index,
333 String8& result, char* buffer, size_t SIZE) const;
334 void clearStatsLocked(const Vector<String16>& args, size_t& index,
335 String8& result, char* buffer, size_t SIZE) const;
336 void dumpAllLocked(String8& result, char* buffer, size_t SIZE) const;
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800337
Mathias Agopian921e6ac2012-07-23 23:11:29 -0700338 /* ------------------------------------------------------------------------
339 * Attributes
340 */
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800341
Mathias Agopian921e6ac2012-07-23 23:11:29 -0700342 // access must be protected by mStateLock
343 mutable Mutex mStateLock;
344 State mCurrentState;
345 volatile int32_t mTransactionFlags;
346 Condition mTransactionCV;
347 SortedVector<sp<LayerBase> > mLayerPurgatory;
348 bool mTransationPending;
349 Vector<sp<LayerBase> > mLayersPendingRemoval;
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800350
Mathias Agopian921e6ac2012-07-23 23:11:29 -0700351 // protected by mStateLock (but we could use another lock)
352 DisplayHardware* mDisplayHardwares[1];
353 bool mLayersRemoved;
Mathias Agopianca4d3602011-05-19 15:38:14 -0700354
Mathias Agopian921e6ac2012-07-23 23:11:29 -0700355 // access must be protected by mInvalidateLock
356 mutable Mutex mInvalidateLock;
357 Region mInvalidateRegion;
Mathias Agopianca4d3602011-05-19 15:38:14 -0700358
Mathias Agopian921e6ac2012-07-23 23:11:29 -0700359 // constant members (no synchronization needed for access)
360 sp<IMemoryHeap> mServerHeap;
361 surface_flinger_cblk_t* mServerCblk;
362 GLuint mWormholeTexName;
363 GLuint mProtectedTexName;
364 nsecs_t mBootTime;
365 sp<EventThread> mEventThread;
366 GLint mMaxViewportDims[2];
367 GLint mMaxTextureSize;
368 EGLContext mEGLContext;
369 EGLConfig mEGLConfig;
Mathias Agopian3094df32012-06-18 18:06:45 -0700370
Mathias Agopian921e6ac2012-07-23 23:11:29 -0700371 // Can only accessed from the main thread, these members
372 // don't need synchronization
373 State mDrawingState;
374 Region mDirtyRegion;
375 Region mDirtyRegionRemovedLayer;
376 Region mSwapRegion;
377 Region mWormholeRegion;
378 bool mVisibleRegionsDirty;
379 bool mHwWorkListDirty;
380 int32_t mElectronBeamAnimationMode;
381
382 // don't use a lock for these, we don't care
383 int mDebugRegion;
384 int mDebugDDMS;
385 int mDebugDisableHWC;
386 int mDebugDisableTransformHint;
387 volatile nsecs_t mDebugInSwapBuffers;
388 nsecs_t mLastSwapBufferTime;
389 volatile nsecs_t mDebugInTransaction;
390 nsecs_t mLastTransactionTime;
391 bool mBootFinished;
392
393 // these are thread safe
394 mutable MessageQueue mEventQueue;
395 mutable Barrier mReadyToRunBarrier;
396
397 // protected by mDestroyedLayerLock;
398 mutable Mutex mDestroyedLayerLock;
399 Vector<LayerBase const *> mDestroyedLayers;
400
401 /* ------------------------------------------------------------------------
402 * Feature prototyping
403 */
404
405 EGLSurface getExternalDisplaySurface() const;
406 sp<SurfaceTextureClient> mExternalDisplayNativeWindow;
407 EGLSurface mExternalDisplaySurface;
408public:
409 surface_flinger_cblk_t* getControlBlock() const;
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800410};
411
412// ---------------------------------------------------------------------------
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800413}; // namespace android
414
415#endif // ANDROID_SURFACE_FLINGER_H