1656 Commits

Author SHA1 Message Date
Mathias Agopian
88bccab35c am d3fcd0a1: Merge "minor clean-up. SurfaceFlinger doesn\'t need libpixelflinger.so. (DO NOT MERGE)" into gingerbread
* commit 'd3fcd0a1c923498921107bb44fbc8b24582a170a':
  minor clean-up. SurfaceFlinger doesn't need libpixelflinger.so. (DO NOT MERGE)
2011-01-25 14:46:22 -08:00
Mathias Agopian
21956040a7 fix [3361121] hang in glClear() - device unresponsive, OTA fails (DO NOT MERGE)
Generally we never want to lock a buffer for write access if it is at
the "head" on the surfaceflinger side. The only exception (1) is when
the buffer is not currently in use AND there is at least one queued
buffer -- in which case, SurfaceFlinger will never use said buffer
anymore, because on the next composition around, it will be able to
retire the first queued buffer.

The logic above relies on SurfaceFlinger always retiring
and locking a buffer before composition -- unfortunately this
didn't happen during a screenshot.

This could leave us in a situation where a buffer is locked by the
application for write, and used by SurfaceFlinger for texturing,
causing a hang.

Here, we fix this issue by never assuming the exception (1), it was
intended as an optimization allowing ANativeWindow::lockBuffer() to
return sooner and was justified when most of SF composition was
done in software. The actual buffer locking is now ensured by
gralloc. We could have handled screenshots in a similar way to
a regular composition, but it could have caused glitches on screen,
essentially, taking a screenshot could cause to skip a frame.

now that we removed the notion of a "inUse" buffer in surfaceflinger
a lot of code can be simplified / removed.

noteworthy, the whole concept of "unlockClient" wrt. "compositionComplete"
is also gone.
2011-01-25 14:19:13 -08:00
Mathias Agopian
728d849fc9 minor clean-up. SurfaceFlinger doesn't need libpixelflinger.so. (DO NOT MERGE)
Change-Id: I1ddbbbec4fa5b2521ef3787bc28efe1bc90d0060
2011-01-25 14:18:15 -08:00
Chet Haase
3873da3c6e am 2acb67ec: am 67005b05: Merge "Use optimized display lists for all hwaccelerated rendering" into honeycomb
* commit '2acb67ec9fe34316231519373f59dfb76c03d57b':
  Use optimized display lists for all hwaccelerated rendering
2011-01-24 13:30:37 -08:00
Chet Haase
2acb67ec9f am 67005b05: Merge "Use optimized display lists for all hwaccelerated rendering" into honeycomb
* commit '67005b05cc76a38a5b3bf6e83957dd03619e9126':
  Use optimized display lists for all hwaccelerated rendering
2011-01-24 11:15:51 -08:00
Chet Haase
daf98e941e Use optimized display lists for all hwaccelerated rendering
Previously, display lists were used only if hardware acceleration
was enabled for an application (hardwareAccelerated=true) *and* if
setDrawingCacheEnabled(true) was called. This change makes the framework
use display lists for all views in an application if hardware acceleration
is enabled.

In addition, display list renderering has been optimized so that
any view's recreation of its own display list (which is necessary whenever
the visuals of that view change) will not cause any other display list
in its parent hierarchy to change. Instead, when there are any visual
changes in the hierarchy, only those views which need to have new
display list content will recreate their display lists.

This optimization works by caching display list references in each
parent display list (so the container of some child will refer to its
child's display list by a reference to the child's display list). Then when
a view needs to recreate its display list, it will do so inside the same
display list object. This will cause the content to get refreshed, but not
the reference to that content. Then when the view hierarchy is redrawn,
it will automatically pick up the new content from the old reference.

This optimization will not necessarily improve performance when applications
need to update the entire view hierarchy or redraw the entire screen, but it does
show significant improvements when redrawing only a portion of the screen,
especially when the regions that are not refreshed are complex and time-
consuming to redraw.

Change-Id: I68d21cac6a224a05703070ec85253220cb001eb4
2011-01-24 08:43:20 -08:00
Jeff Brown
c3563eb9e7 am 265cf2e7: Merge "Fix getSwitchState."
* commit '265cf2e76bef9ee369a7d43d567a22a0c39355ef':
  Fix getSwitchState.
2011-01-22 21:32:58 -08:00
Andreas Huber
0bb0b8b356 am 3564d9ea: am 63d64a14: Merge "Properly rotate video that\'s marked as such and decoded to a surface." into honeycomb
* commit '3564d9eada7ae3f40bc4c80272fbbb867f04e018':
  Properly rotate video that's marked as such and decoded to a surface.
