summaryrefslogtreecommitdiffstats
path: root/services/surfaceflinger
Commit message (Collapse)AuthorAgeFilesLines
* Merge "don't kill surfaceflinger when system process dies"Mathias Agopian2011-07-063-0/+35
|\
| * don't kill surfaceflinger when system process diesMathias Agopian2011-07-013-0/+35
| | | | | | | | Change-Id: I2d3ed87b590f9ccea3fa4af41d92911de070b315
* | return an error code with gralloc buffer allocation failuresMathias Agopian2011-07-012-3/+6
|/ | | | Change-Id: I471e5d37ea7a42fc8a0f93446ee3b4229da37807
* fix screen on/off animation, which was flippedMathias Agopian2011-06-301-8/+8
| | | | | Bug: 4673549 Change-Id: Ia9766754687b89c1ee24b2dbe918c11290ebe038
* SF transactions are now O(1) wrt IPC instead of O(N).Mathias Agopian2011-06-294-93/+78
| | | | Change-Id: I57669852cbf6aabae244ea86940a08a5a27ffc43
* Merge changes I9fb59763,I8b2c6e00Jamie Gennis2011-06-281-11/+8
|\ | | | | | | | | | | * changes: SurfaceTexture: consume buffers after err checks SurfaceTexture: change onFrameAvailable behavior
| * SurfaceTexture: change onFrameAvailable behaviorJamie Gennis2011-06-271-11/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change alters the conditions under which the onFrameAvailable callback gets called by the C++ SurfaceTexture class. The new behavior is to call the callback whenever a frame gets queued that will be visible to the buffer consumer. This means that buffers queued in synchronous mode always trigger the callback, as those buffers will remain pending until they are consumed. Buffers queued in asynchronous mode will only trigger the callback if there was not previously an unconsumed buffer pending. The new behavior means that a consumer should perform a draw operation exactly once for every onFrameAvailable call that it recieves. This change also modifies SurfaceFlinger and the SurfaceTexture JNI to support of the new behavior. Change-Id: I8b2c6e00961d3d58b11c6af50b555b6e4c5f5b40
* | PermissionCache caches permission checksMathias Agopian2011-06-272-21/+22
|/ | | | | | | | | | | | | This is intended to absorb the cost of the IPC to the permission controller. Cached permission checks cost about 3us, while full blown ones are two orders of magnitude slower. CAVEAT: PermissionCache can only handle system permissions safely for now, because the cache is not purged upon global permission changes. Change-Id: I8b8a5e71e191e3c01e8f792f253c379190eee62e
* fix RefBase so it retains binary-compatibility with gingerbreadMathias Agopian2011-06-132-4/+6
| | | | | Bug: 4595257 Change-Id: I0d5e10f497e3f39868bff58f6ded510c38b44b12
* unify SurfaceTexture and SurfaceMathias Agopian2011-06-1312-1246/+499
| | | | | | | Add the concept of synchronous dequeueBuffer in SurfaceTexture Implement {Surface|SurfaceTextureClient}::setSwapInterval() Add SurfaceTexture logging fix onFrameAvailable
* Merge "Fix a race that could cause GL commands to be executed from the wrong ↵Mathias Agopian2011-05-196-108/+79
|\ | | | | | | thread."
| * Fix a race that could cause GL commands to be executed from the wrong thread.Mathias Agopian2011-05-196-108/+79
| | | | | | | | Change-Id: Ia3d407f7bf2f5553f46cfdade70b7b0badb35beb
* | SurfaceFlinger: unfreeze windows for fixed size buffers.Jamie Gennis2011-05-161-2/+3
|/ | | | | | | | | This change makes SurfaceFlinger unfreeze a window if it ever gets a buffer that is fixed-size. Normally the window would not be frozen if its in fixed-size mode, but if the window was frozen before entering fixed-size mode then it should be unfrozen. Change-Id: I6bc822d4b02ae51fa8914c1f60f5d24b2002b38d
* Fix a race in SurfaceFlinger that could cause layers to be leaked forever.Mathias Agopian2011-05-032-1/+17
| | | | | | | | | | | | | | | | The transaction flags were atomically read-and-cleared to determine if a transaction was needed, in the later case, mStateLock was taken to keep the current state still during the transaction. This left a small window open, where a layer could be removed after the transaction flags were checked but before the transaction was started holding the lock. In that situation eTraversalNeeded would be set but only seen during the next transaction cycle; however, because we're handling this transaction (because of another flag) it will be commited, "loosing" the information about the layer being removed -- so when the next transaction cycle due to eTraversalNeeded starts, it won't notice that layers have been removed and won't populated the ditchedLayers array. Change-Id: Iedea9e25fee8dd98a0c5bd5ad41a20fcadf75b47
* frameworks/base: android_native_buffer_t -> ANativeWindowBufferIliyan Malchev2011-05-032-2/+2
| | | | | Change-Id: Idc2eabaa805bb6d308ebb315872623f28d428417 Signed-off-by: Iliyan Malchev <malchev@google.com>
* Merge "Fix a race-condtion in SurfaceFlinger that could lead to a crash."Mathias Agopian2011-05-032-11/+21
|\
| * Fix a race-condtion in SurfaceFlinger that could lead to a crash.Mathias Agopian2011-05-032-11/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Client::mLayers could be accessed from different threads. On one side from Client::attachLayer() which is currently called from a binder thread; on the other side from Client::detachLayer() which is always called from the main thread. This could lead to a corruption of Client::mLayers. We fix this issue by adding an internal lock to Client. Change-Id: Ib1317d7750ed5030e6f577efe34b69fc10198bd3
* | am 08acaec6: am a47c0d29: am 58e4a5e2: Merge "Fixed to draw texture when ↵Conley Owens2011-05-021-1/+1
|\ \ | |/ |/| | | | | | | | | loadTexture() is called at first time" * commit '08acaec6df66bd6a12b1e63016ed998abff4afdc': Fixed to draw texture when loadTexture() is called at first time
| * am a47c0d29: am 58e4a5e2: Merge "Fixed to draw texture when loadTexture() is ↵Conley Owens2011-04-291-1/+1
| |\ | | | | | | | | | | | | | | | | | | called at first time" * commit 'a47c0d29bec7c242fb8d5ffe206c4c6ff85a178a': Fixed to draw texture when loadTexture() is called at first time
| | * Merge "Fixed to draw texture when loadTexture() is called at first time"Conley Owens2011-04-291-1/+1
| | |\
| | | * Fixed to draw texture when loadTexture() is called at first timeIchitaro Kohara2011-04-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SW renderer of Stagefright reaches loadTexture() to draw image. The first time loadTexture() is called, it just initializes OGL texture, then returns. Thus, the first time call doesn't draw. This patch fixes to move on to draw stage after the initialization. Change-Id: I3ec1ad68fb8d376a4ad7aefded1c18a002d175c4
| | * | Merge "Fixed to call computeVisibleRegions() when transparent value changed"Conley Owens2011-04-291-0/+3
| | |\ \
| | | * | Fixed to call computeVisibleRegions() when transparent value changedIchitaro Kohara2011-02-171-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When some Surfaces are overlapping and one of them changed to transparent or opaque, the back Surfaces should appear or disappear. This patch calls SurfaceFlinger::computeVisibleRegions() to re-calculate region of each Surface to implement the behavior. Change-Id: Iffb1caf1b4ce28dff252e114fe5b9b07d9c84a6f
* | | | | am ba5aebd1: am ac505b86: am f0556bb9: am 86d1d747: Merge "Add lock before ↵Conley Owens2011-04-271-2/+10
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | calling initEglImage" * commit 'ba5aebd106c61567ad6be905efd18902025735aa': Add lock before calling initEglImage
| * | | | am ac505b86: am f0556bb9: am 86d1d747: Merge "Add lock before calling ↵Conley Owens2011-04-271-2/+10
| |\ \ \ \ | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | initEglImage" * commit 'ac505b86b45462d9883f9c36fad0ef85e0885ee4': Add lock before calling initEglImage
| | * | | am 86d1d747: Merge "Add lock before calling initEglImage"Conley Owens2011-04-271-2/+10
| | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * commit '86d1d74762e65b6f64c2d4758aa5fd4af6275696': Add lock before calling initEglImage
| | | * | | Add lock before calling initEglImageKobi Cohen Arazi2011-04-151-2/+10
| | | | |/ | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without that lock, there is a chance of race condition where while composing a specific index, requestBuf with the same index can be executed and touch the same data that is being used in initEglImage. (e.g. dirty flag in texture)
| | * | | am 33029221: Merge "revert the surface purgatory list and dependent ↵Mathias Agopian2011-03-097-87/+18
| | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | changes." into gingerbread * commit '33029221619f14577bd0d0e7c2f815abc8f1b8ea': revert the surface purgatory list and dependent changes.
| | | * | | revert the surface purgatory list and dependent changes.Mathias Agopian2011-03-097-87/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6d0f6cb Revert "Fix [3513017] in lockscreen but showing empty launcher (live wallpaper) only" 6154412 Revert "partially fix [3306150] HTML5 video with H/W acceleration blackout (DO NOT MERGE)" 37c2a37 fix [3408713] Dialog window invisible sometimes It looks like there is a surface leak, it's unclear where it is. Without those reverts, this would cause a leak of the associated buffers which is far more problematic. this change might hide the surface leak. Bug: 4078032 Change-Id: Iedcda3ffcdd2f69d41047b5c3134c1e867ff90d7
| | * | | | am df6410dc: Merge "Fix [3513017] in lockscreen but showing empty launcher ↵Mathias Agopian2011-03-076-17/+28
| | |\ \ \ \ | | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (live wallpaper) only" into gingerbread * commit 'df6410dce3dae0bdb7e13118b3878079a1dcce03': Fix [3513017] in lockscreen but showing empty launcher (live wallpaper) only
| | | * | | Fix [3513017] in lockscreen but showing empty launcher (live wallpaper) onlyMathias Agopian2011-03-076-17/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 37c2a37 fix [3408713] Dialog window invisible sometimes d35c666 fix [3385504] Surface flinger hang when adding dim surface 1723b04 fix [3389263] OMX.Nvidia.h264.decode fails to shutdown 1b0114f fix a surface leak in SurfaceFlinger Bug: 3513017 Change-Id: Ia13ed8c9cdcb1f484e177cdcaff687e7c88a10c3
* | | | | | Get rid of the "pid" parameter from createSurfaceMathias Agopian2011-04-202-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I28635e3f803e6abe965d79998e305f54a202465d
* | | | | | Merge "remove support for console in SurfaceFlinger"Mathias Agopian2011-04-192-263/+4
|\ \ \ \ \ \
| * | | | | | remove support for console in SurfaceFlingerMathias Agopian2011-04-182-263/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the only supported screen management api now is /sys/power/wait_for_fb_{sleep|wake} Change-Id: I6c7d8d54843da4980b1b38ee3d46cf19be275240
* | | | | | | fix memory corruption when retriving GL_MAX_VIEWPORT_DIMSMathias Agopian2011-04-182-4/+8
|/ / / / / / | | | | | | | | | | | | | | | | | | Change-Id: I2e0b1eac6dbc6a4ecbbaf31013aa02cf2369fce2
* | | | | | Fix a GraphicBuffer leak in SurfaceTextureMathias Agopian2011-04-082-19/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This leak was intentional, it was there to deal with the fact that some gralloc implementations don't track buffer handles with file-descriptors so buffers needed to stay alive until there were registered, which is not guaranteed by binder transactions. In this new implementation, we use a small BBinder holding a reference to the buffer, which with tuck into the parcel. This forces the reference to stay alive until the parcel is destroyed, which is guaranteed (by construction) to happen after the buffer is registered. this allows the public facing API to not expose the previous hack. Change-Id: I1dd6cd83679a2b7457ad628169e2851acc027143
* | | | | | remove more unused references to ISurfaceMathias Agopian2011-04-051-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I2201f1ca2bb8f203a081d94a0134f798778dfbef
* | | | | | merge libsurfaceflinger_client into libguiMathias Agopian2011-03-254-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this is the first step in unifying surfacetexture and surface. for this reason the header files were not moved, as most of them will eventually go away. NOTE: currently we keep libsurfaceflinger_client.so as an empty library to workaround prebuilt binaries wrongly linking against it. Change-Id: I130f0de2428e8579033dc41394d093f4e1431a00
* | | | | | am bd340c7b: am b368f4d8: am 38caff23: Merge "SurfaceFlinger: Fix a typo." ↵Jamie Gennis2011-03-181-1/+1
|\ \ \ \ \ \ | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into honeycomb-mr1 * commit 'bd340c7b492fcf7d0a6cccab8825e710c83fe76d': SurfaceFlinger: Fix a typo.
| * | | | | Merge "SurfaceFlinger: Fix a typo." into honeycomb-mr1Jamie Gennis2011-03-181-1/+1
| |\ \ \ \ \
| | * | | | | SurfaceFlinger: Fix a typo.Jamie Gennis2011-03-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change makes Layer skip its cleanup of its old shared memory region when the UserClient object that owned the memory has been freed. Bug: 3429357 Change-Id: I9e4d8eb190f6914dc043674b9bb8dd28e959901b
* | | | | | | am 14438b81: am 970bad67: am be368de7: Merge "Fix missing AOSP copyright ↵James Dong2011-03-172-0/+32
|\ \ \ \ \ \ \ | |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | headers for more files" into honeycomb-mr1 * commit '14438b81a1fe4d7ebdf8977f3d80a1dd1867c5ad': Fix missing AOSP copyright headers for more files
| * | | | | | Fix missing AOSP copyright headers for more filesJames Dong2011-03-172-0/+32
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o Update the copyright date on InputDispatcher_test.cpp and InputReader_test.cpp because these two files were moved from other places to the current location, and were actually created in 2010. bug - 4119349 Change-Id: Ic93b81ddafb58e9e72a2e9e02ca3d9f173d6dca7
* | | | | | am e22aa623: am 25594e19: am f40e638e: fix [4093196] Device lock up - log ↵Mathias Agopian2011-03-171-5/+7
|\ \ \ \ \ \ | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | spam with SharedBufferStack: waitForCondition(LockCondition) timed out * commit 'e22aa62362a3007ee59ac62d4b5969e216987995': fix [4093196] Device lock up - log spam with SharedBufferStack: waitForCondition(LockCondition) timed out
| * | | | | fix [4093196] Device lock up - log spam with SharedBufferStack: ↵Mathias Agopian2011-03-171-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | waitForCondition(LockCondition) timed out a memory corruption happned when the buffer pool was resized (like when playing a video or using camera) and there was no current active buffer. In this case, the faulty code would index into an array at position -1 which corrupted 24 bytes of data. also improved region validation code (ifdef'ed out by default) Bug: 4093196 Change-Id: I915c581d131148959d720e00e3892e9186ab733d
* | | | | | Fix some const-ness and commentsMathias Agopian2011-03-112-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mDrawingState doesn't need to be accessed by the mStateLock, because by definition it's only accessed from the main thread. Similarily, the list of layers in the drawing state cannot change (ie: is const). Change-Id: I2e5da7f4d8caee7af7802b432cd45cc81c7c08b0
* | | | | | Fix initialization order warning.Mathias Agopian2011-03-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I794dfaaa3a2f2645a89abc6c45de5f76e485f7d0
* | | | | | Merge "Default to NONE format in Layer"Eric Hassold2011-03-111-1/+2
|\ \ \ \ \ \ | |/ / / / / |/| | | | |
| * | | | | Default to NONE format in LayerEric Hassold2011-03-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mFormat is not initialized with any value in Layer constructor, causing a call to requestFormat() with no explicit format specified to fallback to some uninitialized value. Such invalid path actually detected by valgrind. Change-Id: Ib7faabcd61eaa26fb0ae7a9a486d9e258ba31b63
* | | | | | SurfaceFlinger: Respect the PROTECTED gralloc bit.Jamie Gennis2011-03-104-17/+24
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change makes SurfaceFlinger treat layers for which the active buffer has the GRALLOC_USAGE_PROTECTED bit set as if they have the 'secure' flag set. Change-Id: Ic60b6513a63e4bb92ec6ce9fd12fd39b4ba5f674 Bug: 4081304