3574 Commits

Author SHA1 Message Date
Wu-cheng Li
0175028b73 Merge "Add camera recording hint parameter." 2011-08-02 00:16:28 -07:00
Wu-cheng Li
25d8fb51da Add camera recording hint parameter.
The API is still hidden.

bug:4266229
Change-Id: I5e4c24e9e2808582aecb55ac4f1d5be3ed7e36a2
2011-08-02 14:27:58 +08:00
Shih-wei Liao
d6793460ea Merge "Finish the refactor work of bccPrepareExecutable" 2011-08-01 23:26:39 -07:00
Romain Guy
4b51247071 Merge "Reduce the amount of data cached by the gradients cache." 2011-08-01 18:57:43 -07:00
Romain Guy
6203f6c814 Reduce the amount of data cached by the gradients cache.
Change-Id: I8546f5a5ecf38031c9a40bdcc434d4c7f22da63d
2011-08-01 18:56:21 -07:00
Jeff Brown
2a2ec87b55 Merge "Refactor input reader to add stylus support. Bug: 5064702" 2011-08-01 17:48:21 -07:00
Mathias Agopian
34e1fb1ee2 Merge "connect/disconnect is now called from our EGL wrapper" 2011-08-01 16:36:02 -07:00
Romain Guy
de7c93948f Merge "Use high precision iterators on specific GPUs Bug #5098359" 2011-08-01 15:29:56 -07:00
Romain Guy
a60c388971 Use high precision iterators on specific GPUs
Bug #5098359

Change-Id: I52ee8c7b4c9e8d4c7bedb684eaf7bef6c44c74b9
2011-08-01 15:28:16 -07:00
Mathias Agopian
982d2da4ee connect/disconnect is now called from our EGL wrapper
the original connect/disconnect hooks are deprecated
and replace by api_connect/api_disconnect. the original
hooks are no no-ops.
api_connect/api_disconnect is now only called from the
android framework.

Bug: 5057915
Change-Id: I8ca64cd1acd6cabf915bf54689ec2e5f6dfa495a
2011-08-01 14:06:20 -07:00
Jamie Gennis
d356b2d5e3 Merge "SurfaceTexture: allow set_buffer_count(2)" 2011-08-01 13:25:03 -07:00
Jeff Brown
be1aa8250c Refactor input reader to add stylus support.
Bug: 5064702

Introduced the concept of an InputListener to further decouple
the InputReader from the InputDispatcher.  The InputListener
exposes just the minimum interface that the InputReader needs
to communicate with the outside world.  The InputReader
passes arguments to the InputListener by reference, which makes
it easy to queue them up.

Consolidated all of the InputReader locks into one simple global
Mutex.  The reason this wasn't done before was due to potential
re-entrance in outbound calls to the InputDispatcher.  To fix this,
the InputReader now queues up all of the events it wants to send
using a QueuedInputListener, then flushes them outside of the
critical section after all of the event processing is finished.
Removing all of the InputMapper locks greatly simplifies the
implementation.

Added tests for new stylus features such as buttons, tool types,
and hovering.

Added some helpers to BitSet32 to handle common code patterns
like finding the first marked bit and clearing it.

Fixed a bug in VelocityTracker where the wrong pointer trace
could get cleared when handling ACTION_POINTER_DOWN.  Oops.

Changed PointerCoords so it no longer stores useless zero
axis values.  Removed editAxisValue because it is not very
useful when all zero value axes are absent and therefore
cannot be edited in place.

Added dispatch of stylus hover events.

Added support for distance and tool types.

Change-Id: I4cf14d134fcb1db7d10be5f2af7b37deef8f8468
2011-07-31 15:38:09 -07:00
Jamie Gennis
d995b08353 SurfaceTexture: allow set_buffer_count(2)
This change relaxes an error check in SurfaceTexture::setBufferCount to
allow clients to explicitly set a buffer count of 2.  The clients that
will do this are camera and video decode.  Previously it was thought
that for those clients we would always use async mode, which requires a
minimum of 3 buffers.  However, we now believe that for some devices it
may make sense to use synchronous mode (with 2 buffers) to reduce memory
usage.

Bug: 5088418
Change-Id: I620a0ef75075745be9d6c8219e0246aaf33ba950
2011-07-30 16:00:11 -07:00
Logan Chien
8ce8a1af76 Finish the refactor work of bccPrepareExecutable
Rename bccPrepareExecutableEx to bccPrepareExecutable.
(These functions are the same, and we will remove
 bccPrepareExecutableEx several commits later.)

Change-Id: I519130bb3b731bf927cb92924f355d7d1ea0242c
2011-07-30 16:55:02 +08:00
Mathias Agopian
8bb824566f improve GraphicAllocator dump method
GraphicAllocator debugging cannot deal with
custom HAL formats. make this more obvious in the
log.

