Commit Graph

46661 Commits

Author SHA1 Message Date
Jamie Gennis
d8e812ce6f Update ANativeWindow clients for sync
This change updates the uses of ANativeWindow to use the new ANW functions that
accept and return Sync HAL fence file descriptors.

Change-Id: I3ca648b6ac33f7360e86754f924aa072f95242f6
2012-06-20 15:48:30 -07:00
Jamie Gennis
f25e183a70 libui: add the Fence class
This change adds the Fence class to libui for to wrap the libsync
functionality.

Change-Id: I93a31baeee608b93c14da807a32013dabf783f84
2012-06-20 15:48:30 -07:00
Mathias Agopian
aa049f0d19 am 8aaf3e47: am a67e418e: Exit boot animation cleanly.
* commit '8aaf3e47a51aa0beebecc8c536504d310d07cda9':
  Exit boot animation cleanly.
2012-06-20 13:39:58 -07:00
Mathias Agopian
8aaf3e47a5 am a67e418e: Exit boot animation cleanly.
* commit 'a67e418e1fda219f6cc0a7e420bcf5cc4f9fe710':
  Exit boot animation cleanly.
2012-06-20 13:37:09 -07:00
Mathias Agopian
a67e418e1f Exit boot animation cleanly.
The desc.txt file can now mark parts as 'must finish cleanly' by using
'c' as the part line prefix rather than 'p'.  If so indicated, if the
bootanimation is asked to quit it will do so only after waiting to
finish that part.

I considered either making init.c service killing smarter or promoting
bootanim to be a bindable service with a requestExit method.  However,
these changes are probably too big/risky given our ship date.  So
I used a property as a mailbox between SurfaceFlinger and bootanim.

Bug: 6679877
Change-Id: Id7dca22caa50b450fff25ca94f7242d971034f41
2012-06-19 17:32:00 -07:00
Jesse Hall
549646d29f Merge "Add support for HWC_DEVICE_API_VERSION_1_0" 2012-06-19 08:55:12 -07:00
The Android Open Source Project
543ed967ad am fb05c7c3: Reconcile with jb-release
* commit 'fb05c7c34b45e468103b399ef60763e235dd6e06':
  SF could get stuck waiting for vsync when turning the screen off
2012-06-19 06:16:15 -07:00
The Android Open Source Project
fb05c7c34b Reconcile with jb-release
Change-Id: I6a74f5247794a5dddd6fbb75b2edbaba06674ab7
2012-06-19 06:13:43 -07:00
Mathias Agopian
5df996211d fix typo in makefile LOCAL_CFLAGS was spelled LOCAL_CLFAGS
Change-Id: I58b96d28f608ce16fcad5ed0efb887e582779e03
2012-06-18 17:27:56 -07:00
Mathias Agopian
db403e8ff0 split-up Client.h out of SurfaceFlinger.h
Change-Id: I1993bf23e417163749d886283563a93d50b361b4
2012-06-18 16:47:56 -07:00
Jeff Brown
d50fdb0209 am bbdad819: am 7c24b1d4: Merge "SF could get stuck waiting for vsync when turning the screen off" into jb-dev
* commit 'bbdad8193ea3a16e9f65f32f4469959577b400e9':
  SF could get stuck waiting for vsync when turning the screen off
2012-06-18 10:52:34 -07:00
Jeff Brown
bbdad8193e am 7c24b1d4: Merge "SF could get stuck waiting for vsync when turning the screen off" into jb-dev
* commit '7c24b1d4da5e13329d2105cb2f8285715d920787':
  SF could get stuck waiting for vsync when turning the screen off
2012-06-18 10:32:32 -07:00
The Android Automerger
9e39e5353c merge in jb-release history after reset to jb-dev 2012-06-16 07:03:06 -07:00
Mathias Agopian
1ffdccc46e SF could get stuck waiting for vsync when turning the screen off
When turning the screen off we could have 2 waiters on the
vsync condition: The main vsync waiter as well as one in
onScreenReleased(). We were only signaling the condition though,
so it it would be possible to wake onScreenReleased() without waking
the main vsync thread which would then be stuck in .wait().

