OSDN Git Service

android-x86/frameworks-native.git
11 years agoam 2281af96: dumpstate: add kernel memory fragmentation unusable index
Colin Cross [Tue, 30 Oct 2012 00:08:14 +0000 (17:08 -0700)]
am 2281af96: dumpstate: add kernel memory fragmentation unusable index

* commit '2281af967dd840aade7bc55b19ea7df0e6da36f2':
  dumpstate: add kernel memory fragmentation unusable index

11 years agodumpstate: add kernel memory fragmentation unusable index
Colin Cross [Mon, 29 Oct 2012 05:41:06 +0000 (22:41 -0700)]
dumpstate: add kernel memory fragmentation unusable index

Dump /d/extfrag/unusable_index in bugreports.  It shows the
percentage of memory in each zone that is not available for
allocations for each order.

Change-Id: I2af6680cb609887ea7b3d6107d1aa88bd0206b52

11 years agoMerge "Ensure that Vector::erase() returns a valid iterator" into jb-mr1-aah-dev
Jason Simmons [Fri, 26 Oct 2012 01:03:50 +0000 (18:03 -0700)]
Merge "Ensure that Vector::erase() returns a valid iterator" into jb-mr1-aah-dev

11 years agoEnsure that Vector::erase() returns a valid iterator
Jason Simmons [Thu, 25 Oct 2012 22:58:43 +0000 (15:58 -0700)]
Ensure that Vector::erase() returns a valid iterator

Vector::erase may reallocate the Vector's storage while removing an element.
However, erase() calls begin() before calling removeItemsAt(), thus caching
a pointer the the Vector's old storage.  If the storage is reallocated,
the iterator returned by erase() will be based on the old storage pointer
and will thus be invalid.

Change-Id: I2450c55fd418e6b1c558a4ca7c024573abbaa098

11 years agopartially implement external display clipping
Mathias Agopian [Wed, 24 Oct 2012 23:29:17 +0000 (16:29 -0700)]
partially implement external display clipping

we perform external display clipping only on the GL
side (ie: not done on the h/w composer side, which is
harder and would be too risky). in practice this means
that WFD will be clipped properly, while HDMI *may* or
may not depending on how hwc is used.

Bug: 7149437
Change-Id: I92d4d04220db72b6ffb134c7fa7a93af569723a5

11 years agoRevert "Revert "put back the unused virtuals in Vector<>""
Dave Burke [Thu, 25 Oct 2012 00:30:31 +0000 (17:30 -0700)]
Revert "Revert "put back the unused virtuals in Vector<>""

This reverts commit 225c66a48cdc3acef21ee380dc134449749d3cb3

Change-Id: If31a04b81052cbc7dd7bf237c07107c33066d03d

11 years agoprevent a client from crashing surfaceflinger
Mathias Agopian [Mon, 22 Oct 2012 21:27:45 +0000 (14:27 -0700)]
prevent a client from crashing surfaceflinger

a misbehaving or malicious client could cause SF to crash
by providing a "fake" IInterface. we now check the
IInterface we get is our own and local.

Bug: 7278879
Change-Id: Ia19d05902d4b2385c5a16416148378d4998833fd

11 years agoMerge "SurfaceFlinger: add support for secure displays" into jb-mr1-dev
Jamie Gennis [Mon, 22 Oct 2012 20:50:18 +0000 (13:50 -0700)]
Merge "SurfaceFlinger: add support for secure displays" into jb-mr1-dev

11 years agoSurfaceFlinger: add support for secure displays
Jamie Gennis [Sat, 20 Oct 2012 01:19:11 +0000 (18:19 -0700)]
SurfaceFlinger: add support for secure displays

This change adds support for displays that are not allowed to display surfaces
with the eSecure flag set.  All non-virtual displays are considered secure,
while virtual displays have their secure-ness specified at creation time.

Bug: 7368436
Change-Id: I81ad535d2d1e5a7ff78269017e85b111f0098500

11 years agoFix emulator vsync
Andy McFadden [Fri, 19 Oct 2012 19:53:46 +0000 (12:53 -0700)]
Fix emulator vsync

The code that reserves display IDs was only run when a hardware
composer was present.  The eventControl() function, which handles
enabling of vsync, was ignoring the request because the primary
display didn't appear in its set of allocated IDs.  This moves
reservation of IDs for built-in displays outside the HWC-only block.

Also, added a couple of warnings in eventControl().

Bug 7376568

Change-Id: I185ccdf817a25499b5c2668f8f6d594afb8c1568

11 years agoMerge "Add runtime debugging capabilities to OpenGL" into jb-mr1-dev
Romain Guy [Fri, 19 Oct 2012 00:33:36 +0000 (17:33 -0700)]
Merge "Add runtime debugging capabilities to OpenGL" into jb-mr1-dev

11 years agoAdd runtime debugging capabilities to OpenGL
Romain Guy [Thu, 18 Oct 2012 23:16:10 +0000 (16:16 -0700)]
Add runtime debugging capabilities to OpenGL