Change-Id: I202e58a7f213f32e725aa4eac62cdf6e50ca5894
2011-07-29 16:35:41 -07:00
Romain Guy
b50149825f Correctly apply linear filter to drawBitmap(Rect, Rect)
Change-Id: I1049282e1996b1020c92cb7bec46e9f28e94e967
2011-07-28 15:40:47 -07:00
Romain Guy
b6f7a27c59 Merge "Reclaim more memory, more often." 2011-07-27 18:53:32 -07:00
Romain Guy
65b345fa22 Reclaim more memory, more often.
Yay.

Change-Id: I04557ad575c307a55088549f48f0e9ad994b7275
2011-07-27 18:51:50 -07:00
Ying Wang
00fd1fc9b3 Merge "Fix uses of all-subdir-makefiles" 2011-07-27 18:29:26 -07:00
Ying Wang
d84d6c7b1a Fix uses of all-subdir-makefiles
We should use all-makefiles-under instead.
all-subdir-makefiles can be used only before any "include" statement.
Before this change, both subdirs were actually not included.

Change-Id: I6bf35d07f294a5012c9322096f999ac26e37432f
2011-07-27 16:59:08 -07:00
Romain Guy
c8ec222cd8 Merge "Destroy layers and flush layers cache when a window is destroyed." 2011-07-27 16:31:19 -07:00
Romain Guy
6d7475d666 Destroy layers and flush layers cache when a window is destroyed.
Change-Id: I3fa1bc3ff50fb99e3d2e490925bd6b0a0f809fff
2011-07-27 16:29:39 -07:00
Kenny Root
4f35092af5 Merge "Move extract native libraries to JNI code" 2011-07-27 15:54:51 -07:00
Jason Sams
a12036bc97 Merge "Add const to matrix by vector multiply routines. Cleanup ifdef for rsForEach." 2011-07-27 14:19:58 -07:00
Jason Sams
4575a8e4de Add const to matrix by vector multiply routines.
Cleanup ifdef for rsForEach.

Change-Id: Id0d053f5dc73fef7dffed57ed02e90340b6cb798
2011-07-27 14:10:53 -07:00
Romain Guy
eea60692b0 Improve layers debugging
Change-Id: Ia4950dd5f0e0a224ecb69c581d33aa4f32260a7c
2011-07-26 20:35:55 -07:00
Romain Guy
912a7b32d0 Make sure we have a current EGL context when invoking EGL
Bug #5081795

Change-Id: Iee3382d362a71c1e6c5c498b319bf7f7bcf5a2f0
2011-07-26 18:57:28 -07:00
Wu-cheng Li
4c2292efbb Add camera face detection API.
API are still hidden.

bug:4460717
Change-Id: I1a515061f141a89bd61c875257712789fb15d2d4
2011-07-27 05:25:35 +08:00
Mathias Agopian
686200cb5f Merge "remove dead code and member variables." 2011-07-26 12:08:07 -07:00
Kenny Root
66269ea6f6 Move extract native libraries to JNI code
The built-in ZipFile class was quite a long time to find an unpack
libraries. Move everything to using the libutils ZipFileRO class that
goes quite a bit faster. Initial measurements are 6 times faster than
the Java code.

Also, read files off the disk and compare their CRC against the APK's
CRC to see if we need to write the new file to disk. This also cuts down
the bootup time by up to a second per APK that has native files.

Change-Id: Ic464a7969a17368fb6a6b81d026888c4136c7603
2011-07-26 10:14:58 -07:00
Mathias Agopian
f3503c2c30 remove dead code and member variables.
also fix some comments and improve debugging logs.

Change-Id: I83e55309f306332b59e1ec46104c4a7fffbf3c97
2011-07-25 20:03:43 -07:00
Kenny Root
fa93052d91 am 64ed1059: am e612c881: am 4f3a8db6: am 3cf03987: Merge "Continue idmap generation even if name lookup fails."
* commit '64ed105957098a900d58e7c2598e060cb37755ce':
  Continue idmap generation even if name lookup fails.
2011-07-25 17:24:52 -07:00
Romain Guy
176f3e1b77 Merge "Improve rendering performance on some GPUs" 2011-07-25 16:38:13 -07:00
Romain Guy
e3c26851dc Improve rendering performance on some GPUs
This change sets textures filtering to GL_NEAREST by default. GL_LINEAR
filtering is only used when textures are transformed with a scale or
a rotation. This helps save a couple of fps on some GPUs.

Change-Id: I1efaa452c2c79905f00238e54d886a37203a2ac1
2011-07-25 16:36:01 -07:00
Jason Sams
c854b9c05e Merge "Add size param to rsForEach bug 5074640" 2011-07-25 14:54:49 -07:00
Jason Sams
cf57dec80b Add size param to rsForEach
bug 5074640


Change-Id: I395bd8b295beacc979681ccdd3451d9d6cc3d672
2011-07-25 12:58:37 -07:00
Kenny Root
64ed105957 am e612c881: am 4f3a8db6: am 3cf03987: Merge "Continue idmap generation even if name lookup fails."
* commit 'e612c881ecf74770098aa9c07d4f0611ac982038':
  Continue idmap generation even if name lookup fails.
