The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1 | /* |
| 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_LAYER_BASE_H |
| 18 | #define ANDROID_LAYER_BASE_H |
| 19 | |
| 20 | #include <stdint.h> |
| 21 | #include <sys/types.h> |
| 22 | |
Mathias Agopian | 1fed11c | 2009-06-23 18:08:22 -0700 | [diff] [blame] | 23 | #include <EGL/egl.h> |
| 24 | #include <EGL/eglext.h> |
| 25 | |
Mathias Agopian | 076b1cc | 2009-04-10 14:24:30 -0700 | [diff] [blame] | 26 | #include <utils/RefBase.h> |
| 27 | |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 28 | #include <ui/Region.h> |
| 29 | #include <ui/Overlay.h> |
| 30 | |
Mathias Agopian | 9cce325 | 2010-02-09 17:46:37 -0800 | [diff] [blame^] | 31 | #include <surfaceflinger/ISurfaceFlingerClient.h> |
| 32 | #include <private/surfaceflinger/SharedBufferStack.h> |
| 33 | #include <private/surfaceflinger/LayerState.h> |
| 34 | |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 35 | #include <pixelflinger/pixelflinger.h> |
| 36 | |
| 37 | #include "Transform.h" |
| 38 | |
| 39 | namespace android { |
| 40 | |
| 41 | // --------------------------------------------------------------------------- |
| 42 | |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 43 | class DisplayHardware; |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 44 | class Client; |
Mathias Agopian | 3330b20 | 2009-10-05 17:07:12 -0700 | [diff] [blame] | 45 | class GraphicBuffer; |
| 46 | class GraphicPlane; |
| 47 | class SurfaceFlinger; |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 48 | |
| 49 | // --------------------------------------------------------------------------- |
| 50 | |
Mathias Agopian | 076b1cc | 2009-04-10 14:24:30 -0700 | [diff] [blame] | 51 | class LayerBase : public RefBase |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 52 | { |
| 53 | // poor man's dynamic_cast below |
| 54 | template<typename T> |
| 55 | struct getTypeInfoOfAnyType { |
| 56 | static uint32_t get() { return T::typeInfo; } |
| 57 | }; |
| 58 | |
| 59 | template<typename T> |
| 60 | struct getTypeInfoOfAnyType<T*> { |
| 61 | static uint32_t get() { return getTypeInfoOfAnyType<T>::get(); } |
| 62 | }; |
| 63 | |
| 64 | public: |
| 65 | static const uint32_t typeInfo; |
| 66 | static const char* const typeID; |
| 67 | virtual char const* getTypeID() const { return typeID; } |
| 68 | virtual uint32_t getTypeInfo() const { return typeInfo; } |
| 69 | |
| 70 | template<typename T> |
| 71 | static T dynamicCast(LayerBase* base) { |
| 72 | uint32_t mostDerivedInfo = base->getTypeInfo(); |
| 73 | uint32_t castToInfo = getTypeInfoOfAnyType<T>::get(); |
| 74 | if ((mostDerivedInfo & castToInfo) == castToInfo) |
| 75 | return static_cast<T>(base); |
| 76 | return 0; |
| 77 | } |
| 78 | |
| 79 | |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 80 | LayerBase(SurfaceFlinger* flinger, DisplayID display); |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 81 | |
| 82 | DisplayID dpy; |
| 83 | mutable bool contentDirty; |
| 84 | Region visibleRegionScreen; |
| 85 | Region transparentRegionScreen; |
| 86 | Region coveredRegionScreen; |
| 87 | |
| 88 | struct State { |
| 89 | uint32_t w; |
| 90 | uint32_t h; |
Mathias Agopian | 7e4a587 | 2009-09-29 22:39:22 -0700 | [diff] [blame] | 91 | uint32_t requested_w; |
| 92 | uint32_t requested_h; |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 93 | uint32_t z; |
| 94 | uint8_t alpha; |
| 95 | uint8_t flags; |
| 96 | uint8_t reserved[2]; |
| 97 | int32_t sequence; // changes when visible regions can change |
| 98 | uint32_t tint; |
| 99 | Transform transform; |
| 100 | Region transparentRegion; |
| 101 | }; |
| 102 | |
| 103 | // modify current state |
| 104 | bool setPosition(int32_t x, int32_t y); |
| 105 | bool setLayer(uint32_t z); |
| 106 | bool setSize(uint32_t w, uint32_t h); |
| 107 | bool setAlpha(uint8_t alpha); |
| 108 | bool setMatrix(const layer_state_t::matrix22_t& matrix); |
| 109 | bool setTransparentRegionHint(const Region& opaque); |
| 110 | bool setFlags(uint8_t flags, uint8_t mask); |
| 111 | |
Mathias Agopian | ba6be54 | 2009-09-29 22:32:36 -0700 | [diff] [blame] | 112 | void commitTransaction(); |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 113 | bool requestTransaction(); |
| 114 | void forceVisibilityTransaction(); |
| 115 | |
| 116 | uint32_t getTransactionFlags(uint32_t flags); |
| 117 | uint32_t setTransactionFlags(uint32_t flags); |
| 118 | |
| 119 | Rect visibleBounds() const; |
| 120 | void drawRegion(const Region& reg) const; |
| 121 | |
| 122 | void invalidate(); |
| 123 | |
| 124 | /** |
| 125 | * draw - performs some global clipping optimizations |
| 126 | * and calls onDraw(). |
| 127 | * Typically this method is not overridden, instead implement onDraw() |
| 128 | * to perform the actual drawing. |
| 129 | */ |
| 130 | virtual void draw(const Region& clip) const; |
| 131 | |
| 132 | /** |
| 133 | * onDraw - draws the surface. |
| 134 | */ |
| 135 | virtual void onDraw(const Region& clip) const = 0; |
| 136 | |
| 137 | /** |
| 138 | * initStates - called just after construction |
| 139 | */ |
| 140 | virtual void initStates(uint32_t w, uint32_t h, uint32_t flags); |
| 141 | |
| 142 | /** |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 143 | * doTransaction - process the transaction. This is a good place to figure |
| 144 | * out which attributes of the surface have changed. |
| 145 | */ |
| 146 | virtual uint32_t doTransaction(uint32_t transactionFlags); |
| 147 | |
| 148 | /** |
| 149 | * setVisibleRegion - called to set the new visible region. This gives |
| 150 | * a chance to update the new visible region or record the fact it changed. |
| 151 | */ |
| 152 | virtual void setVisibleRegion(const Region& visibleRegion); |
| 153 | |
| 154 | /** |
| 155 | * setCoveredRegion - called when the covered region changes. The covered |
| 156 | * region correspond to any area of the surface that is covered |
| 157 | * (transparently or not) by another surface. |
| 158 | */ |
| 159 | virtual void setCoveredRegion(const Region& coveredRegion); |
| 160 | |
| 161 | /** |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 162 | * validateVisibility - cache a bunch of things |
| 163 | */ |
| 164 | virtual void validateVisibility(const Transform& globalTransform); |
| 165 | |
| 166 | /** |
| 167 | * lockPageFlip - called each time the screen is redrawn and returns whether |
| 168 | * the visible regions need to be recomputed (this is a fairly heavy |
| 169 | * operation, so this should be set only if needed). Typically this is used |
| 170 | * to figure out if the content or size of a surface has changed. |
| 171 | */ |
| 172 | virtual void lockPageFlip(bool& recomputeVisibleRegions); |
| 173 | |
| 174 | /** |
| 175 | * unlockPageFlip - called each time the screen is redrawn. updates the |
| 176 | * final dirty region wrt the planeTransform. |
| 177 | * At this point, all visible regions, surface position and size, etc... are |
| 178 | * correct. |
| 179 | */ |
| 180 | virtual void unlockPageFlip(const Transform& planeTransform, Region& outDirtyRegion); |
| 181 | |
| 182 | /** |
| 183 | * finishPageFlip - called after all surfaces have drawn. |
| 184 | */ |
| 185 | virtual void finishPageFlip(); |
| 186 | |
| 187 | /** |
| 188 | * needsBlending - true if this surface needs blending |
| 189 | */ |
| 190 | virtual bool needsBlending() const { return false; } |
| 191 | |
| 192 | /** |
Mathias Agopian | 401c257 | 2009-09-23 19:16:27 -0700 | [diff] [blame] | 193 | * needsDithering - true if this surface needs dithering |
| 194 | */ |
| 195 | virtual bool needsDithering() const { return false; } |
| 196 | |
| 197 | /** |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 198 | * transformed -- true is this surface needs a to be transformed |
| 199 | */ |
| 200 | virtual bool transformed() const { return mTransformed; } |
| 201 | |
| 202 | /** |
| 203 | * isSecure - true if this surface is secure, that is if it prevents |
Mathias Agopian | 9a11206 | 2009-04-17 19:36:26 -0700 | [diff] [blame] | 204 | * screenshots or VNC servers. |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 205 | */ |
| 206 | virtual bool isSecure() const { return false; } |
| 207 | |
Mathias Agopian | 0b3ad46 | 2009-10-02 18:12:30 -0700 | [diff] [blame] | 208 | /** Called from the main thread, when the surface is removed from the |
| 209 | * draw list */ |
Mathias Agopian | 9a11206 | 2009-04-17 19:36:26 -0700 | [diff] [blame] | 210 | virtual status_t ditch() { return NO_ERROR; } |
| 211 | |
Mathias Agopian | 0b3ad46 | 2009-10-02 18:12:30 -0700 | [diff] [blame] | 212 | /** called with the state lock when the surface is removed from the |
| 213 | * current list */ |
| 214 | virtual void onRemoved() { }; |
Mathias Agopian | 9a11206 | 2009-04-17 19:36:26 -0700 | [diff] [blame] | 215 | |
| 216 | |
| 217 | enum { // flags for doTransaction() |
| 218 | eVisibleRegion = 0x00000002, |
Mathias Agopian | 9a11206 | 2009-04-17 19:36:26 -0700 | [diff] [blame] | 219 | }; |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 220 | |
| 221 | |
| 222 | inline const State& drawingState() const { return mDrawingState; } |
| 223 | inline const State& currentState() const { return mCurrentState; } |
| 224 | inline State& currentState() { return mCurrentState; } |
| 225 | |
Mathias Agopian | 076b1cc | 2009-04-10 14:24:30 -0700 | [diff] [blame] | 226 | static int compareCurrentStateZ( |
| 227 | sp<LayerBase> const * layerA, |
| 228 | sp<LayerBase> const * layerB) { |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 229 | return layerA[0]->currentState().z - layerB[0]->currentState().z; |
| 230 | } |
| 231 | |
| 232 | int32_t getOrientation() const { return mOrientation; } |
| 233 | int tx() const { return mLeft; } |
| 234 | int ty() const { return mTop; } |
| 235 | |
| 236 | protected: |
| 237 | const GraphicPlane& graphicPlane(int dpy) const; |
| 238 | GraphicPlane& graphicPlane(int dpy); |
| 239 | |
| 240 | GLuint createTexture() const; |
| 241 | |
Mathias Agopian | 1fed11c | 2009-06-23 18:08:22 -0700 | [diff] [blame] | 242 | struct Texture { |
| 243 | Texture() : name(-1U), width(0), height(0), |
Mathias Agopian | 3330b20 | 2009-10-05 17:07:12 -0700 | [diff] [blame] | 244 | image(EGL_NO_IMAGE_KHR), transform(0), |
| 245 | NPOTAdjust(false), dirty(true) { } |
Mathias Agopian | 1fed11c | 2009-06-23 18:08:22 -0700 | [diff] [blame] | 246 | GLuint name; |
| 247 | GLuint width; |
| 248 | GLuint height; |
Mathias Agopian | 3330b20 | 2009-10-05 17:07:12 -0700 | [diff] [blame] | 249 | GLuint potWidth; |
| 250 | GLuint potHeight; |
| 251 | GLfloat wScale; |
| 252 | GLfloat hScale; |
Mathias Agopian | 1fed11c | 2009-06-23 18:08:22 -0700 | [diff] [blame] | 253 | EGLImageKHR image; |
| 254 | uint32_t transform; |
Mathias Agopian | 3330b20 | 2009-10-05 17:07:12 -0700 | [diff] [blame] | 255 | bool NPOTAdjust; |
Mathias Agopian | 1fed11c | 2009-06-23 18:08:22 -0700 | [diff] [blame] | 256 | bool dirty; |
| 257 | }; |
Rebecca Schultz Zavin | 29aa74c | 2009-09-01 23:06:45 -0700 | [diff] [blame] | 258 | |
| 259 | void clearWithOpenGL(const Region& clip, GLclampx r, GLclampx g, |
| 260 | GLclampx b, GLclampx alpha) const; |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 261 | void clearWithOpenGL(const Region& clip) const; |
Mathias Agopian | 1fed11c | 2009-06-23 18:08:22 -0700 | [diff] [blame] | 262 | void drawWithOpenGL(const Region& clip, const Texture& texture) const; |
Mathias Agopian | 3330b20 | 2009-10-05 17:07:12 -0700 | [diff] [blame] | 263 | void loadTexture(Texture* texture, |
Mathias Agopian | 1fed11c | 2009-06-23 18:08:22 -0700 | [diff] [blame] | 264 | const Region& dirty, const GGLSurface& t) const; |
Mathias Agopian | 54ba51d | 2009-10-26 20:12:37 -0700 | [diff] [blame] | 265 | status_t initializeEglImage( |
| 266 | const sp<GraphicBuffer>& buffer, Texture* texture); |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 267 | |
Mathias Agopian | 1fed11c | 2009-06-23 18:08:22 -0700 | [diff] [blame] | 268 | |
Mathias Agopian | 9a11206 | 2009-04-17 19:36:26 -0700 | [diff] [blame] | 269 | sp<SurfaceFlinger> mFlinger; |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 270 | uint32_t mFlags; |
| 271 | |
| 272 | // cached during validateVisibility() |
| 273 | bool mTransformed; |
Mathias Agopian | a2fe0a2 | 2009-09-23 18:34:53 -0700 | [diff] [blame] | 274 | bool mUseLinearFiltering; |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 275 | int32_t mOrientation; |
| 276 | GLfixed mVertices[4][2]; |
| 277 | Rect mTransformedBounds; |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 278 | int mLeft; |
| 279 | int mTop; |
| 280 | |
| 281 | // these are protected by an external lock |
| 282 | State mCurrentState; |
| 283 | State mDrawingState; |
| 284 | volatile int32_t mTransactionFlags; |
| 285 | |
| 286 | // don't change, don't need a lock |
| 287 | bool mPremultipliedAlpha; |
| 288 | |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 289 | // atomic |
| 290 | volatile int32_t mInvalidate; |
| 291 | |
| 292 | |
Mathias Agopian | 076b1cc | 2009-04-10 14:24:30 -0700 | [diff] [blame] | 293 | protected: |
| 294 | virtual ~LayerBase(); |
| 295 | |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 296 | private: |
Mathias Agopian | 076b1cc | 2009-04-10 14:24:30 -0700 | [diff] [blame] | 297 | LayerBase(const LayerBase& rhs); |
| 298 | void validateTexture(GLint textureName) const; |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 299 | }; |
| 300 | |
| 301 | |
| 302 | // --------------------------------------------------------------------------- |
| 303 | |
| 304 | class LayerBaseClient : public LayerBase |
| 305 | { |
| 306 | public: |
| 307 | class Surface; |
| 308 | static const uint32_t typeInfo; |
| 309 | static const char* const typeID; |
| 310 | virtual char const* getTypeID() const { return typeID; } |
| 311 | virtual uint32_t getTypeInfo() const { return typeInfo; } |
| 312 | |
Mathias Agopian | 48d819a | 2009-09-10 19:41:18 -0700 | [diff] [blame] | 313 | // lcblk is (almost) only accessed from the main SF thread, in the places |
| 314 | // where it's not, a reference to Client must be held |
| 315 | SharedBufferServer* lcblk; |
| 316 | |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 317 | LayerBaseClient(SurfaceFlinger* flinger, DisplayID display, |
Mathias Agopian | f9d9327 | 2009-06-19 17:00:27 -0700 | [diff] [blame] | 318 | const sp<Client>& client, int32_t i); |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 319 | virtual ~LayerBaseClient(); |
Mathias Agopian | 076b1cc | 2009-04-10 14:24:30 -0700 | [diff] [blame] | 320 | virtual void onFirstRef(); |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 321 | |
Mathias Agopian | 48d819a | 2009-09-10 19:41:18 -0700 | [diff] [blame] | 322 | const wp<Client> client; |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 323 | |
Mathias Agopian | 076b1cc | 2009-04-10 14:24:30 -0700 | [diff] [blame] | 324 | inline uint32_t getIdentity() const { return mIdentity; } |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 325 | inline int32_t clientIndex() const { return mIndex; } |
| 326 | int32_t serverIndex() const; |
| 327 | |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 328 | |
Mathias Agopian | 076b1cc | 2009-04-10 14:24:30 -0700 | [diff] [blame] | 329 | sp<Surface> getSurface(); |
| 330 | virtual sp<Surface> createSurface() const; |
| 331 | |
Mathias Agopian | 0b3ad46 | 2009-10-02 18:12:30 -0700 | [diff] [blame] | 332 | virtual void onRemoved(); |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 333 | |
| 334 | class Surface : public BnSurface |
| 335 | { |
| 336 | public: |
Mathias Agopian | 1c97d2e | 2009-08-19 17:46:26 -0700 | [diff] [blame] | 337 | int32_t getToken() const { return mToken; } |
| 338 | int32_t getIdentity() const { return mIdentity; } |
Mathias Agopian | 076b1cc | 2009-04-10 14:24:30 -0700 | [diff] [blame] | 339 | |
Mathias Agopian | 076b1cc | 2009-04-10 14:24:30 -0700 | [diff] [blame] | 340 | protected: |
Mathias Agopian | 9a11206 | 2009-04-17 19:36:26 -0700 | [diff] [blame] | 341 | Surface(const sp<SurfaceFlinger>& flinger, |
| 342 | SurfaceID id, int identity, |
| 343 | const sp<LayerBaseClient>& owner); |
Mathias Agopian | 076b1cc | 2009-04-10 14:24:30 -0700 | [diff] [blame] | 344 | virtual ~Surface(); |
| 345 | virtual status_t onTransact(uint32_t code, const Parcel& data, |
| 346 | Parcel* reply, uint32_t flags); |
| 347 | sp<LayerBaseClient> getOwner() const; |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 348 | |
| 349 | private: |
Mathias Agopian | 3330b20 | 2009-10-05 17:07:12 -0700 | [diff] [blame] | 350 | virtual sp<GraphicBuffer> requestBuffer(int index, int usage); |
Mathias Agopian | 076b1cc | 2009-04-10 14:24:30 -0700 | [diff] [blame] | 351 | virtual status_t registerBuffers(const ISurface::BufferHeap& buffers); |
| 352 | virtual void postBuffer(ssize_t offset); |
| 353 | virtual void unregisterBuffers(); |
| 354 | virtual sp<OverlayRef> createOverlay(uint32_t w, uint32_t h, |
Chih-Chung Chang | 52e7200 | 2010-01-21 17:31:06 -0800 | [diff] [blame] | 355 | int32_t format, int32_t orientation); |
Mathias Agopian | 076b1cc | 2009-04-10 14:24:30 -0700 | [diff] [blame] | 356 | |
Mathias Agopian | 9a11206 | 2009-04-17 19:36:26 -0700 | [diff] [blame] | 357 | protected: |
Mathias Agopian | 076b1cc | 2009-04-10 14:24:30 -0700 | [diff] [blame] | 358 | friend class LayerBaseClient; |
Mathias Agopian | 9a11206 | 2009-04-17 19:36:26 -0700 | [diff] [blame] | 359 | sp<SurfaceFlinger> mFlinger; |
Mathias Agopian | 076b1cc | 2009-04-10 14:24:30 -0700 | [diff] [blame] | 360 | int32_t mToken; |
| 361 | int32_t mIdentity; |
| 362 | wp<LayerBaseClient> mOwner; |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 363 | }; |
| 364 | |
Mathias Agopian | 076b1cc | 2009-04-10 14:24:30 -0700 | [diff] [blame] | 365 | friend class Surface; |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 366 | |
Mathias Agopian | 076b1cc | 2009-04-10 14:24:30 -0700 | [diff] [blame] | 367 | private: |
| 368 | int32_t mIndex; |
| 369 | mutable Mutex mLock; |
| 370 | mutable wp<Surface> mClientSurface; |
Mathias Agopian | 2e12324 | 2009-06-23 20:06:46 -0700 | [diff] [blame] | 371 | // only read |
| 372 | const uint32_t mIdentity; |
| 373 | static int32_t sIdentity; |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 374 | }; |
| 375 | |
| 376 | // --------------------------------------------------------------------------- |
| 377 | |
| 378 | }; // namespace android |
| 379 | |
| 380 | #endif // ANDROID_LAYER_BASE_H |