The shell property debug.egl.trace can now be set to:

0
  disables tracing
1
  logs all GL calls
error
  checks glGetError after every GL call, logs a stack trace on error
systrace
  logs each GL call to systrace

Change-Id: I34a2a2d4e19c373fd9eaa1b0cd93e67c87378996

11 years agoSurfaceFlinger: change the animation timeout
Jamie Gennis [Wed, 17 Oct 2012 16:29:47 +0000 (09:29 -0700)]
SurfaceFlinger: change the animation timeout

This change changes the animation transaction timeout from 500us to 5s.

Bug: 7362633
Change-Id: I9bed8e74f726dae2daa398afc29babcea00d5b04

11 years agoMerge "BufferQueue: alloc without holding the lock" into jb-mr1-dev
Jamie Gennis [Wed, 17 Oct 2012 16:32:42 +0000 (09:32 -0700)]
Merge "BufferQueue: alloc without holding the lock" into jb-mr1-dev

11 years agoMerge "Update comments to reflect what the code actually does" into jb-mr1-dev
Romain Guy [Tue, 16 Oct 2012 16:45:01 +0000 (09:45 -0700)]
Merge "Update comments to reflect what the code actually does" into jb-mr1-dev

11 years agofix a corruption in blank/unblank
Mathias Agopian [Mon, 15 Oct 2012 23:51:41 +0000 (16:51 -0700)]
fix a corruption in blank/unblank

we were holding a reference (ie: pointer) to a sp<DisplayDevice>
while processing the message. Meanwhile the object itself could
go away and we would end up accessing a dead object.

the root cause of the problem is that we are accessing mDisplays[]
in a few places outside of the main thread.

Bug: 7352770
Change-Id: I89e35dd85fb30e9a6383eca9a0bbc7028363876c

11 years agoMerge "SurfaceFlinger: add animation transactions" into jb-mr1-dev
Jamie Gennis [Tue, 16 Oct 2012 02:36:11 +0000 (19:36 -0700)]
Merge "SurfaceFlinger: add animation transactions" into jb-mr1-dev

11 years agoUpdate comments to reflect what the code actually does
Romain Guy [Tue, 16 Oct 2012 02:25:18 +0000 (19:25 -0700)]
Update comments to reflect what the code actually does

Change-Id: I2613aa32c29eddc52a00090656c1bd11f9f5732b

11 years agoSurfaceFlinger: add animation transactions
Jamie Gennis [Tue, 16 Oct 2012 01:24:43 +0000 (18:24 -0700)]
SurfaceFlinger: add animation transactions

This change adds a transaction flag for WindowManager to indicate that a
transaction is being used to animate windows around the screen.  SurfaceFlinger
will not allow more than one of these transactions to be outstanding at a time
to prevent the animation "frames" from being dropped.

Bug: 7353840
Change-Id: I6488a6e0e1ed13d27356d2203c9dc766dc6b1759

11 years agoMerge "Add new debug option to force 4x MSAA in OpenGL ES 2.0 apps" into jb-mr1-dev
Romain Guy [Tue, 16 Oct 2012 01:43:19 +0000 (18:43 -0700)]
Merge "Add new debug option to force 4x MSAA in OpenGL ES 2.0 apps" into jb-mr1-dev

11 years agoAdd new debug option to force 4x MSAA in OpenGL ES 2.0 apps
Romain Guy [Tue, 16 Oct 2012 01:13:05 +0000 (18:13 -0700)]
Add new debug option to force 4x MSAA in OpenGL ES 2.0 apps

Change-Id: I53ac91a9ce07b5dd5f2ee0e3cc5b65b6402f9229

11 years agoAlways set vertex alpha when drawing screenshot layers
Jesse Hall [Mon, 15 Oct 2012 19:38:33 +0000 (12:38 -0700)]
Always set vertex alpha when drawing screenshot layers

The screenshot is a GL_RGB texture, and the GL_REPLACE texture env
mode uses vertex alpha for GL_RGB textures instead of alpha=1.0.

Bug: 7340077
Change-Id: I6fbb907023e48f9c422b15a33da79757d6726840

11 years agoMerge "Add TEMP_FAILURE_RETRY around open and write calls" into jb-mr1-dev
Kenny Root [Sat, 13 Oct 2012 06:39:47 +0000 (23:39 -0700)]
Merge "Add TEMP_FAILURE_RETRY around open and write calls" into jb-mr1-dev

11 years agoMerge "SurfaceFlinger: make the num FBs a board config" into jb-mr1-dev
Jamie Gennis [Fri, 12 Oct 2012 21:33:51 +0000 (14:33 -0700)]
Merge "SurfaceFlinger: make the num FBs a board config" into jb-mr1-dev

11 years agoSurfaceFlinger: make the num FBs a board config
Jamie Gennis [Fri, 12 Oct 2012 21:18:10 +0000 (14:18 -0700)]
SurfaceFlinger: make the num FBs a board config