2011-01-21 14:47:15 -08:00
Andreas Huber
3564d9eada am 63d64a14: Merge "Properly rotate video that\'s marked as such and decoded to a surface." into honeycomb
* commit '63d64a14790ae21db31b60747864b4a7565b33c3':
  Properly rotate video that's marked as such and decoded to a surface.
2011-01-21 14:44:21 -08:00
Andreas Huber
5e9dc94a3c Properly rotate video that's marked as such and decoded to a surface.
Change-Id: I1e9144db3447e58c99aac3f47702ad471678789c
related-to-bug: 3378148
2011-01-21 14:32:31 -08:00
Andreas Huber
149234e91e am 9a62d902: am 05aa0827: Merge "Some tweaks to HTTP live / nuplayer behaviour" into honeycomb
* commit '9a62d902ead8f94fa0ce071300e3767bfb976d8b':
  Some tweaks to HTTP live / nuplayer behaviour
2011-01-21 13:19:42 -08:00
Andreas Huber
9a62d902ea am 05aa0827: Merge "Some tweaks to HTTP live / nuplayer behaviour" into honeycomb
* commit '05aa082770d812c5921d6b2f9b3559f1fd1536a8':
  Some tweaks to HTTP live / nuplayer behaviour
2011-01-21 13:17:42 -08:00
Andreas Huber
19922adceb Some tweaks to HTTP live / nuplayer behaviour
- play audio-only streams again
- workaround for malformed streams that switch PIDs across bandwidths
- attempt to pick a different bandwidth stream if the previously chosen one appears
  to be malformed/unsupported.

Change-Id: I426d0a40dc725aa242f619d4c9d048b69aca55c9
related-to-bug: 2368598
2011-01-21 10:34:40 -08:00
Mathias Agopian
ea870e0af4 am 612d7f3c: am a423d868: Merge "clean-up unneeded code" into honeycomb
* commit '612d7f3c092ec2c4a2ae44cb09d6dfb4e525a659':
  clean-up unneeded code
2011-01-20 17:25:14 -08:00
Mathias Agopian
612d7f3c09 am a423d868: Merge "clean-up unneeded code" into honeycomb
* commit 'a423d868009b9961597365ce7f190aef23f4b1cc':
  clean-up unneeded code
2011-01-20 17:03:46 -08:00
Mathias Agopian
a423d86800 Merge "clean-up unneeded code" into honeycomb 2011-01-20 12:25:26 -08:00
Mathias Agopian
1d4549ab03 clean-up unneeded code
now that we removed the notion of a "inUse" buffer in surfaceflinger
a lot of code can be simplified / removed.

noteworthy, the whole concept of "unlockClient" wrt. "compositionComplete"
is also gone.

Change-Id: I210413d4c8c0998dae05c8620ebfc895d3e6233d
2011-01-20 12:10:11 -08:00
Jeff Brown
3d822cda1e Fix getSwitchState.
InputReader::getSwitchState always returns AKEY_STATE_UNKNOWN
because SwitchInputMapper::getSources() returns 0 which cannot
match any source mask including AINPUT_SOURCE_ANY.  As a result
initial lid switch detection is broken.

This change adds a new source constant AINPUT_SOURCE_SWITCH
that indicates that the source has switches.

Change-Id: I5321ecf0ce84f1c2b4535f6c163d3f4dcf9b7a9b
2011-01-19 20:35:47 -08:00
Jeff Brown
e155bd0fcb am 5f668c6e: am 8b9df978: Merge "Fix getSwitchState." into honeycomb
* commit '5f668c6e6bb2515325632691a804a7c8f24ebb09':
  Fix getSwitchState.
2011-01-19 18:58:28 -08:00
Jeff Brown
5f668c6e6b am 8b9df978: Merge "Fix getSwitchState." into honeycomb
* commit '8b9df97826f94e2e871eff734b174a4752b0d5f9':
  Fix getSwitchState.
2011-01-19 18:55:51 -08:00
Jeff Brown
89de57a8d2 Fix getSwitchState.
InputReader::getSwitchState always returns AKEY_STATE_UNKNOWN
because SwitchInputMapper::getSources() returns 0 which cannot
match any source mask including AINPUT_SOURCE_ANY.  As a result
initial lid switch detection is broken.

This change adds a new source constant AINPUT_SOURCE_SWITCH
that indicates that the source has switches.

