4297 Commits

Author SHA1 Message Date
Alex Sakhartchouk
c72cb1c2e0 Merge "State based shader recompile to support camera input." 2012-03-27 08:49:52 -07:00
Chet Haase
b85967b9af Re-enabling DisplayList properties
Several issues came up after DisplayList properties were enabled,
so they were disabled pending fixes. Those issues have been fixed, so
DisplayList properties are once again being enabled by default. This
CL both re-enables these properties (in View.java and DisplayListRenderer.h)
and fixes the various issues that enabling them caused the first time around.

Related issues (all currently marked as Fixed, though that was simply because
DL properties were disabled - this CL provides the real fixes now that
DL properties are enabled by default):
Issue #6198276 Text input broken
Issue #6198472 Native crash at pc 00076428 in many different apps in JRM80
Issue #6204173 Date/time picker isn't rendering all parts of UI
Issue #6203941 All Apps overscroll effect is rendered weirdly/has flickering
Issue #6200058 CAB rendering issue - not drawing items?
Issue #6198578 Front camera shows black screen after taking picture.
Issue #6232010 Layers not recreated when children change (DisplayList properties)

Change-Id: I8b5f9ec342208ecb20d3e6a60d26cf7c6112ec8b
2012-03-27 08:17:54 -07:00
Jamie Gennis
f82b111a6d Merge "rsdGL uses DummyConsumer" 2012-03-26 17:20:06 -07:00
Romain Guy
56485fe628 Merge "Use a status_t return type for GL functors" 2012-03-26 16:51:22 -07:00
Romain Guy
6554943a1d Use a status_t return type for GL functors
WebView needs more fine-grained control over the behavior of the
framework upon execution of the display lists. The new status_t
allows WebView to requests its functor to be re-executed directly
without causing a redraw of the entire hierarchy.

Change-Id: I97a8141dc5c6eeb6805b6024cc1e76fce07d24cc
2012-03-26 16:45:05 -07:00
Daniel Lam
ae540b9943 rsdGL uses DummyConsumer
Using a DummyConsumer instead of a SurfaceTexture avoids
errors such as BufferQueue has been abandoned due to the SurfaceTexture
going out of scope and disconnecting from the BufferQueue.

Bug: 6172739
Change-Id: I775ead2d0392a68fd0f7e724d6eb25298d2fb00d
2012-03-26 15:11:47 -07:00
Romain Guy
9dcd8c2ab1 Merge "Prevent random crashes on SGX architecture Bug #6219894" 2012-03-26 14:53:36 -07:00
Romain Guy
a9dd820184 Prevent random crashes on SGX architecture
Bug #6219894

Change-Id: If77f29da03e557a50e53bae505e1c638a1dbe2cc
2012-03-26 14:52:00 -07:00
Alex Sakhartchouk
5ff1959f95 State based shader recompile to support camera input.
Change-Id: Ia6c362571e1b44254461522a8c49a8551b46f28d
2012-03-26 13:52:24 -07:00
Glenn Kasten
30b8a65c5c mv libcpustats from frameworks/base to /native
OK to lose history

Change-Id: I05ce0452f16a396cff6e18db5424492f3a6f6861
2012-03-26 12:22:57 -07:00
Jason Sams
cbe55a1c93 Merge "Implement USAGE_IO_INPUT" 2012-03-23 13:29:17 -07:00
Jason Sams
fe1d5ffd1b Implement USAGE_IO_INPUT
Change-Id: Idbf7bb21f5ab673ad77082c5c19921d2b276c04b
2012-03-23 11:47:26 -07:00
Alex Sakhartchouk
00da68de8e Merge "Wrapping new api's with proper RS_VERSION" 2012-03-23 09:08:10 -07:00
Alex Sakhartchouk
f8338c40b7 Merge "More rearrangement and renaming." 2012-03-23 09:07:46 -07:00
Colin Cross
a982dc05d7 frameworks/base: move Zip* from libandroidfw to libutils
ZipUtils is needed by build/tools, move it from libandroidfw
(frameworks/base) to libutils (frameworks/native).

Change-Id: I2b4b7adcdf68eb25ee7cba5dd3b69eadf0523af3
2012-03-22 18:43:07 -07:00
Alex Sakhartchouk
dc60cc4253 Wrapping new api's with proper RS_VERSION
Change-Id: Ib8656cb2b6d0b8adeab15edfd704620451ce56ad
2012-03-22 16:59:38 -07:00
Alex Sakhartchouk
043f5ced1b More rearrangement and renaming.
Change-Id: Ia922c5bff1734a29b786ba95065f81c8dedf90cd
2012-03-22 10:50:55 -07:00
Chet Haase
ad13c81371 Disable DisplayList properties
DisplayList properties are (again) disabled by default, via flags in
View.java and DisplayListRenderer.h. There are various artifacts to
chase down before enabling by default.