Bug: 7283132
Change-Id: I38116f39fc18212f2daab94bbfc3daaf89439fc4

11 years agoAdd TEMP_FAILURE_RETRY around open and write calls
Kenny Root [Fri, 12 Oct 2012 06:42:05 +0000 (23:42 -0700)]
Add TEMP_FAILURE_RETRY around open and write calls

Bug: 7330849
Change-Id: I9aef3c3d3a248c3eea7ca060124ad6decaa6b4da

11 years agoBufferQueue: alloc without holding the lock
Jamie Gennis [Fri, 5 Oct 2012 01:34:01 +0000 (18:34 -0700)]
BufferQueue: alloc without holding the lock

This change makes BufferQueue::dequeueBuffer release its mutex before
allocating new buffers.  This should alleviate lock contention in
SurfaceFlinger where SF's main thread can get blocked waiting for an allocation
operation to complete.

Bug: 7335075
Change-Id: I1b000539cc616a695afab2e9c68507db69e57b13

11 years agoAssume LayerScreenshot has pre-multiplied alpha
Jesse Hall [Thu, 11 Oct 2012 04:37:22 +0000 (21:37 -0700)]
Assume LayerScreenshot has pre-multiplied alpha

Bug: 7300129
Change-Id: Ie9114adc4b5c9a8cc3c65bfe6d9478b2cba4e0d8

11 years agoMerge "Fix HDMI unblank behavior" into jb-mr1-dev
Andy McFadden [Thu, 11 Oct 2012 02:34:11 +0000 (19:34 -0700)]
Merge "Fix HDMI unblank behavior" into jb-mr1-dev

11 years agoFix HDMI unblank behavior
Andy McFadden [Thu, 11 Oct 2012 01:17:51 +0000 (18:17 -0700)]
Fix HDMI unblank behavior

Two issues:

(1) We were announcing the hotplug event before we were ready to
handle blank/unblank events, so we were losing the initial unblank
that power manager sends us when HDMI is first plugged in.  This
left the display blank until you toggled the device power off/on.

(2) We were retaining fbTargetHandle for HDMI after the display was
disconnected.  The value didn't get updated when HDMI was reconnected
because the display was blank, so we didn't go through that code
path.  So, when HDMI was re-connected, we passed stale data into
the HWC.

Bug 7323938

Change-Id: I2335d24fd7b0f00bb23fc63aa7bcf44cb8857c73

11 years agoRevert "Add GL Error logs (temporary)"
Chet Haase [Mon, 8 Oct 2012 20:19:08 +0000 (13:19 -0700)]
Revert "Add GL Error logs (temporary)"

This reverts commit 2da2c15068327a4fdad411f638905abcb2209d8a.

11 years agoMerge "fix typo that prevented proper loging of EGL error code" into jb-mr1-dev
Mathias Agopian [Tue, 9 Oct 2012 23:52:37 +0000 (16:52 -0700)]
Merge "fix typo that prevented proper loging of EGL error code" into jb-mr1-dev

11 years agoMerge "don't automatically unblank external displays" into jb-mr1-dev
Jeff Brown [Tue, 9 Oct 2012 23:50:55 +0000 (16:50 -0700)]
Merge "don't automatically unblank external displays" into jb-mr1-dev

11 years agofix typo that prevented proper loging of EGL error code
Mathias Agopian [Tue, 9 Oct 2012 23:43:50 +0000 (16:43 -0700)]
fix typo that prevented proper loging of EGL error code

needed for investigating 7309949

Bug: 7309949
Change-Id: If29a5c08d0e87f46b44ba2e1030be61cb4d1403b

11 years agoMerge "Fence didn't manager sync_wait error codes properly" into jb-mr1-dev
Mathias Agopian [Tue, 9 Oct 2012 23:36:30 +0000 (16:36 -0700)]
Merge "Fence didn't manager sync_wait error codes properly" into jb-mr1-dev

11 years agodon't automatically unblank external displays
Mathias Agopian [Mon, 8 Oct 2012 22:12:36 +0000 (15:12 -0700)]
don't automatically unblank external displays

this should be handled by the display-manager. we were doing
that in SF because until recently we didn't have enough support
in the HAL. however, this is now causing other problems when
plugging hdmi while the screen is off for instance.

Bug: 7150885
Change-Id: I739b209056a765d38d05295cf202f67ee0f506ae

11 years agoFence didn't manager sync_wait error codes properly
Mathias Agopian [Tue, 9 Oct 2012 21:38:19 +0000 (14:38 -0700)]
Fence didn't manager sync_wait error codes properly

error codes are returned in errno, this caused ::waitForwever()
to only wait for 1 second and return improper error code (-1).

needed to help debugging 7316632

Bug: 7316632
Change-Id: Ie144f614a88393393972a3a770c6b4b0581f961a