We fix this by just using broadcast() when receiving a vsync event.

We also add a broadcast() to signal when the state of
mUseSoftwareVSync changes.  This is important particularly for
the transition from hardware to software vsync because the main
vsync waiter might have observed mUseSoftwareVSync == false
and decided to block indefinitely pending a hardware vsync
signal that will never arrive.

Removed a potentially deadlocking wait for a signal in
onScreenReleased().  The function was trying to wait for the last
vsync event from the hardware to be delivered to clients but there
was no guarantee that another thread would signal it to wake up
again afterwards.  (As far as I can tell, the only other other
thread that might wake it up at this point would be a client
application issuing a vsync request.)  We don't really need to wait
here anyhow.  It's enough to set the mUseSoftwareVSync flag,
wake up the thread loop and go.  If there was a pending vsync
timestamp from the hardware, then the thread loop will grab
it and use it then start software vsync on the next iteration.

Bug: 6672102
Change-Id: I7c6abc23bb021d1dfc94f101bd3ce18e3a81a73e
2012-06-15 16:17:06 -07:00
Mathias Agopian
d3076aca0f Merge "Implement SurfaceFlinger's ANW on top of BufferQueue" 2012-06-15 15:34:55 -07:00
Jeff Brown
7c24b1d4da Merge "SF could get stuck waiting for vsync when turning the screen off" into jb-dev 2012-06-15 15:30:35 -07:00
Mathias Agopian
7d88647473 SF could get stuck waiting for vsync when turning the screen off
When turning the screen off we could have 2 waiters on the
vsync condition: The main vsync waiter as well as one in
onScreenReleased(). We were only signaling the condition though,
so it it would be possible to wake onScreenReleased() without waking
the main vsync thread which would then be stuck in .wait().

We fix this by just using broadcast() when receiving a vsync event.

We also add a broadcast() to signal when the state of
mUseSoftwareVSync changes.  This is important particularly for
the transition from hardware to software vsync because the main
vsync waiter might have observed mUseSoftwareVSync == false
and decided to block indefinitely pending a hardware vsync
signal that will never arrive.

Removed a potentially deadlocking wait for a signal in
onScreenReleased().  The function was trying to wait for the last
vsync event from the hardware to be delivered to clients but there
was no guarantee that another thread would signal it to wake up
again afterwards.  (As far as I can tell, the only other other
thread that might wake it up at this point would be a client
application issuing a vsync request.)  We don't really need to wait
here anyhow.  It's enough to set the mUseSoftwareVSync flag,
wake up the thread loop and go.  If there was a pending vsync
timestamp from the hardware, then the thread loop will grab
it and use it then start software vsync on the next iteration.

Bug: 6672102
Change-Id: I7c6abc23bb021d1dfc94f101bd3ce18e3a81a73e
2012-06-15 14:59:31 -07:00
Jeff Brown
b6d00dcf3e am 0512af11: am 16272efb: Add ASSIST keycode.
* commit '0512af11f4b790fb032dc7c344dcdac527faf8ad':
  Add ASSIST keycode.
2012-06-15 12:00:28 -07:00
Jeff Brown
0512af11f4 am 16272efb: Add ASSIST keycode.
* commit '16272efb7af0692266fecdc53b2c6d995bf397b7':
  Add ASSIST keycode.
2012-06-15 11:57:37 -07:00
Jeff Brown
16272efb7a Add ASSIST keycode.
Bug: 6594275
Change-Id: I032b055207d16bfff93ee8a350c0dc52b9102926
2012-06-15 11:46:11 -07:00
Jesse Hall
5880cc5738 Add support for HWC_DEVICE_API_VERSION_1_0
The acquire and release fences aren't yet used; this is just support
for the new version and temporary backwards compatibility for older
versions.

Change-Id: Ia5ccc05a97c86f649042b9a35e11042fa0187e84
2012-06-14 12:35:32 -07:00
Mathias Agopian
3e8b853d67 refactor HWComposer to break dependency with the HAL headers
HWComposer must abstract the HWC HAL entirely, so that the
HAL can continue to evolve (and break binary compatibility)
without breaking SurfaceFlinger. The HWC data structure had
leaked outside of HWComposer, this is now fixed.

