Commit Graph

46596 Commits

Author SHA1 Message Date
Jesse Hall
0de75f3f53 Stop using transparent region for computing visible regions (DO NOT MERGE)
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, while still allowing the
transparent region hint to save power in the important
fullscreen-video-in-a-SurfaceView case.

Change-Id: If2d929a10399b80401ef902abb232233a7f3d16d
2012-10-08 10:56:03 -07:00
Kenny Root
52f1edb3f1 Merge "Update tests for new build target" 2012-10-02 09:46:29 -07:00
Kenny Root
ed22c1cfe5 Update tests for new build target
Change-Id: Ia1740d1b2c0b611c4559c5c846b12fb5c3e81b07
2012-10-02 09:42:49 -07:00
Mathias Agopian
77af25b6dd Merge "Return back-end result from eglDestroyImageKHR" 2012-09-24 14:56:03 -07:00
Mathias Agopian
8a2b54235a Merge "libagl: Transform the vertex if using eye space lighting with point lights" 2012-09-19 19:31:53 -07:00
jp abgrall
09a22fc29d Merge "Allow disable of dumpstate vibrate" 2012-09-17 10:21:31 -07:00
John Michelau
1f794c442c Allow disable of dumpstate vibrate
Change-Id: I747b757f4b5e2d6a472b7b2a19f8c1ca8a4b7fdd
2012-09-17 11:20:19 -05:00
Steven Holte
646a5c593f Return back-end result from eglDestroyImageKHR
Change-Id: I0e972b778f9802c28f52092bb9af087285833e0b
2012-09-12 15:14:55 -07:00
Jeff Brown
d7007cd4bb Merge "Forward compatibility patch." 2012-08-27 17:26:06 -07:00
Jeff Brown
52142828ee Forward compatibility patch.
Change-Id: I8e8af0c6035aaac5e5097f1cfb198250475627ee
2012-08-27 16:44:39 -07:00
Jean-Baptiste Queru
908c8ff554 Merge "Fixed clang build error for libgui" 2012-08-27 07:55:27 -07:00
Tareq A. Siraj
114e968482 Fixed clang build error for libgui
Fixed the order of the statements in ANDROID_SINGLETON_STATIC_INSTANCE
macro so that the templated static member variable initialization
comes before the instantiation of the Singleton class. This
fixes the clang compile error.

Change-Id: Ic47d17e152b657f2dff3191ccc3770753fdf002b
Author: Tareq A. Siraj <tareq.a.siraj@intel.com>
Reviewed-by: Edwin Vane <edwin.vane@intel.com>
2012-08-23 14:08:57 -04:00
Jean-Baptiste Queru
349149b52a Merge "Fix error trap in SurfaceTexture Client" 2012-08-20 08:55:05 -07:00
Jean-Baptiste Queru
6f89ebded6 Merge "EGL: do not use sparse files for shader" 2012-08-20 08:54:42 -07:00
vijay gupta
a30cc7db8d EGL: do not use sparse files for shader
- Process is killed by system with SIGBUS signal if it writes
  data to mapped sparse file on full filesystem.
- Allocate space using write() function instead of ftruncate()
  to avoid creation of sparse files on full filesystem.
  Catch write() errors to handle out-of-space case during allocation.

Bug: http://code.google.com/p/android/issues/detail?id=35376
Change-Id: Ifc366454f34e71a43a0973eda4f591a920ea3a14
Signed-off-by: Kirill Artamonov <kartamonov@nvidia.com>
2012-07-23 14:26:57 +03:00
Martin Storsjo
d5b1cda91e libagl: Transform the vertex if using eye space lighting with point lights
This fixes lighting when using point lights, when eye space
lighting is used (which is the default).

Change-Id: I0cd0d2329893d6b5f8af3b1e595274c2076fc322
2012-07-12 16:59:20 +03:00
Steve Critchlow
47ad361cee Fix error trap in SurfaceTexture Client
There was an issue in Surface::lock where failure to lock a surface
resulted in two bad things happening:
- success was returned to the caller (it was apparently locked).
- an uninitialised pointer was returned as the buffer.