11 years agoAdd blankDisplay/unblankDisplay to SurfaceComposerClient.
Jeff Brown [Tue, 9 Oct 2012 02:13:57 +0000 (19:13 -0700)]
Add blankDisplay/unblankDisplay to SurfaceComposerClient.

Bug: 7309812
Change-Id: Ia401d642094a46c62f0d26c65da1d11341e203a1

11 years agofix dumpsys Layer name when using multiple displays
Mathias Agopian [Thu, 4 Oct 2012 22:58:54 +0000 (15:58 -0700)]
fix dumpsys Layer name when using multiple displays

Bug: 7288401
Change-Id: I14beeef58fac5270cef3b611e18c163060efe6c3

11 years agofix SurfaceFlinger DDMS debugging
Mathias Agopian [Sun, 7 Oct 2012 23:41:12 +0000 (16:41 -0700)]
fix SurfaceFlinger DDMS debugging

DdmHandleAppName.setAppName() signature changed which broke
this debugging feature.

Needed for debugging b\7267680

Change-Id: I4482bf5a441e91bef89d1ddea9a4152333be7f88

11 years agoMerge "Revert "ugly, temporary, workaroung for a problem where a binder thread spins...
Dave Burke [Sun, 7 Oct 2012 08:06:14 +0000 (01:06 -0700)]
Merge "Revert "ugly, temporary, workaroung for a problem where a binder thread spins forever"" into jb-mr1-dev

11 years agoRevert "ugly, temporary, workaroung for a problem where a binder thread spins forever"
Dave Burke [Sun, 7 Oct 2012 06:20:00 +0000 (23:20 -0700)]
Revert "ugly, temporary, workaroung for a problem where a binder thread spins forever"

This reverts commit 0845d0245e09548110cacb0f20e9934753388aab

Change-Id: I395037cb9427cd11f7de6bb78fbdfa917fc6263a

11 years agoMerge "ugly, temporary, workaroung for a problem where a binder thread spins forever...
Dave Burke [Sat, 6 Oct 2012 06:25:57 +0000 (23:25 -0700)]
Merge "ugly, temporary, workaroung for a problem where a binder thread spins forever" into jb-mr1-dev

11 years agougly, temporary, workaroung for a problem where a binder thread spins forever
Mathias Agopian [Sat, 6 Oct 2012 00:28:04 +0000 (17:28 -0700)]
ugly, temporary, workaroung for a problem where a binder thread spins forever

Bug: 7289992
Change-Id: I0c3d482a1af57e5f444be2ba7f2751ac3e954af2

11 years agoFix race condition in ConsumerBase::addReleaseFence()
Jesse Hall [Fri, 5 Oct 2012 21:34:21 +0000 (14:34 -0700)]
Fix race condition in ConsumerBase::addReleaseFence()

This needs the ConsumerBase mutex locked, but wasn't locking it. Two
of the four places that called it already held the lock so were fine.
Now addReleaseFence() takes the lock itself, and I added
addReleaseFenceLocked() for the two already-locked callers, since in
one of them dropping the lock would be inconvenient.

Bug: 7289269
Change-Id: I7a5628adb516f8eec782aa6c14128202f96d7b0a

11 years agoMerge "Fix missing parens in CleanSpec.mk." into jb-mr1-dev
Stephen Hines [Fri, 5 Oct 2012 04:42:29 +0000 (21:42 -0700)]
Merge "Fix missing parens in CleanSpec.mk." into jb-mr1-dev

11 years agoMerge "Tone down a fatal assert" into jb-mr1-dev
Mathias Agopian [Fri, 5 Oct 2012 03:24:17 +0000 (20:24 -0700)]
Merge "Tone down a fatal assert" into jb-mr1-dev

11 years agoFix missing parens in CleanSpec.mk.
Stephen Hines [Thu, 4 Oct 2012 18:38:41 +0000 (11:38 -0700)]
Fix missing parens in CleanSpec.mk.

Change-Id: I0440a942d3e685d619ec9cc402d3293cb3f52df1

11 years agoMerge "Add GL Error logs (temporary)" into jb-mr1-dev
Chet Haase [Fri, 5 Oct 2012 02:45:16 +0000 (19:45 -0700)]
Merge "Add GL Error logs (temporary)" into jb-mr1-dev

11 years agoTone down a fatal assert
Andy McFadden [Fri, 5 Oct 2012 02:09:45 +0000 (19:09 -0700)]
Tone down a fatal assert

The new disconnectDisplay function doesn't handle virtual displays,
but it may be called for them.  Return without doing anything.

Bug 7281786

Change-Id: I62607f2ae6073fa66b393f55932604aeb8e03566

11 years agoFix broken CleanSpec.mk in libs/gui
Raph Levien [Fri, 5 Oct 2012 02:00:45 +0000 (19:00 -0700)]
Fix broken CleanSpec.mk in libs/gui

The CleanSpec is missing parens, which causes $P to be interpreted as a
single variable, and the following printed to the log:

Clean step: rm -rf RODUCT_OUT/obj/SHARED_LIBRARIES/libgui_intermediates

This patch adds parens as needed.

Change-Id: I587998fa67a4884418c286360a577cdbb6ea9a21

11 years agoAdd GL Error logs (temporary)
Chet Haase [Fri, 5 Oct 2012 00:15:59 +0000 (17:15 -0700)]
Add GL Error logs (temporary)

Adding logs to tell which specific methods throw OpenGL errors.

Change-Id: I1d73c7566ed1ea6610392020411762c6255a0ede

11 years agoIgnore display state changes for disconnected displays
Jesse Hall [Thu, 4 Oct 2012 23:29:19 +0000 (16:29 -0700)]
Ignore display state changes for disconnected displays

When a display is disconnected, removing it from SurfaceFlinger's
display list is non-atomic with removing it from the Display Manager
and any in-flight transactions. So SurfaceFlinger might get a display
state change transaction for a display it has already forgotten about.
Just ignore these.

Bug: 7288082
Change-Id: Ic27e55377f3db40fb34e3b1cd67e43297df117a2

11 years agomake sure we don't call into the HWC HAL when not needed
Mathias Agopian [Thu, 4 Oct 2012 09:34:38 +0000 (02:34 -0700)]
make sure we don't call into the HWC HAL when not needed

when enabling/disabling vsync we now make sure to
not call into the HAL if the state wouldn't change.

Bug: 7274951

Change-Id: Ie24a6d68888a51b577acf9c2a973d85437cbacaf

11 years agoFix crashes after HDMI disconnect
Andy McFadden [Wed, 3 Oct 2012 02:04:45 +0000 (19:04 -0700)]
Fix crashes after HDMI disconnect

The display was being removed from SurfaceFlinger's list before we
had a chance to reset HWComposer's layer list, so we were passing
stale data into the hardware composer (which has its own per-display
data).  This resulted in "invalid gralloc handle" complaints.
We now clear the layer list immediately after removing the display.

The display was being removed while its EGLSurface was still
"current", resulting in "cancelBuffer: BufferQueue has been
abandoned" complaints.  We now call makeCurrent on the primary
display before removing the external display.

Bug 7274254

Change-Id: Ia59e3a61d7ec46488b96bf93ec5e4ed3488b70e4

11 years agolibgui: enable fence support for exynos5
Jamie Gennis [Fri, 28 Sep 2012 00:58:24 +0000 (17:58 -0700)]
libgui: enable fence support for exynos5

Change-Id: Iffc48412b8c951116a956a3ac7dab8d75eed13da
Bug: 7238122

11 years agolibgui: fix up compile options
Jamie Gennis [Tue, 2 Oct 2012 23:40:30 +0000 (16:40 -0700)]
libgui: fix up compile options

This change adds debug info to SurfaceFlinger's dumpsys to indicate that the
USE_WAIT_SYNC compile option was enabled, and it removes the
ALLOW_DEQUEUE_CURRENT_BUFFER option.

Bug: 7238122
Change-Id: I70e08e34c2ef58aa6d2f88229e781a119f84b5a9

11 years agoMerge "Fix issue #7271589: Cannot set Ocean HD live wallpaper" into jb-mr1-dev
Dianne Hackborn [Wed, 3 Oct 2012 19:09:12 +0000 (12:09 -0700)]
Merge "Fix issue #7271589: Cannot set Ocean HD live wallpaper" into jb-mr1-dev

11 years agoFix issue #7271589: Cannot set Ocean HD live wallpaper
Dianne Hackborn [Wed, 3 Oct 2012 16:43:01 +0000 (09:43 -0700)]
Fix issue #7271589: Cannot set Ocean HD live wallpaper

Change-Id: Id7662c503815293040c240232a6622bd6f6eab37

11 years agoAdd Fence::waitForever which logs a warning timeout, and use it
Jesse Hall [Mon, 1 Oct 2012 21:05:20 +0000 (14:05 -0700)]
Add Fence::waitForever which logs a warning timeout, and use it

Bug: 7217641
Change-Id: If0c1a613ead307c4045a47824174bf40c72bc7d7

11 years agoRevert "improve sensor fusion" -- DO NOT MERGE
Mathias Agopian [Tue, 2 Oct 2012 03:23:55 +0000 (20:23 -0700)]
Revert "improve sensor fusion" -- DO NOT MERGE

This reverts commit bdf277355dcd647bd5d27b38fc107243a2247a02.
This reverts commit dc5b63e40ee697324d39fe105d6f12c2bb031fc6.

it might be responsible for a regression that makes the
rotation vector spin.

Bug: 7267330
Change-Id: Ifb10e933537e70c1d85a7ba73a7e3ae59002fe62

11 years agoMerge "Include Global table in bugreports." into jb-mr1-dev
Jeff Sharkey [Mon, 1 Oct 2012 20:08:21 +0000 (13:08 -0700)]
Merge "Include Global table in bugreports." into jb-mr1-dev