Change-Id: I5321ecf0ce84f1c2b4535f6c163d3f4dcf9b7a9b
2011-01-19 18:41:38 -08:00
James Dong
a2a3ea5dda am 1324e3b1: am 4061c9aa: Merge "Fix the presentation video resolution when it is different from the actual image resolution of the video." into honeycomb
* commit '1324e3b1a4246f77d516b37fa98013ffad91268e':
  Fix the presentation video resolution when it is different from the actual image resolution of the video.
2011-01-19 10:09:01 -08:00
James Dong
1324e3b1a4 am 4061c9aa: Merge "Fix the presentation video resolution when it is different from the actual image resolution of the video." into honeycomb
* commit '4061c9aa6d77bd7ad3b43d898b3e55fd62f57f18':
  Fix the presentation video resolution when it is different from the actual image resolution of the video.
2011-01-19 10:06:23 -08:00
James Dong
08adfd29ae Fix the presentation video resolution when it is different from the actual image resolution of the video.
bug - 3352413

Change-Id: I8f08f3896e9fb90f09119dccdb88b82af60f79f2
2011-01-19 08:33:07 -08:00
Jeff Brown
b26c516c03 am 41395459: Merge "Filter virtual keys after touches. (DO NOT MERGE)" into gingerbread
* commit '41395459e676cf9ab4059e08446656f145662c2d':
  Filter virtual keys after touches.  (DO NOT MERGE)
2011-01-18 14:38:27 -08:00
Jeff Brown
41395459e6 Merge "Filter virtual keys after touches. (DO NOT MERGE)" into gingerbread 2011-01-18 14:31:31 -08:00
Jeff Brown
0f6226b9f4 Merge "Add joystick support to framework." 2011-01-17 15:57:44 -08:00
Jeff Brown
cb1404e456 Add joystick support to framework.
Change-Id: I95374436708752e1a9cff3f85c5b9bc3e0987961
2011-01-17 13:51:00 -08:00
Dharmaray Kundargi
bf6ccb04b9 am 307003a8: Merge "integrate videoeditor preview player." into honeycomb
* commit '307003a844c90458bcfd7398c44bbae734936238':
  integrate videoeditor preview player.
2011-01-17 11:40:16 -08:00
Dharmaray Kundargi
307003a844 Merge "integrate videoeditor preview player." into honeycomb 2011-01-17 10:52:23 -08:00
Jamie Gennis
d97ea28b48 am cf18c478: Merge "Implement SurfaceTexture frame-available callback." into honeycomb
* commit 'cf18c4788af740773c9b2720a1c4ed5f45454b8e':
  Implement SurfaceTexture frame-available callback.
2011-01-16 18:17:34 -08:00
Jamie Gennis
376590d668 Implement SurfaceTexture frame-available callback.
This change implements the onFrameAvailable callback for the
SurfaceTexture java class.  It includes the C++ SurfaceTexture code as
well as the JNI and Java code to enable the callback.

Change-Id: Ifd8b8e7ad46ee70cba6da1c2e96dab8045d1ea30
2011-01-16 17:28:39 -08:00
Dharmaray Kundargi
3b3cddccc1 integrate videoeditor preview player.
Change-Id: I83084f494605c8e6f4d198afa8c36f9e29579667
2011-01-16 16:43:20 -08:00
Mathias Agopian
ceaf8ac31c am a7393dd6: Merge "Fix error reporting in Surface::cancelBuffer()" into honeycomb
* commit 'a7393dd66f0127c8acdd5f8928b0c2d0de602275':
  Fix error reporting in Surface::cancelBuffer()
2011-01-14 19:29:40 -08:00
Mathias Agopian
a7393dd66f Merge "Fix error reporting in Surface::cancelBuffer()" into honeycomb 2011-01-14 19:27:32 -08:00
Jean-Baptiste Queru
9286cfe501 merge 83fdc69e from gingerbread - do not merge
Change-Id: Ib1e9e12244a44f75a93d66142e71915de6386680
2011-01-14 18:33:51 -08:00
Mathias Agopian
afc724b907 Fix error reporting in Surface::cancelBuffer()
when we validate the surface there, most errors are in fact allowed
because it is legal to cancel a buffer after a surface has been
destroyed (for instance). in that case make sure to not log
error messages as they are very confusing.

Change-Id: Iecdfbaf6d9ee5da54d56cd7ea7a0d430c30934b0
2011-01-14 11:04:34 -08:00
Jamie Gennis
202b603dc1 am 3defffe0: Merge "Fix remote GraphicBuffer allocation in SurfaceFlinger." into honeycomb
* commit '3defffe06e6989506698ecdce1be3149a33774c1':
  Fix remote GraphicBuffer allocation in SurfaceFlinger.