We now have an abstract interface that provide all the
needed functionality, HWCompose provides concrete
implementations of it based on the the HWC version.

Change-Id: I40c4676dc986b682ede5520a1c60efe64037b0bb
2012-06-14 11:56:55 -07:00
Mathias Agopian
3e87601170 Implement SurfaceFlinger's ANW on top of BufferQueue
SF now has its own implementation of ANW for the
framebuffer and it uses BufferQueue. FramebufferNativeWindow
is now only used by stand-alone apps.

Change-Id: Iddeb24087df62bd92b0f78e391dda9b97ddc859c
2012-06-13 18:07:47 -07:00
Mathias Agopian
fe6102f07c Merge "don't error out when eglTerminate()ing an already terminated display" 2012-06-13 16:27:54 -07:00
Mathias Agopian
fe98127eaa don't error out when eglTerminate()ing an already terminated display
so says the EGL specification, section 3.2

Change-Id: Ice60530f8f6e47b4e14e06d2ab8eba799a7688a6
2012-06-13 15:21:21 -07:00
Mathias Agopian
4b3e4ae045 am 1d2eb663: am 2d15fcab: Merge "reduce PB size from 2MB to 512KB" into jb-dev
* commit '1d2eb663ef5cf69aa852045c8a1c1807dfa7039e':
  reduce PB size from 2MB to 512KB
2012-06-12 13:15:10 -07:00
Mathias Agopian
1d2eb663ef am 2d15fcab: Merge "reduce PB size from 2MB to 512KB" into jb-dev
* commit '2d15fcab3e3588cfddb6c7b180faecd3eccce2e5':
  reduce PB size from 2MB to 512KB
2012-06-12 12:42:38 -07:00
The Android Automerger
23a39ef144 merge in jb-release history after reset to jb-dev 2012-06-12 11:23:05 -07:00
Mathias Agopian
2d15fcab3e Merge "reduce PB size from 2MB to 512KB" into jb-dev 2012-06-11 14:43:37 -07:00
Siva Velusamy
25f54e22cc Merge "gltrace: Fixup vertex attrib pointers only for GLES2" 2012-06-11 12:26:03 -07:00
Siva Velusamy
3ef9e9671c gltrace: Fixup vertex attrib pointers only for GLES2
Change-Id: Ibf280c2a4372ce6e598e164eef0d72b7c0a6d1c2
2012-06-11 11:16:56 -07:00
The Android Open Source Project
c2a98439e0 am 7c94f9d8: Reconcile with jb-release
* commit '7c94f9d8e07d17803c2b45ac6e115da3fe8827a4':
2012-06-11 09:25:48 -07:00
The Android Open Source Project
7c94f9d8e0 Reconcile with jb-release
Change-Id: Iac1c88f2833e67e52af2bc22a17fa93d30cb44cc
2012-06-11 09:22:35 -07:00
The Android Automerger
7f92bf2bf9 merge in jb-release history after reset to jb-dev 2012-06-11 07:02:56 -07:00
Jeff Brown
04d7eaf138 am 4f0dfaa7: am 9be7caf3: Merge "Include stack traces for certain native processes in bugreport." into jb-dev
* commit '4f0dfaa7c338870eb58d96fe40234505734db728':
  Include stack traces for certain native processes in bugreport.
2012-06-08 15:33:30 -07:00
Jeff Brown
4f0dfaa7c3 am 9be7caf3: Merge "Include stack traces for certain native processes in bugreport." into jb-dev
* commit '9be7caf380b0e2fb29b8813fb8762c2ae417ce95':
  Include stack traces for certain native processes in bugreport.
2012-06-08 15:30:38 -07:00
Jeff Brown
9be7caf380 Merge "Include stack traces for certain native processes in bugreport." into jb-dev 2012-06-08 14:38:30 -07:00
Dianne Hackborn
a39d01a79a am 66506eaa: am 49b97e20: I am having second thoughts about 512m for the large heap size.
* commit '66506eaacb8c419a4e5ce5f8de00a0b8fbe0b156':
  I am having second thoughts about 512m for the large heap size.