11 years agoInclude Global table in bugreports.
Jeff Sharkey [Mon, 1 Oct 2012 19:52:42 +0000 (12:52 -0700)]
Include Global table in bugreports.

Bug: 7257648
Change-Id: I84c7230fd115cf9d7269bc5367026b52cbcc86ac

11 years agoSurfaceFlinger: reset the FB_TGT acquire fence
Jamie Gennis [Mon, 1 Oct 2012 03:02:03 +0000 (20:02 -0700)]
SurfaceFlinger: reset the FB_TGT acquire fence

This change makes SurfaceFlinger reset the acquire fence fd to -1 after each
call to HWComposer::commit.  The HWComposer implementation is resonsible for
closing the fd, so SurfaceFlinger should make sure not to pass it to HWC
multiple times.

Change-Id: I79554d9f6d6ef2b77d632d40251516c1f5b16ddb
Bug: 7258954

11 years agoMerge "Fix issue #7257947: Need to fix heap limits on Mako" into jb-mr1-dev
Dianne Hackborn [Mon, 1 Oct 2012 18:38:19 +0000 (11:38 -0700)]
Merge "Fix issue #7257947: Need to fix heap limits on Mako" into jb-mr1-dev

11 years agosave/restore viewport properly when taking screenshot
Mathias Agopian [Sun, 30 Sep 2012 23:43:20 +0000 (16:43 -0700)]
save/restore viewport properly when taking screenshot

Bug: 7241739
Change-Id: Iba8b9ffc75ab47fbc56169e65da26d96850a9297

11 years agoFix issue #7257947: Need to fix heap limits on Mako
Dianne Hackborn [Sun, 30 Sep 2012 23:20:34 +0000 (16:20 -0700)]
Fix issue #7257947: Need to fix heap limits on Mako

Change-Id: Id8014b19195b8740bccf000ab66c1b599ba3a1a0

11 years agoreset GL viewport and project when caputring the screen
Mathias Agopian [Fri, 28 Sep 2012 08:00:47 +0000 (01:00 -0700)]
reset GL viewport and project when caputring the screen

Bug: 7241739
Change-Id: I3bb5214b070384de9be2026647865c6c236a4331

11 years agoPass display arg to blank/unblank
Andy McFadden [Thu, 27 Sep 2012 23:02:06 +0000 (16:02 -0700)]
Pass display arg to blank/unblank

This allows us to blank and unblank displays other than the built-in
display (e.g. HDMI).

Bug: 7240511
Change-Id: I89ea13f9e497be74c3e1231d0c62fb558e93e0f8

11 years agoMerge "Re-enable FAST_TLS in gl2 code" into jb-mr1-dev
Chet Haase [Fri, 28 Sep 2012 19:38:29 +0000 (12:38 -0700)]
Merge "Re-enable FAST_TLS in gl2 code" into jb-mr1-dev

11 years agoMerge "Add a way to configure an OMX encoder to emit SPS/PPS before IDR frames."...
Andreas Huber [Fri, 28 Sep 2012 19:31:32 +0000 (12:31 -0700)]
Merge "Add a way to configure an OMX encoder to emit SPS/PPS before IDR frames." into jb-mr1-dev

11 years agoRe-enable FAST_TLS in gl2 code
Chet Haase [Fri, 28 Sep 2012 18:56:48 +0000 (11:56 -0700)]
Re-enable FAST_TLS in gl2 code

Temporarily changed USE_FAST_TLS_KEY ifdef during debugging. Changing it
back now.

Change-Id: I7c2fcf7265b3d545e31ff7683bd7614100fad3e5

11 years agoAdd a way to configure an OMX encoder to emit SPS/PPS before IDR frames.
Andreas Huber [Fri, 28 Sep 2012 18:32:16 +0000 (11:32 -0700)]
Add a way to configure an OMX encoder to emit SPS/PPS before IDR frames.

Change-Id: I71ce254533c8e99bc54d199d8a9828397fe3d99d
related-to-bug: 7245308

11 years agoSurfaceFlinger: don't always set HWC_GEOM_CHGD
Jamie Gennis [Wed, 26 Sep 2012 03:26:00 +0000 (20:26 -0700)]
SurfaceFlinger: don't always set HWC_GEOM_CHGD

This change fixes a bug in SurfaceFlinger that caused the HWC_GEOMETRY_CHANGED
flag to be set every flip.

Change-Id: I4f395a2883bcbb53b23b3d14941aff108739c9f0
Bug: 7234237

11 years agoMerge "New compile-time flags to make debugging easier for us poor souls Bug #7195815...
Romain Guy [Thu, 27 Sep 2012 23:04:03 +0000 (16:04 -0700)]
Merge "New compile-time flags to make debugging easier for us poor souls Bug #7195815" into jb-mr1-dev