2011-01-13 13:00:10 -08:00
Jamie Gennis
f7acf162f8 Fix remote GraphicBuffer allocation in SurfaceFlinger.
This change fixes a horrible hack that I did to allow application
processes to create GraphicBuffer objects by making a binder call to
SurfaceFlinger.  This change introduces a new binder interface
specifically for doing this, and does it in such a way that
SurfaceFlinger will maintain a reference to the buffers until the app is
done with them.

Change-Id: Icb240397c6c206d7f69124c1497a829f051cb49b
2011-01-13 12:19:04 -08:00
Jason parks
282e1c4ffa am 21f62b9e: Merge "Add a method enable encryption." into honeycomb
* commit '21f62b9e461416ae61c8471f7199f104f8fe33de':
  Add a method enable encryption.
2011-01-13 07:44:55 -08:00
Jason parks
21f62b9e46 Merge "Add a method enable encryption." into honeycomb 2011-01-13 07:41:53 -08:00
James Dong
9efe47374b Squash commits of the following patches, cherry-picked from other branch - do not merge.
o Prepare for publishing MediaMetadataRetriever as public API
  step one:
  o replaced captureFrame with getFrameAtTime
  o removed getMode

o Replace MediaMetadataRetriever.captureFrame() with MediaMetadataRetriever.getFrameAtTime()
  as part of the preparation for publishing MediaMetadataRetriever as public Java API

o Remove captureFrame from MediaMetadataRetriever.java class
  It has been replaced by getFrameAtTime() method

o Replace extractAlbumArt() with getEmbeddedPicture() in MediaMetadataRetriever.java

o Publish MediaMetadataRetriever.java as public API
  o Removed setMode() methods and related mode constants
  o Removed some of the unused the metadata keys
  o Updated the javadoc
  o part of a multi-project change.

bug - 3309041

Change-Id: I2efb6e8b8d52897186b016cb4efda6862f5584c4
2011-01-12 17:12:46 -08:00
Jamie Gennis
f152f2efa6 am 103198a1: Merge "Implement crop & transform for SurfaceTexture." into honeycomb
* commit '103198a10cc22a49270a787d04b8ab484d2ec235':
  Implement crop & transform for SurfaceTexture.
2011-01-12 15:03:37 -08:00
Jamie Gennis
103198a10c Merge "Implement crop & transform for SurfaceTexture." into honeycomb 2011-01-12 14:57:29 -08:00
James Dong
999fb5a5a9 am 068b41d5: Merge "Publish MediaMetadataRetriever.java as public API" into honeycomb
* commit '068b41d5d41a4a78c96586b85ea89d464d302548':
  Publish MediaMetadataRetriever.java as public API
2011-01-12 14:35:35 -08:00
James Dong
11eab056dd Publish MediaMetadataRetriever.java as public API
o Removed setMode() methods and related mode constants
o Removed some of the unused the metadata keys
o Updated the javadoc

o part of a multi-project change.

bug - 2433195

Change-Id: I5ed167f1fd6a53cb143b7dc385b149431d434438
2011-01-12 14:14:11 -08:00
Jason parks
56aa5321fe Add a method enable encryption.
This is for testing and needs to be cleaned up.

Change-Id: I29958f2a95c7773744e61bbd23a302b752614f87
2011-01-12 16:00:23 -06:00
Jamie Gennis
b598fb9072 Implement crop & transform for SurfaceTexture.
This change adds support for the setCrop and setTransform methods of the
SurfaceTexture C++ class.  The crop and transform for the current
texture will be accessed by applications as a single texture coordinate
transform matrix.

Change-Id: I6482bf96f680e5c175364e848936db3908d6c8f8
2011-01-12 11:28:38 -08:00
Jeff Brown
6f71d0fedb Filter virtual keys after touches. (DO NOT MERGE)
Adds a new virtualKeyQuietTimeMillis configuration resource that sets
the duration for which virtual keys will be dropped after recent touches
on screen.  The default value is 0; it is intended to be overridden
per device using a resource overlay.

This change is designed to help in two cases:

1. Swipes from touchscreen into virtual key area.
2. Accidental taps in virtual key area while using on-screen keyboard.

Bug: 3089163
Change-Id: Id6733c83c2e2bc8d9553aa0e5c1fd74b741bec6e
2011-01-11 20:56:04 -08:00
Gloria Wang
3b7983cfea am 9e0bb6d5: am 0544d059: Merge "DRM Framework bug fixes."
* commit '9e0bb6d5eef5dfe2da60c50f3aaa39512307d11d':
  DRM Framework bug fixes.
2011-01-11 14:55:56 -08:00