Change-Id: I8b0df81400e0fa0542a8bb993d76923ac96b686e
2012-07-10 14:09:10 +02:00
Johannes Carlsson
db1597a989 Fix shutdown sequence to avoid SIGSEGV when running am command
When the app_process is shutting down the main thread will close the
binder fd while pool threads are executing an ioctl (in
IPCThreadState::stopProcess called by AppRuntime::onStarted in
app_main.c).

The binder driver will then return all pending calls in ioctl
without any error and with a command. One of the threads gets a
BR_SPAWN_LOOPER which will create a new thread (the other thread
gets a BR_NOOP). This new thread then calls
vm->AttachCurrentThread. Usually this results in a log entry with
"AndroidRuntime: NOTE: attach of thread 'Binder Thread #3' failed",
but sometimes it also causes a SIGSEGV. This depends on the timing
between the new thread an the main thread that calls DestroyJavaVM
(in AndroidRuntime::start).

If IPCThreadState.cpp is compiled with "#define LOG_NDEBUG 0" the
pool thread will loop and hit the
ALOG_ASSERT(mProcess->mDriverFD >= 0) in
IPCThreadState::talkWithDriver.

Crashes like this has been seen when running the am command and
other commands that use the app_process.

This fix makes sure that any command that is received when the driver
fd is closed are ignored and IPCThreadState::talkWithDriver instead
returns an error which will cause the pool thread to exit and detach
itself from the vm. A check to avoid calling ioctl to a fd with -1
was also added in IPCThreadState::threadDestructor.

Another solution might be to change the binder driver so that it
returns an error when the fd is closed (or atleast not a
BR_SPAWN_LOOPER command). It might also be possible to call exit(0)
which is done when System.exit(0) is called from java.

Change-Id: I3d1f0ff64896c44be2a5994b3a90f7a06d27f429
2012-06-25 13:58:47 -07:00
The Android Open Source Project
589cdbed55 Reconcile with jb-release
Change-Id: Ic18750e72ccec1b5aad558da8959c9c4031b27f8
2012-06-22 08:17:16 -07:00
The Android Automerger
f455c9a267 merge in jb-release history after reset to jb-dev 2012-06-21 07:02:53 -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
The Android Open Source Project
fb05c7c34b Reconcile with jb-release
Change-Id: I6a74f5247794a5dddd6fbb75b2edbaba06674ab7
2012-06-19 06:13:43 -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
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
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
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
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
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
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
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
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
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
The Android Open Source Project
d77493907e Reconcile with jb-release
Change-Id: I73f561b3fb9c76aa30ff7de8eab378a1ba5963cc
2012-06-07 07:51:00 -07:00
The Android Automerger
ce786fca55 merge in jb-release history after reset to jb-dev 2012-06-07 07:03:01 -07:00
Jamie Gennis
ec07c8e957 am ba43e0a1: Merge "SurfaceFlinger: remove all GLES scissor calls." into jb-dev
* commit 'ba43e0a1faee9629ca2d0beb53dd6c44bb9bfd05':
  SurfaceFlinger: remove all GLES scissor calls.
2012-06-06 15:47:29 -07:00
Jamie Gennis
ba43e0a1fa Merge "SurfaceFlinger: remove all GLES scissor calls." into jb-dev 2012-06-06 15:45:10 -07:00
Dianne Hackborn
a586c9b18a am be502a02: Add new Dalvik memory limit definition.
* commit 'be502a02c8e0ea232e7339ed60b1754c929ecec1':
  Add new Dalvik memory limit definition.
2012-06-06 10:51:15 -07:00
Mathias Agopian
d75f84d641 reduce PB size from 2MB to 512KB
this allows us to enable h/w acceleration on low-end
devices while keeping memory usage down.

Bug: 6557760
Change-Id: I8af2de3038dc2579360b8b73aa452cb7a0e506a9
2012-06-05 21:44:43 -07:00