11 years agoRevert "Compatibility work around for bad graphics driver dependency."
Iliyan Malchev [Thu, 27 Sep 2012 22:08:29 +0000 (15:08 -0700)]
Revert "Compatibility work around for bad graphics driver dependency."

This reverts commit a50b51c03aca449920fc8581a738032a7bce7150

Change-Id: Ibdcd776a7f241dbb2475403ea04f939249774c41

11 years agoNew compile-time flags to make debugging easier for us poor souls
Romain Guy [Thu, 27 Sep 2012 22:47:10 +0000 (15:47 -0700)]
New compile-time flags to make debugging easier for us poor souls
Bug #7195815

Change-Id: I23e7ac991891b9586cb8ed20b1305c8b1b3e2b43

11 years agoMerge "assert -eng builds when calling a GL function without a context" into jb-mr1-dev
Mathias Agopian [Thu, 27 Sep 2012 01:48:54 +0000 (18:48 -0700)]
Merge "assert -eng builds when calling a GL function without a context" into jb-mr1-dev

11 years agoassert -eng builds when calling a GL function without a context
Mathias Agopian [Thu, 27 Sep 2012 00:19:48 +0000 (17:19 -0700)]
assert -eng builds when calling a GL function without a context

Bug: 7241626

Change-Id: I0f1f9361e75e9186af8cff8d98a7d2224b266765

11 years agoMerge "Recompute visible regions more vigorously" into jb-mr1-dev
Andy McFadden [Thu, 27 Sep 2012 00:27:42 +0000 (17:27 -0700)]
Merge "Recompute visible regions more vigorously" into jb-mr1-dev

11 years agoRecompute visible regions more vigorously
Andy McFadden [Wed, 26 Sep 2012 23:19:12 +0000 (16:19 -0700)]
Recompute visible regions more vigorously

Some of the code in latchBuffer was calling invalidateHwcGeometry,
but that didn't cause the SurfaceFlinger visible region code to
re-evaluate the layer's visibility.  Set the recomputeVisibleRegions
"out" parameter instead.

Bug 7235797

Change-Id: If6ba33fbd1a594cd64cc5253aebf752d6ceda1c9

11 years agoStop using transparent region for computing visible regions
Jesse Hall [Tue, 25 Sep 2012 20:25:04 +0000 (13:25 -0700)]
Stop using transparent region for computing visible regions

The transparent region hint is computed only from view layout
locations, ignoring post-layout translation. If a SurfaceView is layed
out with no other views above it, but a view is moved above it
post-layout, that view's layout bounds would be subtracted from the
window's transparent region instead of its drawing bounds. Prior to
this change, the view would not be visible (except where its layout
bounds and drawing bounds overlap).

With this change, composition uses visible regions computed without
regard to the transparent regions. However, if all of a layer's
visible region is transparent, it will be removed from the list of
layers to composite. This doesn't fix the root problem of incorrect
transparent regions, and doesn't prevent bad composition in all cases.
But it does avoid it for some existing apps, whiel still allowing the
transparent region hint to save power in the important
fullscreen-video-in-a-SurfaceView case.

Bug: 7179570
Change-Id: I47cf939e12129b167afa344b8b036e8827103ac8

11 years agoMerge "add support for EGL_FRAMEBUFFER_TARGET_ANDROID" into jb-mr1-dev
Mathias Agopian [Wed, 26 Sep 2012 05:56:29 +0000 (22:56 -0700)]
Merge "add support for EGL_FRAMEBUFFER_TARGET_ANDROID" into jb-mr1-dev

11 years agoonly abort when errors happen on the main display
Mathias Agopian [Wed, 26 Sep 2012 02:16:28 +0000 (19:16 -0700)]
only abort when errors happen on the main display

Bug: 7232690
Change-Id: I2c4b35a82f131da26deea738ef294e100e536d15

11 years agoadd support for EGL_FRAMEBUFFER_TARGET_ANDROID
Mathias Agopian [Wed, 26 Sep 2012 01:24:31 +0000 (18:24 -0700)]
add support for EGL_FRAMEBUFFER_TARGET_ANDROID

we now try first with EGL_FRAMEBUFFER_TARGET_ANDROID, and
pick the first config we find. Otherwise, we revert to
the old algorithm.

Bug: 7232584

Change-Id: I8d5c5a4ce48420832c2e2828718a8f53325effb0

11 years agofix a crasher when running out of memory
Mathias Agopian [Tue, 25 Sep 2012 22:28:44 +0000 (15:28 -0700)]
fix a crasher when running out of memory

MemoryHeapBase::getBase() returns MAP_FAILED in case or
OOM, not null which is what SF was checking against.

This addresses one of the issues of bug 7230543.

Bug: 7230543
Change-Id: I763a88f64a2f9ff75eb139cfbaf9a1a9746c5577

11 years agoWhen "show visible regions" is enabled we were missing a call to HWC
Mathias Agopian [Tue, 25 Sep 2012 04:27:29 +0000 (21:27 -0700)]
When "show visible regions" is enabled we were missing a call to HWC