2011-07-25 12:21:06 -07:00
Jamie Gennis
d50aef50f6 Merge "SurfaceTexture: enable RGB external textures" 2011-07-25 11:46:51 -07:00
Ted Bonkenburg
5518dd92d3 Merge "Add support for creating a Surface from a a SurfaceTexture." 2011-07-25 10:24:30 -07:00
Ted Bonkenburg
0de171b0d4 Add support for creating a Surface from a a SurfaceTexture.
The Surface is already using SurfaceTexture internally and it is parcelable. This
is intended to replace and phase out ParcelSurfaceTexture in favor of creating a
new Surface.java object from an existing SurfaceTexture.

Change-Id: I8e2dd86614523da6abed6403e1d705a68fa19fdf
2011-07-22 16:36:44 -07:00
Jamie Gennis
ecfa1d3a79 SurfaceTexture: enable RGB external textures
This change removes support for conditionally using the GL_TEXTURE_2D
target for SurfaceTexture textures with RGB buffers.  It also enables
and fixes the RGB-based SurfaceTexture tests.

Change-Id: I9a251a981cf66af6b048b2e4c3fe7231e4774f4d
2011-07-22 15:45:18 -07:00
Jamie Gennis
5ef59bc764 SurfaceTexture: add the abandon method.
This change adds the 'abandon' method to the SurfaceTexture C++ class.
This method may be used to put the SurfaceTexture in an abandoned state,
causing all ISurfaceTexture methods to fail.

Change-Id: Ibd261f7b73f44e2bec36a8508bf92113cfb7cf95
2011-07-22 14:20:41 -07:00
Jamie Gennis
b71a4beb1a SurfaceTexture: add a deadlock scenario test
This change adds a test to ensure that a GL driver that's blocking on a
call to dequeueBuffer does not block other GL threads from rendering and
queueing buffers.

Change-Id: Ifdd234effc534b6a9cf8522ca87f64da5bb0bbd6
2011-07-22 14:03:31 -07:00
Jamie Gennis
95b4042285 Merge changes I799532f7,I5cffa6eb
* changes:
  SurfaceTexture: fix a comment
  SurfaceTexture: remove getAllocator
2011-07-22 13:34:57 -07:00
Mathias Agopian
672a05f0cf Merge "Fix a few issues with NATIVE_WINDOW_TRANSFORM_HINT" 2011-07-21 20:34:47 -07:00
Jeff Brown
08695111cf Merge "Decouple GLES20RecordingCanvas lifetime from GLES20DisplayList. Bug: 5062011" 2011-07-21 17:44:08 -07:00
Jeff Brown
162a021756 Decouple GLES20RecordingCanvas lifetime from GLES20DisplayList.
Bug: 5062011

Previously, each GLES20DisplayList would hold onto an instance of
GLES20RecordingCanvas.  In turn, each GLES20RecordingCanvas
held onto an SkWriter with a 16Kb buffer along with several other
objects.  With one display list per view and hundreds of views,
the overhead could add up to a few megabytes.

Ensured that the GLES20RecordingCanvas is reset as soon as
the display list has been constructed, thereby promptly freeing
the 16Kb buffer.

Changed GLES20DisplayList so that it acquires a GLES20RecordingCanvas
from a pool as needed and recycles it when done.

Removed some dead code and cruft related to the construction of
GLES20Canvas objects in general.  Some code was written with the
assumption that the underlying renderer object could change
behind the scenes or might be lazily constructed, but that isn't
actually the case so we can simplify things.

Removed an unnecessary weak reference from GLES20DisplayList
to the View.  It isn't actually used anywhere.

Fixed a bug in GLES20DisplayList where isValid() would return
true while the display list was being recorded.  This is incorrect
because the native display list might not actually exist.  Worse,
even if the native display list does exist, it is stale and
potentially refers to old Bitmaps that have been GC'd (because the
mBitmaps list was cleared when recording started).

Change-Id: Ib12d5483688cb253478edeb0156d34c476c2566b
2011-07-21 17:15:48 -07:00
Mathias Agopian
45b63dd11c Fix a few issues with NATIVE_WINDOW_TRANSFORM_HINT
- fixed uninitialized variable
- set hint to indentity when transform is too complex
- make sure FrameBufferNativeWindow doesn't fail on needed perform commands

Bug: 4487161
Change-Id: I7cb2b0869b72404732eca7cb2d145ff669e2ed9b
2011-07-21 14:50:29 -07:00
Jamie Gennis
5c23a2c72d SurfaceTexture: remove getAllocator
This change removes the SurfaceTexture::getAllocator method, as it's no
longer needed.  Proper refcounting of the Gralloc buffers is now handled
by the IGraphicBufferAlloc binder marshalling code.

Change-Id: I5cffa6ebfc1bc5828fb7ce0e0a5b2f55cd8479da
2011-07-21 14:32:56 -07:00
Kenny Root
4f3a8db64d am 3cf03987: Merge "Continue idmap generation even if name lookup fails."
* commit '3cf039876177b5b314b635bb12a1dae1b42f4605':
  Continue idmap generation even if name lookup fails.
2011-07-21 13:09:05 -07:00