Issue #6198472 Native crash at pc 00076428 in many different apps in JRM80
Issue #6204173 Date/time picker isn't rendering all parts of UI
Issue #6203941 All Apps overscroll effect is rendered weirdly/has flickering
Issue #6200058 CAB rendering issue - not drawing items?
Issue #6198578 Front camera shows black screen after taking picture.

Change-Id: I045dc82ce1d85fedbae3bb88eb2a2dfb6891d41f
2012-03-22 08:33:09 -07:00
Alex Sakhartchouk
b09aaeca08 Merge "Changing rsg to rs where functions don't rely on graphics." 2012-03-21 15:31:25 -07:00
Alex Sakhartchouk
8564be6d84 Merge "Breaking up rs headers by logical components." 2012-03-21 14:05:35 -07:00
Romain Guy
b0317984d3 Plug memory leak.
Bug #6196903

Whenever a memory flush happens, the GL renderer discards some or all of its
font caches. Each font cache holds an array of vertex indices that was
initially designed to have the same life cycle as the process. This changed
when memory flushes were introduced but this array was never taken care of
in the destructor.

Change-Id: Ief124f609ea55b671c0a9b43637d9e013629ebaa
2012-03-21 11:52:52 -07:00
Alex Sakhartchouk
73797e97a8 Changing rsg to rs where functions don't rely on graphics.
Change-Id: I92a93d7a520b4a5416be88c7c05c2f8d3cc89243
2012-03-21 10:21:08 -07:00
Alex Sakhartchouk
79c23f0f88 Breaking up rs headers by logical components.
Change-Id: I2d23eec0277b1136852b8a7acb61aecf6f699a7d
2012-03-21 09:58:15 -07:00
Chet Haase
bdd896c264 Enable DisplayList properties
This CL simply enables DisplayList property functionality. The code for
this feature is already there, but it's been disabled by default pending further
testing and analysis. This change sets these build-type flags to true
so that all hw-accelerated apps will now use DisplayList properties by default.

In particular, this feature enables a fast-path for changes that affect the
handful of View properties involved in animations (alpha, translationX, etc.).
Setting these properties now gets propagated to the native DisplayList associated
with the View, avoiding costly recreation of the SDK-level DisplayList and
also enabling faster invalidation of the view hierarchy.

Change-Id: Ic99c8f28fa9183f2e54e9e4860b333eb9c540f7c
2012-03-19 13:40:49 -07:00
Jason Sams
55ba267c09 Merge "Add prop to force cap compute threading." 2012-03-16 10:13:06 -07:00
Chet Haase
4bf8b20995 Merge "Optimizing DisplayList properties" 2012-03-16 09:21:14 -07:00
Chet Haase
9d1992deae Optimizing DisplayList properties
DisplayList properties are still disabled default (flags in View.java
and DisplayListRenderer.h). When they are enabled, and when a View has
a DisplayList, invalidations due to property changes are now optimized
to avoid causing DisplayList recreation. This eliminates the drawing step
of invalidation (due to changes in these properties), only requiring
issuing the previously-created DisplayList to the GL renderer. Invalidation
is slightly faster (less overhead as we walk up the hierarchy), getDisplayList()
is potentially much faster (going down to ~0ms), depending on the complexity
of the View being redrawn and the size of the invalidated hierarchy.

Change-Id: I57587d5b810c3595bdd72a6c52349c2a3d1bdf25
2012-03-16 09:14:52 -07:00
Wu-cheng Li
8d3c318b2d Merge "Add a new camera open API that allows taking the ownership." 2012-03-15 21:23:24 -07:00
Jason Sams
2791429451 Add prop to force cap compute threading.
bug=6124869

Change-Id: Ibf2cc388f3906cea2741382ff5e522e3b416393c
2012-03-15 19:18:03 -07:00
Romain Guy
acdd4b9c4b Set the default text length to -1, not 1
Change-Id: Iccf6f8366c0b659ba7c90df99ae05ebc5d81fcbb
2012-03-15 14:36:52 -07:00
Wu-cheng Li
a1c41e13b5 Add a new camera open API that allows taking the ownership.
The purpose is to let face unlock always get the camera
successfully. What happened was the camera applications may
have opened the camera in onResume under the lock screen.
This API lets face unlock take the camera from the camera
application. A new permission will be added, so other
applicatoins won't be able to take the camera from the face
unlock.

bug:5584464

Change-Id: Ib3d9dcbc2161815b68db42327dc01148453704c6
2012-03-15 14:50:48 +08:00
Glenn Kasten
81fe4fbd6b Merge "AudioFlinger playback thread CPU measurement in Hz" 2012-03-14 16:28:38 -07:00
Glenn Kasten
f57e2bceb9 AudioFlinger playback thread CPU measurement in Hz
Log statistics on CPU usage in Hz in addition to wall clock time

Use CPU statistics for all playback threads, not just MIXER
(but they are disabled by default by a compile-time debug macro).