2012-06-08 14:23:45 -07:00
Dianne Hackborn
66506eaacb am 49b97e20: I am having second thoughts about 512m for the large heap size.
* commit '49b97e20f17af0ba98cdece2b7b93ab0a2199af4':
  I am having second thoughts about 512m for the large heap size.
2012-06-08 14:22:06 -07:00
Colin Cross
52cf768fc2 Merge "surfaceflinger: replace early suspend with binder call from PowerManager" 2012-06-08 14:14:18 -07:00
Dianne Hackborn
49b97e20f1 I am having second thoughts about 512m for the large heap size.
Let's go with 384 megs, half way between the large heap size on
Xoom and 512.

Change-Id: I4a7f2e5a8b2920b49fa53777725e24811145f5f2
2012-06-08 13:02:09 -07:00
Jeff Brown
bf7f49238d Include stack traces for certain native processes in bugreport.
Bug: 6615693
Change-Id: I64c3b3ce0bba62d9c332a795f7d979fb753dc27b
2012-06-08 11:45:00 -07:00
Magnus Strandberg
bd3ad5b23f am 1ba24574: Aligning native Parcel implementation to Java.
* commit '1ba24574b2debd3ca012adbbd77f12bed4f2d266':
  Aligning native Parcel implementation to Java.
2012-06-08 08:32:28 -07:00
Magnus Strandberg
1ba24574b2 Aligning native Parcel implementation to Java.
The Java implementation of writing the RPC response header
calculates the length of the header including the 4 bytes
specifying the header length but the native implementation
excludes the 4 bytes specifying the length from the header
length.
The native implementation has been aligned to the Java impl.

Change-Id: I325bf272a63152d8fded4cf4e51a906b5a9bfe19
2012-06-08 08:29:01 -07:00
The Android Automerger
a38f794b0d merge in jb-release history after reset to jb-dev 2012-06-08 08:20:32 -07:00
Mathias Agopian
af1cb83516 am b2c1cfbe: am 0cd545f1: sometimes we would incorrectly scale the content of a surface
* commit 'b2c1cfbe95bed419487455d1b82956f9c5b2a40c':
  sometimes we would incorrectly scale the content of a surface
2012-06-07 17:21:53 -07:00
Mathias Agopian
b2c1cfbe95 am 0cd545f1: sometimes we would incorrectly scale the content of a surface
* commit '0cd545f14261d829513e0d6e8fa5e4e4f3372b3d':
  sometimes we would incorrectly scale the content of a surface
2012-06-07 17:16:52 -07:00
Mathias Agopian
0cd545f142 sometimes we would incorrectly scale the content of a surface
this would happen when a resize was pending (ie: we have received
and processed a resize transaction but have not received a buffer
with the right size) and a new transaction came in that didn't
involve a resize, for instance a translate-only transaction.

in this case, we would incorrectly update the drawing state
with the pending size, eventhough we still don't have a buffer
for it.

the solution is quite simple, we never allow the size to propagate
from current to drawing state during the regular transaction processing
(unless we are in fixed-size mode -- meaning we don't need to have
a matching size buffer), this propagation happens later once we
receive the buffer.

Bug: 6624163
Change-Id: I11a97e4b88a7f3a0571ddcfe99c86cb04ce01a4d
2012-06-07 17:12:20 -07:00
Colin Cross
8e533069e5 surfaceflinger: replace early suspend with binder call from PowerManager
SurfaceFlinger will no longer directly synchronize with early suspend.
Instead, PowerManagerService will synchronize with SurfaceFlinger to
ensure that a black frame has been drawn on the display, and then
trigger all early suspend handlers.

Change-Id: I07acdd628440d23fdb69db94319ec5d65d3f4919
2012-06-07 16:28:30 -07:00
The Android Open Source Project
05ef75e4a0 am d7749390: Reconcile with jb-release
* commit 'd77493907eca9cb5ddbe4c72fd758211901f73e1':
2012-06-07 07:55:24 -07:00