Bug: 7204034
Change-Id: I64dd78362fa75149513a7d9ff92dde175e9b4958

11 years agoMerge "Show build config in dumpsys SurfaceFlinger" into jb-mr1-dev
Andy McFadden [Tue, 25 Sep 2012 20:48:15 +0000 (13:48 -0700)]
Merge "Show build config in dumpsys SurfaceFlinger" into jb-mr1-dev

11 years agoMerge "Configure GC free to be 8MB for devices with >512MB RAM." into jb-mr1-dev
Ian Rogers [Tue, 25 Sep 2012 18:36:22 +0000 (11:36 -0700)]
Merge "Configure GC free to be 8MB for devices with >512MB RAM." into jb-mr1-dev

11 years agoShow build config in dumpsys SurfaceFlinger
Andy McFadden [Tue, 25 Sep 2012 02:07:20 +0000 (19:07 -0700)]
Show build config in dumpsys SurfaceFlinger

This adds a line to the "dumpsys SurfaceFlinger" output that shows
build-time configuration values.

Example:
 Build configuration: [sf HAS_CONTEXT_PRIORITY] [libui] \
  [libgui USE_FENCE_SYNC]

Bug 7206633

Change-Id: Ibe1856b459d34a4be6ee83a4ebfd2807e6cc68a0

11 years agofix Layer croping in SurfaceFlinger
Mathias Agopian [Tue, 25 Sep 2012 05:01:01 +0000 (22:01 -0700)]
fix Layer croping in SurfaceFlinger

Bug: 7224628
Change-Id: I9421f0a06b9a27fe00eefaa1dfab8c4309c380c9

11 years agofix a crasher in SurfaceTexture's setFilteringEnabled
Mathias Agopian [Tue, 25 Sep 2012 02:26:11 +0000 (19:26 -0700)]
fix a crasher in SurfaceTexture's setFilteringEnabled

bug: 7211067
Change-Id: Id8658a8df429d76c20ab9112858b38e52343dc9c

11 years agoMerge changes I47cd25c9,I7638ffe8 into jb-mr1-dev
Mathias Agopian [Tue, 25 Sep 2012 01:31:48 +0000 (18:31 -0700)]
Merge changes I47cd25c9,I7638ffe8 into jb-mr1-dev

* changes:
  don't call eglMakeCurrent() before calling HWC commit() on HWC 1.1
  handle EGL errors

11 years agoMerge "EGL: add the EGL_ANDROID_framebuffer_target enum" into jb-mr1-dev
Jamie Gennis [Tue, 25 Sep 2012 01:21:13 +0000 (18:21 -0700)]
Merge "EGL: add the EGL_ANDROID_framebuffer_target enum" into jb-mr1-dev

11 years agoMerge "EGL: expose the EXT_create_context_robustness ext" into jb-mr1-dev
Jamie Gennis [Tue, 25 Sep 2012 01:20:51 +0000 (18:20 -0700)]
Merge "EGL: expose the EXT_create_context_robustness ext" into jb-mr1-dev

11 years agodon't call eglMakeCurrent() before calling HWC commit() on HWC 1.1
Mathias Agopian [Tue, 25 Sep 2012 01:12:35 +0000 (18:12 -0700)]
don't call eglMakeCurrent() before calling HWC commit() on HWC 1.1

this call is not needed and misleading on HWC 1.1; it can also have
a negative performance impact when multiple displays are used.

Bug: 7124069
Change-Id: I47cd25c9d6e69abcc9333b9ecd5044e8fb1919ec

11 years agohandle EGL errors
Mathias Agopian [Tue, 25 Sep 2012 01:07:21 +0000 (18:07 -0700)]
handle EGL errors

for now we just restart the runtime.

bug: 7225248
Change-Id: I7638ffe82075a4db9e7e6f9e35cf48afcb5a387a

11 years agolog an error when eglCreateContext() fails in an inconsistant way
Mathias Agopian [Tue, 25 Sep 2012 00:57:48 +0000 (17:57 -0700)]
log an error when eglCreateContext() fails in an inconsistant way

this will help debugging bug: 7216919

Change-Id: I54ac65f20c5ed55cc93a5cbc5350fadfb0fcb804

11 years agoEGL: add the EGL_ANDROID_framebuffer_target enum
Jamie Gennis [Mon, 24 Sep 2012 20:34:18 +0000 (13:34 -0700)]
EGL: add the EGL_ANDROID_framebuffer_target enum

Change-Id: Id8b1b114e2a7a88956b857c63a0429e9b33fdb5c

11 years agoEGL: expose the EXT_create_context_robustness ext
Jamie Gennis [Thu, 20 Sep 2012 22:47:44 +0000 (15:47 -0700)]
EGL: expose the EXT_create_context_robustness ext

Change-Id: I1db43e96aa5e9e91a6176a4a3e5aa9d1f3ee4a7e