ThreadCpuUsage library:
 - Move statistics out of the library and leave that up to the caller
 - Add API to determine a CPU's frequency

Change-Id: Ia1011123146e641fcf210ef26e78ae2b4d3b64ad
2012-03-14 16:03:01 -07:00
Jason Sams
d1c8c1292c Fix minor C++ api issues.
Change-Id: I30e12938be5da52b2d952db57a51b4deb5e27239
2012-03-14 15:36:02 -07:00
Romain Guy
67c7377ef1 Merge "Correctly compute the number of bytes written by each op. Bug #6157792" 2012-03-13 18:02:55 -07:00
Romain Guy
390f882f89 Correctly compute the number of bytes written by each op.
Bug #6157792

Previously, DisplayListRenderer would compute the number of bytes
written after a drawing op by looking at the difference between
the start pointer of the command stream and the end pointer of
the command stream. The SkWriter class used to record the commands
stream allocates blocks of storage which would cause a crash when
a command spanned two blocks.

Change-Id: I4d79d3feeb6d72d9d4e6ab05ecebd72d004be56c
2012-03-13 18:00:10 -07:00
Jason Sams
29000644ae Merge "Fix test makefile" 2012-03-13 16:54:11 -07:00
Jason Sams
759eb4e8f0 Fix test makefile
bug=5972398

Change-Id: I9298e08220863eecf5c87047a05d7aa146a4c060
2012-03-13 16:22:46 -07:00
Jeff Brown
9dc348d756 Merge "Fix spurious ANRs in native activities." 2012-03-13 15:15:48 -07:00
Jeff Brown
2b6c32ca41 Fix spurious ANRs in native activities.
Some native activities experienced ANRs when the input consumer
deferred an input event due to client-side batching.  If the
input channel was fully emptied then the client had no way of
knowing that it should wake up to handle the deferred input event.

This patch also fixes some lock issues in the native activity
input queue implementation.  In at least one error case, it
was possible for a function to exit without releasing the lock.

Bug: 6051176
Change-Id: I4d9d843237e69b9834f8d8b360031b677fcab8c3
2012-03-13 15:00:09 -07:00
Chet Haase
491189f6bb Fix garbage deref with DisplayList property structures
This is the real fix to issue 6158892. We currently delete
transform/camera structures at DisplayList destructor time, if these
structures are not NULL. We set the fields to NULL in an init() method
called (eventually) by the constructor. But it is possible for the object
to be destroyed before that init code is called, resulting in the deref
bug reported. The fi is to set these structures to NULL directly in the
constructor.

Issue 6158892i: Device runtime restarts frequently

Change-Id: Ibfa0f9314767eed6fd51f4ec7edc0d0edd5fdd0f
2012-03-13 11:42:34 -07:00
Romain Guy
3c9d9c18b4 Merge "Follow the include style used elsewhere in the library" 2012-03-13 11:19:26 -07:00
Romain Guy
d5a85fb63d Follow the include style used elsewhere in the library
Change-Id: I14aebdaeb04b6f4c611153ece4ac1f6ad9bfc15f
2012-03-13 11:18:20 -07:00
Chet Haase
866ed817d0 Fix garbage deref in DisplayList structures
Issue #6158892: Device runtime restarts frequently

Change-Id: I4e6afaaf9ac66d6846caf0ed82ea67163d8b15c2
2012-03-13 11:13:36 -07:00
Chet Haase
a1cff5043d Handle view properties at the native level
Basic functionality of handling View properties (transforms,
left/right/top/bottom, and alpha) at the native DisplayList level.
This logic is disabled for now (via compile-time flags in View.java and
DisplayListRenderer.h) as we continue work on it (there is no advantage
to the new approach until we optimize invalidation and rendering paths
to use the new code path).

Change-Id: I370c8d21fbd291be415f55515ab8dced6f6d51a3
2012-03-12 15:41:48 -07:00
Stephen Hines
3c4b03d484 Merge "Fix argument passing with dimLOD." 2012-03-12 14:45:32 -07:00
Stephen Hines
d091526841 Fix argument passing with dimLOD.
BUG=6152130

Change-Id: I5c857b692af8ec45e4cbef8140c44d72aec6600e
2012-03-12 14:42:05 -07:00
Romain Guy
6e0621794d Merge "Turn down the number of glGetError() calls." 2012-03-12 12:58:21 -07:00
Romain Guy
3fe4eb9c60 Turn down the number of glGetError() calls.
glGetError() was invoked every time a display list was updated. This
was unnecessary since display list updates do not execute OpenGL code.

Change-Id: Ia0a75a65ccf2a4701fb3a828848cd0c42f256c6c
2012-03-12 12:49:41 -07:00
Alex Sakhartchouk
e1dd94b1a0 Merge "Split off driver code into a separate static library." 2012-03-12 09:52:47 -07:00