History log of /frameworks/base/core/java/android/view/HardwareRenderer.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
0e40462e11d27eb859b829b112cecb8c6f0d7afb 13-May-2015 John Reck <jreck@google.com> Revert "DO NOT MERGE Backport of limited jank-tracking metrics"

This reverts commit 2614bd225f84f7a23e6b30fc6b47bede153e5f4c.

Change-Id: I344b4cbaa0bb0caf50bceb806d1446ee27ea52d8
/frameworks/base/core/java/android/view/HardwareRenderer.java
d5a4a1aac980c304d6f46f07f15bfc5c94d8f9d0 19-Feb-2015 John Reck <jreck@google.com> DO NOT MERGE Backport of limited jank-tracking metrics

Bug: 19821830

Cherry-pick of ba6adf66d3c44c0aa2fd8a224862ff1901d64300
Cherry-pick of e70c5754d01f2ab0ff47ea3eabaa88aca5ed2a36

Change-Id: Id342fa0ab345f204bec58acf45ce72f6de950cfb
/frameworks/base/core/java/android/view/HardwareRenderer.java
01a5ea35fbba4c5bb1d7790ae1677a2fa752e042 03-Dec-2014 John Reck <jreck@google.com> Resume RT-animations after a pauseSurface

Bug: 18203577

The issue occurs as a result of performTraversals() both doing
a window relayout call *and* early-returning because it's not dirty.

To fix this pauseSurface() returns whether or not the RT-side is
"dirty" to force ViewRootImpl to do a draw even if mDirty is
otherwise empty.

Change-Id: I534f367e75d18d273ebf14df3927f5c464ef6bef
/frameworks/base/core/java/android/view/HardwareRenderer.java
73840ea3670f1c117843acc6069635c80ba2ffd2 22-Sep-2014 John Reck <jreck@google.com> Aggressively trim memory for system_process

Bug: 16978006

Don't HWUI-accelerate KeyguardScrim
Aggressively trim memory as soon as a ViewRootImpl
dies or has its visibility changed.

Change-Id: Ie1b7c9d30653456bd2e9f309128174f972999368
/frameworks/base/core/java/android/view/HardwareRenderer.java
61375a8bb5e112d4e79ee4240699ffe7e3f4c8e5 18-Sep-2014 John Reck <jreck@google.com> Revert "Make starting window hw-accelerated"

Bug: 17516789

This change corresponds to a sudden influx of bad surface crashes.
Reverting to see if stability returns as this was an optimization
CL

This reverts commit 29ff1bc57ac2c995c56f15ed6e56e5fb247b2a44.

Change-Id: I7835e89017161d94ad05fe46d81bd437c3dae3a7
/frameworks/base/core/java/android/view/HardwareRenderer.java
4f52b3420684e85252a7341d906e47145855b6ec 11-Sep-2014 Chet Haase <chet@google.com> Make starting window hw-accelerated

An earlier fix in L disabled hw acceleration for the starting window
after the system process became hw accelerated. This was done to preserve
the old behavior of the starting window having some default behavior
(in particular, being filled with a default color). However, this ends up
being a memory and performance problem on some platforms (memory because
some platforms have backing store for software surfaces, performance
because it takes far longer to create a screen-size software surface than
a hardware surface).

The fix is to allow the starting window to inherit the hw acceleration
behavior of its process, and to detect when we are drawing the contents
of that starting window and to fill it with a default color (black).

Issue #17443449 use hardware rendering for app preview window

Change-Id: I8be8111d9e38c51fbbc07185acca065815ce26dc
/frameworks/base/core/java/android/view/HardwareRenderer.java
119907cd2575c56b1ebf66348b52e67aaf6a88d8 14-Aug-2014 John Reck <jreck@google.com> Animator stuff

Bug: 17228458

Change-Id: Id884a429a512f9cd2be0ed16dbd0f10e92b4440d
/frameworks/base/core/java/android/view/HardwareRenderer.java
3e8249568cc428296ac76c7ddce3f0382d40fe5b 20-Aug-2014 John Reck <jreck@google.com> Implement full View.buildLayer

Bug: 17152292

Change-Id: Ia3cc2aadf72fe14517f50762fc634794df51ad5a
/frameworks/base/core/java/android/view/HardwareRenderer.java
0a97330b98dd633b58dcfff405d94476c89e867d 16-Jul-2014 John Reck <jreck@google.com> Fix root RenderNode damage calculation

Bug: 15888445

Change-Id: I281ec9271c9889673dcdfcb6d31e341a7b47b7de
/frameworks/base/core/java/android/view/HardwareRenderer.java
58c42c3596a2b79184c9a6b7beffc6e94cce112c 13-Jul-2014 Alan Viverette <alanv@google.com> Specify light and shadow properties in theme

BUG: 15859361
Change-Id: I65c9aa8c7ad7a709504c879d96158efba040d3ce
/frameworks/base/core/java/android/view/HardwareRenderer.java
ccb11e183763db5cbaca96abe461adf480ed8e44 09-Jul-2014 Alan Viverette <alanv@google.com> Add API for specifying popup window shadows and shadow insets

BUG: 14569120
BUG: 13211941

Change-Id: Ia21596b25a0471344d42d59377074f67fce00042
/frameworks/base/core/java/android/view/HardwareRenderer.java
f47a594f5250b1914c36423ee6b371f0b8db09d0 01-Jul-2014 John Reck <jreck@google.com> Fix onTrimMemory for HardwareRenderer

Also fixes detachFunctor possibly drawing after return

Bug: 15189843
Bug: 15990672

Change-Id: I64c48cb674c461a8eeaba407b697e09f72c98ce3
/frameworks/base/core/java/android/view/HardwareRenderer.java
918ad523b2780e0c893f3d2a32d4ec13f2a7e921 27-Jun-2014 John Reck <jreck@google.com> More cleanups

Change-Id: Id5967944b949a2aec57e4fe9fdcdc04c11b8c35a
/frameworks/base/core/java/android/view/HardwareRenderer.java
3b20251a355c88193c439f928a84ae69483fb488 23-Jun-2014 John Reck <jreck@google.com> No-fail invokeFunctor

Bug: 15513308
Bug: 15449247

Change-Id: I13a29f9c8d4975cdda6dcb33b6332c2555ff0f7c
/frameworks/base/core/java/android/view/HardwareRenderer.java
b8802b1293c05a14399005aeaeb93b82ec2e2f27 17-Jun-2014 John Reck <jreck@google.com> Add atlas map pointer validation

Bug: 15425820

This just prevents the crash, it's still unclear how bad pointers
are getting into the map in the first place

Change-Id: I3acffaae09548ec48973035b7fcf5f35606bad60
/frameworks/base/core/java/android/view/HardwareRenderer.java
25fbb3fa1138675379102a44405852555cefccbd 12-Jun-2014 John Reck <jreck@google.com> Move LayerType to RenderNode

Change-Id: Icb79a5015cb0362b1f3a66d09007450730135a97
/frameworks/base/core/java/android/view/HardwareRenderer.java
e4267ea4f20740c37c01bfb6aefcf61fddc4566a 04-Jun-2014 John Reck <jreck@google.com> Even FASTER damage calculations!

* Now with more native!
* Less matrix math thanks to bulk-property-update support!
* Zero JNI on the View.damageInParent() path!
* Fully aware of RT-driven animators!
* Likely full of new and exciting bugs!
* But it also fixes at least 1 existing invalidate bug!

Change-Id: Ie0773f85a60850ff2668370c58defef2e8aa079f
/frameworks/base/core/java/android/view/HardwareRenderer.java
84a4c887a07c1c2939443f4e0587d7f1ac109e4b 30-May-2014 John Reck <jreck@google.com> Remove GLRenderer

Change-Id: I180286417c1a354fc7eb1eadb1884ac6add0795c
/frameworks/base/core/java/android/view/HardwareRenderer.java
d72e0a339b54af0c4e731513bbad120dff694723 30-May-2014 John Reck <jreck@google.com> Re-jigger layers

Bug: 15185239
Bug: 15238382

Make DeferredLayerUpdater ref counted so that
HardwareLayer:finalizer() works non-crashily on
leaked layers
Give DeferredLayerUpdater the ability to have a layer destroyer
set so that leaked layers can still be recycled on the
RenderThread
Order layer updates based off of pushLayerUpdate() calls to fix
issue with nested layers

Change-Id: I4449cee607f7e5126e02fed7464cf48038e3dfdf
/frameworks/base/core/java/android/view/HardwareRenderer.java
fe5e7b7346a54537b980796ceeca66bfdbd05561 24-May-2014 John Reck <jreck@google.com> Enable debug stuffs

Bug: 14596762
* dumpsys gfxinfo implemented
* profile GPU visual_bars implemented

Change-Id: Icb948a9d5af5989b5615504d0d76ade64b93ef5b
/frameworks/base/core/java/android/view/HardwareRenderer.java
a5dda645da738da7b4ae15e28fa7d93d3b04b94f 23-May-2014 John Reck <jreck@google.com> Bag of scheduling tweaks

Bug: 15118640

* Prevent over-stuffing the queue by dropping frames
* Prevent double-drawing in one pulse by RT by deferring
vsync registration until post-draw so that it catches
the next vsync pulse instead of the current one
* Bias vsync race condition towards the UI thread
* Fix queueDelay to actually work

Change-Id: Ibf584258bd93ebcbba058bd976dc8b307f1c6155
/frameworks/base/core/java/android/view/HardwareRenderer.java
797b95b26bbb7557678af78b9a2a61830158920f 21-May-2014 Chris Craik <ccraik@google.com> Define light position (using new lighting spec) in Java

Also updates the relative shadow strengths.

Change-Id: I6cac7275d38df98aea9f0dda463cd7207102986a
/frameworks/base/core/java/android/view/HardwareRenderer.java
ef27453cf71e331e4076df5e5c665b06d5c3e050 07-May-2014 John Reck <jreck@google.com> Merge "Cleanup attachFunctor"
832b151465ed81c43e59891d5eebe62128b21fbb 07-May-2014 John Reck <jreck@google.com> Cleanup attachFunctor

Bug: 13961296

Change-Id: Id48d11bfcc234afd1fd7e4fdd409a50e7208c81d
/frameworks/base/core/java/android/view/HardwareRenderer.java
63a06673253914510bbeebd500655008682dade1 07-May-2014 John Reck <jreck@google.com> Implement TODO(romainguy)

Bug: 14277445

Change-Id: Id52d6f7fcc023000adcc440bd4da67d9a673536b
/frameworks/base/core/java/android/view/HardwareRenderer.java
ae738a7a45d710115f8aedacf218d4bfa0b25698 28-Apr-2014 Bo Liu <boliu@google.com> Add invokeFunctor call to ViewRootImpl

BUG: 13961296

Change-Id: Ief8eea0b4c79a64ea76d75daaec176f1b8438581
/frameworks/base/core/java/android/view/HardwareRenderer.java
8e1f918738abf70a4dc86dbb12b386a9deea37f8 10-Apr-2014 John Reck <jreck@google.com> Merge "Switch DisplayListData to a staging model"
8de65a8e05285df52a1e6f0c1d5616dd233298a7 10-Apr-2014 John Reck <jreck@google.com> Switch DisplayListData to a staging model

Bug: 13912977

Change-Id: I5b2f664e797be22a58300964f57ceb4fab60528c
/frameworks/base/core/java/android/view/HardwareRenderer.java
f7d9c1dc84671d4e99657ef071d275700d85bb11 09-Apr-2014 John Reck <jreck@google.com> Fix ThreadedRenderer.setEnabled()

Bug: 13914116
Fixes lifecycle issues around setEnabled where ThreadedRenderer
was reporting as being enabled before it had a Surface. This is
incorrect.

Also fix some EGL lifecycle issues

Change-Id: I12ebb279707f9b533a570b61d68735d858b560bf
/frameworks/base/core/java/android/view/HardwareRenderer.java
ed8c903a6c9d74bf797689990e9bc4e004600e08 08-Apr-2014 John Reck <jreck@google.com> Enable RT, round 2

Change-Id: I8035f477f67ede9a5cd1b4de4498bc7850c7fbf3
/frameworks/base/core/java/android/view/HardwareRenderer.java
28ad7b52e038ef0cdd89f753d9839444a434b299 08-Apr-2014 John Reck <jreck@google.com> Fence on draws that are reported

Change-Id: Ib2ec16cbda40f40df1710bdc868869ea8301f17e
/frameworks/base/core/java/android/view/HardwareRenderer.java
9afe775ca9110bb4d24ab511919c42cfeeae3178 01-Apr-2014 John Reck <jreck@google.com> Disable RenderThread

Now that there's a half dozen bugs to fix, switch back
to the stable renderer until the issues are addressed

Change-Id: I1513cf26717e8ab6b1a038e86ae9a40f5f1a3c50
/frameworks/base/core/java/android/view/HardwareRenderer.java
b4a132a05f5dc1cc10352d63cb80921b1004bd7a 31-Mar-2014 John Reck <jreck@google.com> Merge "Turn on RenderThread"
0f61cde23452a8d257b43648fcec473a3574414a 31-Mar-2014 John Reck <jreck@google.com> Turn on RenderThread

Change-Id: I50fd607420baa438eb16b99b1de8604037c11a88
/frameworks/base/core/java/android/view/HardwareRenderer.java
0d1f634f4b5e1bb37aa51777efb6a68619488d01 29-Mar-2014 John Reck <jreck@google.com> Add invokeFunctor

Change-Id: I09e675d3e02e3e528642175ada00b2b17fab7652
/frameworks/base/core/java/android/view/HardwareRenderer.java
be34f2f3b340196426bdf558b28951359a4d84fa 10-Mar-2014 John Reck <jreck@google.com> DisplayList lifecycle changes

Bug: 13360343
Change DisplayList to be more forgiving with weaker lifecycle
requirements. Is more self-managed with a strong reference
to the renderer it needs

Also fix naming mismatch

Change-Id: I5c89453a72a52954f6f959f0846199705dbb6476
/frameworks/base/core/java/android/view/HardwareRenderer.java
44fd8d24f761f82d21e9b00932648a1b6bf91449 26-Feb-2014 John Reck <jreck@google.com> DisplayList overhaul

Change-Id: I53418d580c98f706e971545cff81b9921c12cc5f
/frameworks/base/core/java/android/view/HardwareRenderer.java
19b6bcfd83eb7fb92ebd06d2fec89e308311f1d0 15-Feb-2014 John Reck <jreck@google.com> Support HardwareLayers in RenderThread

Also has a few HardwareLayer lifecycle fixes

Change-Id: I6308cb05f8f199eed72189ace768013a46815941
/frameworks/base/core/java/android/view/HardwareRenderer.java
04fc583c3dd3144bc6b718fcac4b3e1afdfdb067 06-Feb-2014 John Reck <jreck@google.com> Refactor HardwareLayer

Defer all the things!
Groundwork to allow hardware layers to work in a renderthread world

Change-Id: Ib3aa47525f393083621254a743dbaa6352f933bd
/frameworks/base/core/java/android/view/HardwareRenderer.java
593b19a49e899a1668755b5040162f2b31f95877 06-Feb-2014 John Reck <jreck@google.com> Remove overdraw counter

Change-Id: Iee05362b9080b28714a4cca5a571f19ce81eadfd
/frameworks/base/core/java/android/view/HardwareRenderer.java
36bef0bf30d6bae48cf3837df351075ca4fce654 20-Jan-2014 Ashok Bhat <ashok.bhat@arm.com> AArch64: Make graphics classes 64-bit compatible

This a merger of two commits submitted to AOSP by
the following authors:

ashok.bhat@arm.com, david.butcher@arm.coma
craig.barber@arm.com, kevin.petit@arm.com and
marcus.oakland@arm.com

Due to the very large number of internal conflicts, I
have chosen to cherry-pick this change instead
of letting it merge through AOSP because the merge
conflict resolution would be very hard to review.

Commit messages below:

================================================
AArch64: Make graphics classes 64-bit compatible

Changes in this patch include

[x] Long is used to store native pointers as they can
be 64-bit.

[x] Some minor changes have been done to conform with
standard JNI practice (e.g. use of jint instead of int
in JNI function prototypes)

[x] AssetAtlasManager is not completely 64-bit compatible
yet. Specifically mAtlasMap member has to be converted
to hold native pointer using long. Added a TODO to
AssetAtlasManager.java to indicate the change required.

Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Craig Barber <craig.barber@arm.com>
Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>

==================================================================

AArch64: Use long for pointers in graphics/Camera

For storing pointers, long is used in
android/graphics/Camera class, as native
pointers can be 64-bit.

In addition, some minor changes have been done
to conform with standard JNI practice (e.g. use of
jint instead of int in JNI function prototypes)

Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>

===================================================================

Change-Id: Id5793fa0ebc17ee8b1eecf4b3f327977fdccff71
/frameworks/base/core/java/android/view/HardwareRenderer.java
4f02bf4eef6af47f35c70c4dda5b7b9523d89ca0 04-Jan-2014 John Reck <jreck@google.com> Native-side proxy

Remove RemoteGLRenderer
Remove reflection-based control

Change-Id: If17c2bbb61c7141986d88c4763def77ed1074985
/frameworks/base/core/java/android/view/HardwareRenderer.java
3dfe19f72cbd95b201e89376ae1810c5c9229b00 13-Dec-2013 John Reck <jreck@google.com> Add drawGlFunctor support to RenderThread

Add gl functor to the prototype support to allow
webview team to begin playing with RT

Also create RemoteGLRenderer to avoid needing to make
breaking changes to GLRenderer. Currently the differences
are mainly around mFunctorsRunnable and how it queues itself up

Change-Id: I1ca39056189b68cd7b8dded4dd5889d331f6660a
/frameworks/base/core/java/android/view/HardwareRenderer.java
cec24ae16e9a0a7c3075f1a8d9149bb7fb3813fc 05-Nov-2013 John Reck <jreck@google.com> RenderThread work

Hacky prototype needs a private API to enable

Change-Id: I21e0ddf3cdbd38a4036354b5d6012449e1a34849
/frameworks/base/core/java/android/view/HardwareRenderer.java
3083579424785e55ca8f82856a6553ee983c3ffb 07-Nov-2013 John Reck <jreck@google.com> More refactoring

Merge GlRenderer and Gl20Renderer
Move GLRenderer to its own file
Move native methods from HardwareRenderer to GLRenderer

Change-Id: Ib4680b03dd98101b2a428062cc94774ff73baa75
/frameworks/base/core/java/android/view/HardwareRenderer.java
339f901ba65d6b8478b6d7680cfb2f5421e42d9b 06-Nov-2013 John Reck <jreck@google.com> Cleanups

Simplify DisplayList creation
Remove unnecessary debug code

Change-Id: I310c9196485c6bf65a6793669bd2dc2b9a8a0a15
/frameworks/base/core/java/android/view/HardwareRenderer.java
a86ab640f7bb0bf3cb4eaed80473ca8c5d131903 30-Aug-2013 Igor Murashkin <iam@google.com> Surface: Change OutOfResourcesException to be a runtime exception

- Deprecates SurfaceTexture.OutOfResourcesException, it wasn't used
- Make all JNI code throw only Surface.OutOfResourcesException
- Get rid of redundant SurfaceControl.OutOfResourcesException

Bug: 10566539
Change-Id: I58126260771b9ccff6a69c672ce7719b9f98138d
/frameworks/base/core/java/android/view/HardwareRenderer.java
cb883303f97a8c08d53d972792630ca9bad94d65 08-Aug-2013 Romain Guy <romainguy@google.com> Only destroy remote graphic buffers
Bug #9795157

Change-Id: Ia7a39d3ef40994fede185482a5b4ca5500249b34
/frameworks/base/core/java/android/view/HardwareRenderer.java
b2ed04a68913f4d84d7cb7e979b6f0ae96f43058 10-Jul-2013 Romain Guy <romainguy@google.com> Unregister gralloc buffer immediately
Bug #9406765

Waiting for a GC to finalize the GraphicBuffer could cause ordering
issues

Change-Id: I7035a9eef52a6c3b44ab28f40a7b1fbdc83d2e20
/frameworks/base/core/java/android/view/HardwareRenderer.java
cc6b7caff0b428c1a5fc5bf6d7a94f50ac8cb649 25-Jun-2013 Romain Guy <romainguy@google.com> Make sure we have a valid EGL context before drawing
Bug #9404946

Run another EGL context check after invoking user code to ensure
we have a valid context/surface pair before drawing the display list.

Change-Id: Iefb0ced7900ce0c54eb81b62d24ec00700bdce47
/frameworks/base/core/java/android/view/HardwareRenderer.java
c8ba0b46161e55b16e43d8872ab67b47038cafa7 22-Jun-2013 Romain Guy <romainguy@google.com> When destroying a surface, only unmake current if necessary
Bug #9404946

The Calendar app destroys one of its popup windows during a draw
traversal. Without this patch, we end up with no current context
nor surface after we're done gathering display lists. This means
that all of our EGL/GL calls will either fail or have undefined
behaviors. This could explain the PBO crash we are seeing with
the monkeys. Without a proper GL context, the driver returns NULL
when we map the PBO in CPU memory.

Change-Id: I210cf724be73da909a7621f807298a9f4a58e61d
/frameworks/base/core/java/android/view/HardwareRenderer.java
e93482f5eac3df581d57e64c2a771a96aa868585 17-Jun-2013 Romain Guy <romainguy@google.com> Cancel layer update when a layer is about to be destroyed
Bug #9310706

Change-Id: I73eea6314c326f15a979617e3a05b525935f0d3f
/frameworks/base/core/java/android/view/HardwareRenderer.java
405436021da156fbe3c5d4de48bdefa564cf7fc0 13-Jun-2013 Romain Guy <romainguy@google.com> Restore buildLayer()'s old behavior; it's synchronous again
Bug #9193833

Change-Id: I4ee07e65c0a8967f0b55da030ecaad6dfc46136f
/frameworks/base/core/java/android/view/HardwareRenderer.java
80b12fcaaec458377d966803c3a61504f0897ea1 30-May-2013 Romain Guy <romainguy@google.com> Disable the AssetAtlas when running under valgrind
Bug #9191438

When running under valgrind, the ppid will be different from the ppid
of the system server (which always gets forked from zygote.)

Change-Id: I42cbf99fd0084aeab76c30de9beb7c49ed1fc7d8
/frameworks/base/core/java/android/view/HardwareRenderer.java
e9bc11f7121dbe373b0cbe5779ee6a12d824492c 23-May-2013 Romain Guy <romainguy@google.com> Add PerfHUD ES profiling capabilities

The eglGetSystemTimeNV extension can be used to enable profiling
in PerfHUD ES. When the delta of two calls to eglGetSystemTimeNV
equals 0, we now cancels display lists updates. This allows the
tool to redraw the same frame several times in a row to run its
analysis.

For better results profiling should only be attempted after
setting viewroot.profile_rendering to true using adb shell
setprop.

Change-Id: I02e3c237418004cff8d6cb0b9a37126efae44c90
/frameworks/base/core/java/android/view/HardwareRenderer.java
78dd96d5af20f489f0e8b288617d57774ec284f7 03-May-2013 Romain Guy <romainguy@google.com> Add an on-screen overdraw counter

The counter can be enabled by setting the system property called
debug.hwui.overdraw to the string "count". If the string is set
to "show", overdraw will be highlighted on screen instead of
printing out a simple counter.

Change-Id: I9a9c970d54bffab43138bbb7682f6c04bc2c40bd
/frameworks/base/core/java/android/view/HardwareRenderer.java
927bc7d72048ac90e3b95845699efb479b5589b4 03-May-2013 Romain Guy <romainguy@google.com> Prevent a crash on devices that remove non-core services

Change-Id: Id7fcf0f1f7b6ddec8e860b3c4cde98aec63d04b6
/frameworks/base/core/java/android/view/HardwareRenderer.java
3b748a44c6bd2ea05fe16839caf73dbe50bd7ae9 18-Apr-2013 Romain Guy <romainguy@google.com> Pack preloaded framework assets in a texture atlas

When the Android runtime starts, the system preloads a series of assets
in the Zygote process. These assets are shared across all processes.
Unfortunately, each one of these assets is later uploaded in its own
OpenGL texture, once per process. This wastes memory and generates
unnecessary OpenGL state changes.

This CL introduces an asset server that provides an atlas to all processes.

Note: bitmaps used by skia shaders are *not* sampled from the atlas.
It's an uncommon use case and would require extra texture transforms
in the GL shaders.

WHAT IS THE ASSETS ATLAS

The "assets atlas" is a single, shareable graphic buffer that contains
all the system's preloaded bitmap drawables (this includes 9-patches.)
The atlas is made of two distinct objects: the graphic buffer that
contains the actual pixels and the map which indicates where each
preloaded bitmap can be found in the atlas (essentially a pair of
x and y coordinates.)

HOW IS THE ASSETS ATLAS GENERATED

Because we need to support a wide variety of devices and because it
is easy to change the list of preloaded drawables, the atlas is
generated at runtime, during the startup phase of the system process.

There are several steps that lead to the atlas generation:

1. If the device is booting for the first time, or if the device was
updated, we need to find the best atlas configuration. To do so,
the atlas service tries a number of width, height and algorithm
variations that allows us to pack as many assets as possible while
using as little memory as possible. Once a best configuration is found,
it gets written to disk in /data/system/framework_atlas

2. Given a best configuration (algorithm variant, dimensions and
number of bitmaps that can be packed in the atlas), the atlas service
packs all the preloaded bitmaps into a single graphic buffer object.

3. The packing is done using Skia in a temporary native bitmap. The
Skia bitmap is then copied into the graphic buffer using OpenGL ES
to benefit from texture swizzling.

HOW PROCESSES USE THE ATLAS

Whenever a process' hardware renderer initializes its EGL context,
it queries the atlas service for the graphic buffer and the map.

It is important to remember that both the context and the map will
be valid for the lifetime of the hardware renderer (if the system
process goes down, all apps get killed as well.)

Every time the hardware renderer needs to render a bitmap, it first
checks whether the bitmap can be found in the assets atlas. When
the bitmap is part of the atlas, texture coordinates are remapped
appropriately before rendering.

Change-Id: I8eaecf53e7f6a33d90da3d0047c5ceec89ea3af0
/frameworks/base/core/java/android/view/HardwareRenderer.java
58d110afa0e0f3843d72617046185a3c2d48dca9 10-Apr-2013 Chet Haase <chet@google.com> Fix Contacts animation jank

The last frame of an animation stays stuck on the screen for a couple of frames.
Specifically, the "Quick Contact" animation that animates the picture
closed (fades/scales it away) animates all the way to the end... then hangs there
briefly before being taken down.

The problem is a rendering bug where we correctly detect that a DisplayList
has nothing to draw (since the last frame is completely transparent, alpha==0),
but incorrectly ignore the fact that we cleared the transparent-background
window prior to not-drawing that DisplayList. When we detect that there's
nothing to draw, we don't bother swapping buffers. So even though we drew
the right thing (clearing the buffer), we didn't actually post the buffer to the
screen.

This change factors in both the clear and the draw to decide when to swap buffers.

Issue #8564865 Quick contact close animation jank redux

Change-Id: Ib922cff88a94f025b62f7461c1a29e96fe454838
/frameworks/base/core/java/android/view/HardwareRenderer.java
e55945e219dbf4664683a757c5a9d462c98f2e19 05-Apr-2013 Romain Guy <romainguy@google.com> Reduce the size of dirty invalidates

Remove remnants from times long gone. We don't need to redraw the
union of the previous frame's dirty region and the new dirty
region.

Change-Id: I9fb96f99a6a72c2233f9ca563cf6432a42b2b65b
/frameworks/base/core/java/android/view/HardwareRenderer.java
96885eb480c5e0526fe2f77d30f6e551f3f3ceab 26-Mar-2013 Romain Guy <romainguy@google.com> Avoid multiple font cache texture uploads
Bug #8378964

This change defers drawing into layers until after the renderer for FBO0
is ready to draw. At that point, all the precaching is done which means
all glyphs can be uploaded at once in the font caches.

Change-Id: Ie1f7a7ff30f76f06fb3dbc72c7d05e66207d1ecb
/frameworks/base/core/java/android/view/HardwareRenderer.java
08bca88b272f0006e1581e9c28bc6312490f634e 26-Feb-2013 Romain Guy <romainguy@google.com> Rename debug property and expose it in HardwareRenderer

Change-Id: If46a9bc14a50f6c9a202d901881b36bbac32cba3
/frameworks/base/core/java/android/view/HardwareRenderer.java
d17043dcb49d4f060349a8bd58abcddcf3bac9a2 19-Feb-2013 Romain Guy <romainguy@google.com> Show Dalvik stack trace if an exception happens at draw time
External bug: http://code.google.com/p/android/issues/detail?id=49379

Drawing was previously wrapped in a try/finally block which was silently
swallowing user code exceptions. For instance, if a View throws a
NullPointerException in its onDraw() method, the previous implementation
would silently crash in native code.

This change extracts the section that builds display lists into a new
method that does not contain any try/finally block.

In addition, this change logs any exception thrown while drawing
display lists.

Change-Id: I0abffa4c9183d41aac8b0f8442813e56b957f08f
/frameworks/base/core/java/android/view/HardwareRenderer.java
52036b19a5f82bc4d75cfcbff99c65df8d25a99b 15-Feb-2013 Romain Guy <romainguy@google.com> Expose display list APIs

The exposed APIs are slightly simpler than the full APIs used internally.
Only APIs useful to applications are exposed.

Change-Id: Ie03014628d40ad5ef63dedbc52ce3def84429d54
/frameworks/base/core/java/android/view/HardwareRenderer.java
8d4aeb7111afac0c3c7e56d4ad5d92f9cfce2ffd 13-Feb-2013 Romain Guy <romainguy@google.com> Add a render buffer cache to reuse stencil buffers
Bug #7146141

This new cache is used in a similar way to LayerCache. It helps
reuse already allocated stencil buffers and thus avoid churning
memory on every frame.

Change-Id: I19551d72da52c40039e65904563600e492c8b193
/frameworks/base/core/java/android/view/HardwareRenderer.java
ef35927abcd089652f87a985dd6dde7afde58b92 01-Feb-2013 Romain Guy <romainguy@google.com> Tag HardwareRenderers with a name to help debugging

The name of the renderer is the same as the window it belongs to.

Change-Id: Ie9adc0a1978afa026923ea41f5540eda6ba65a92
/frameworks/base/core/java/android/view/HardwareRenderer.java
2af4635e4a9e448a65ff541252f8f94bc6ac48e0 27-Nov-2012 Chris Craik <ccraik@google.com> Object-based DisplayList recording

bug:8037003

Changes the DisplayList from using stream read/write commands to use an array of
objects manually allocated on a linear buffer.

Depends on frameworks/native change https://googleplex-android-review.googlesource.com/#/c/257695/ which adds LinearAllocator

Also changes drawRects to use float count instead of rect count, to be more like drawLines/drawPoints

Change-Id: Ia2e4a11acd8f0a757042a05cbc9e7563cb73ee47
/frameworks/base/core/java/android/view/HardwareRenderer.java
8ce00301a023eecaeb8891ce906f67b513ebb42a 16-Jan-2013 Romain Guy <romainguy@google.com> Implement clipRect with a transform, clipRegion & clipPath
Bug #7146141

When non-rectangular clipping occurs in a layer the render buffer
used as the stencil buffer is not cached. If this happens on a
View's hardware layer the render buffer will live for as long
as the layer is bound to the view. When a stencil buffer is
required because of a call to Canvas.saveLayer() it will be allocated
on every frame. A future change will address this problem.

If "show GPU overdraw" is enabled, non-rectangular clips are not
supported anymore and we fall back to rectangular clips instead.
This is a limitation imposed by OpenGL ES that cannot be worked
around at this time.

This change also improves the Matrix4 implementation to easily
detect when a rect remains a rect after transform.

Change-Id: I0e69fb901792d38bc0c4ca1bf9fdb02d7db415b9
/frameworks/base/core/java/android/view/HardwareRenderer.java
735738c4ddf3229caa5f6e634bf591953ac29944 03-Dec-2012 Romain Guy <romainguy@google.com> Preliminary Support for region clipping

Region clipping, using Canvas.clipPath or Canvas.clipRegion, requires
a stencil buffer to be always present. In addition, extra wiring is
required in JNI and display lists.

This change only adds the necessary JNI/C++ APIs and some extra
plumbing to start the real work on properly supporting region
clipping.

A new debug define called DEBUG_CLIP_REGIONS can be used to draw
the current clip region. It is off by default, as is region
clipping.

The default implementation of clipPath() and clipRegion(), now
in native, mimics the previous Dalvik implementation to prevent
regressions.

Change-Id: I7903e7cfd7412b9b9b622566d4dbfce7bdcec00c
/frameworks/base/core/java/android/view/HardwareRenderer.java
48ef4a92a404bf2b87fd0cd0edfe082901736ac3 11-Jan-2013 Romain Guy <romainguy@google.com> Add a new type of profiling graph: lines

Change-Id: I0e67d7227016fe37011e17d04220a200a6a5fba0
/frameworks/base/core/java/android/view/HardwareRenderer.java
7d1c4fa322dec1247f7d509a066e436f1d2706fa 07-Jan-2013 Romain Guy <romainguy@google.com> Remove out-of-date comment and rename constant

Change-Id: I0c60d349505776cff0d7e5360e87ac5584dc5876
/frameworks/base/core/java/android/view/HardwareRenderer.java
666d5daab2a679ac0575c3a24ef18a737592f1d8 07-Jan-2013 Romain Guy <romainguy@google.com> Fix issue when toggling profiling from visual to off to visual

Change-Id: I4a623020a9bf0079029d184c13e58d92e692faf8
/frameworks/base/core/java/android/view/HardwareRenderer.java
a4fef0260ba5f69f1484dac4d7e39b9dc5ac7218 07-Jan-2013 Romain Guy <romainguy@google.com> Update profiling properties

This change merges debug.hwui.profiling and profiling_visualize.
Now only the first property exists and accepts the values true, false
and visual. This enables setting the property from Settings.

Change-Id: I16a11fe23ac1a6bb907a1a826e418d6b3994b56c
/frameworks/base/core/java/android/view/HardwareRenderer.java
98e4a52cc0994c67343e33ec251d6d8b83c528bc 07-Jan-2013 Romain Guy <romainguy@google.com> Use dp units instead of px to draw profiling graph

Change-Id: Iba24b21ebe46738c6b1d6d320ce34af71f7c769d
/frameworks/base/core/java/android/view/HardwareRenderer.java
63f4d84ec2e9258726093bb435d6549fe63a053e 05-Jan-2013 Romain Guy <romainguy@google.com> Make profiling graph more readable in all apps

Change-Id: Ic9467d4420c2aa8d295d0045c714c9f8e6269220
/frameworks/base/core/java/android/view/HardwareRenderer.java
672433d90fab7383cd28beac9d4485b566a90940 05-Jan-2013 Romain Guy <romainguy@google.com> Add visual profiling feature

When profiling is enabled with debug.hwui.profile set to true,
setting debug.hwui.profile_visualizer to true will display the
profiling data directly on screen.

Change-Id: I3d5fe3f0347090815087b1cbfce66b8e76d9347b
/frameworks/base/core/java/android/view/HardwareRenderer.java
95a38b92a0f0f8268636f6544467d59e67924715 07-Dec-2012 Chris Craik <ccraik@google.com> am a9877672: am 780a53df: am 07efb030: Merge "Defer process mode upon draw" into jb-mr1.1-dev

* commit 'a98776723f12ca1cbe6a8d181a49f179dfd23abd':
Defer process mode upon draw
9efa222b34139b3b3c239a3d2c25915fc9e44660 05-Dec-2012 Chris Craik <ccraik@google.com> Defer process mode upon draw

Process mode functor execution can be expensive, and cause dropped frames if it
runs between two expensive frames (when there isn't cpu time to spare). Avoid
this by delaying the process mode by an additional 4 ms every time we hit a draw

bug:7670326
Change-Id: I27f42458d4a815183a4b24c7748e05bc361fb943
/frameworks/base/core/java/android/view/HardwareRenderer.java
5bb3c730f5ebd2a0db1b02a8981c6fdbea6c1a2e 30-Nov-2012 Romain Guy <romainguy@google.com> Apply dev. settings at runtime
Bug #7434649

Change-Id: I16f00eaa8a5eefd9f9849e196cf2cb1659215390
/frameworks/base/core/java/android/view/HardwareRenderer.java
1741d73441d554812654ae0893a0140c2678c7d7 29-Nov-2012 Romain Guy <romainguy@google.com> Cleanup: remove unused property

Change-Id: I09b418ef8888c42a876cb9014b22231ec31ca7eb
/frameworks/base/core/java/android/view/HardwareRenderer.java
bd17bd34311ba5af4b6ac9ddc4b8c71888f2e6f1 24-Oct-2012 Romain Guy <romainguy@google.com> Ensure we have a GL context before deleting View layers
Bug #7391098

The existing code was doing a make current to guarantee we have a
current context. This can however fail when the surface is destroyed
which could lead to GL calls without an EGL context, and therefore
potential leaks. This change fixes the issue by using a technique
found in HardwareRenderer.destroyHardwareResources(). If the surface
is not available then we use a special 1x1 pbuffer as a way to get
a valid context.

Change-Id: I716d3799bf90120d793d76e90a83956837ecd491
/frameworks/base/core/java/android/view/HardwareRenderer.java
7c25aab491707f7324f9941b8cfa9bd2b4b97e76 19-Oct-2012 Romain Guy <romainguy@google.com> Defer layer rendering to avoid stalls
Bug #7326824

When a layer is taken out of the cache and initialized it gets cleared
to prepare it for future rendering. This triggers the following sequence
of operations:

glBindFramebuffer(layer.fbo)
attach texture storage to FBO
glClear()
glBindFramebuffer(defaultFbo)

The clear forces a resolve on tilers which stalls the CPU for a little
while, thus producing jank during animations. This change moves the
clear to the next frame when we know we will have to execute a resolve
anyway.

Change-Id: Ic1939c25df20ed65a4c48dc81ee549b2cd8b6ec3
/frameworks/base/core/java/android/view/HardwareRenderer.java
8efca54693b1fa956eede0367fffe8bb0d3531f0 16-Oct-2012 Romain Guy <romainguy@google.com> Ensure we always request conformant OpenGL ES 2.0 contexts

Change-Id: I6b9d6f2dace02ad28baef6811007302b8e552a54
/frameworks/base/core/java/android/view/HardwareRenderer.java
dfab363807b3b44be4032e410f016e0a0d018426 03-Oct-2012 Romain Guy <romainguy@google.com> Fix rendering artifacts on tiled renderers
Bug #7275145

This change fixes ViewRoot and adds extra debug information. It does
not solve the problem entirely. Another CL will.

Change-Id: I7e604ba38aad7f421769783dcbd998d6905ab2d9
/frameworks/base/core/java/android/view/HardwareRenderer.java
6a2d17f71342f981c9df1dc5beff33e30eb3ae2b 30-Sep-2012 Chet Haase <chet@google.com> Fix texture corruption

When memory gets low on a device, activities flush everything they can.
Hardware-accelerated activites, such as Launcher, flush GL resources and destroy
the GL context. However, some resources were still hanging around, due to deferred
destruction policies (we don't delete layers until the DisplayLists they are in
are finalized, to ensure we don't deref deleted objects). This meant that we were
referring to obsolete GL data in these objects. in particular, it meant that we might
come around later, after a new GL context was created, and delete a texture object
that was incorrect. We use the layer's "texture id" to refer to the texture underlying the
layer. But if there's a new GL context, then this texture ID is no longer valid, and
we may be deleting the texture that a different object (layer, icon, whatever) is referring
to, because the driver may return that same ID under the new GL context.

The fix is to more aggressively delete things that we know will not be used again
when the GL context is destroyed. In particular, we delete all resources being used
by all DisplayLists at GL context destruction time.

Issue #7195815 Textures corruption on all devices, in many apps

Change-Id: I52d2d208173690dbb794a83402d38f14ea4c6c22
/frameworks/base/core/java/android/view/HardwareRenderer.java
bd43152bda835c5a9a619a5869344a6a3af11917 26-Sep-2012 Romain Guy <romainguy@google.com> Always set the EGL_BUFFER_PRESERVED EGL_SWAP_BEHAVIOR
Bug #7221173

Change-Id: I231a47187792c93af9e3b9321fd1e25bc2f20117
/frameworks/base/core/java/android/view/HardwareRenderer.java
ed1b6f4fc0af836624b2edc2830eb918bf04cf3c 25-Sep-2012 Romain Guy <romainguy@google.com> Really Trigger the log when EGL_NO_CONTEXT is returned by eglCreateContext
Bug #7216919

Change-Id: Ie4a855ee51a0a4fad69bae8f377189d0c653f543
/frameworks/base/core/java/android/view/HardwareRenderer.java
c002936e4bd042db3024202b3e9696835a730cfa 25-Sep-2012 Romain Guy <romainguy@google.com> Trigger the log when EGL_NO_CONTEXT is returned by eglCreateContext
Bug #7216919

Change-Id: If2059227d55e8ddb2d2673ee36029c3c92dd9a3d
/frameworks/base/core/java/android/view/HardwareRenderer.java
4c7dc4aa5c6c155d7756ad40befc931fc0719976 25-Sep-2012 Romain Guy <romainguy@google.com> Add extra error check when eglCreateContext fails
Bug #7216919

Change-Id: I322cbe4579d7a4eb2a64d288175e145d0badc857
/frameworks/base/core/java/android/view/HardwareRenderer.java
7c450aaa3caac2a05fcb20a177483d0e92378426 22-Sep-2012 Romain Guy <romainguy@google.com> Add support for a new developer setting: overdraw debugging

Change-Id: I350ba4486577c3289f82c20938f7a35138778727
/frameworks/base/core/java/android/view/HardwareRenderer.java
11cb642756093a4af901b1525375b1eb2b5c3e2b 21-Sep-2012 Romain Guy <romainguy@google.com> Update layers in a single batch at the beginning of a frame
Bug #7186819

Change-Id: Ice5926dfedfb3be3a3064e65008dafa2852407da
/frameworks/base/core/java/android/view/HardwareRenderer.java
2b7028eabac80cec170572bc0e945a1d4224e595 20-Sep-2012 Romain Guy <romainguy@google.com> Add support for QCOM_tiled_rendering
Bug #7186819

This optional OpenGL extension can be used by tiled renderers to optimize
copies from main memory to tiles memory.

Change-Id: Id4a5d64e61ad17f50e773e8104b9bf584bb65077
/frameworks/base/core/java/android/view/HardwareRenderer.java
740ee65d460401c266a7108c9aa4c6e7fbe58489 18-Sep-2012 Romain Guy <romainguy@google.com> Add extra EGL error checking

Change-Id: I7cacef41ed08118c5eecf674e3d8461473692968
/frameworks/base/core/java/android/view/HardwareRenderer.java
4702a856973a553deb82f71b1d3b6c3db5dbf4ba 18-Aug-2012 Dianne Hackborn <hackbod@google.com> More view hierarchy, fragment debugging.

Add a View.toString() method.

Rename all of the View private flags to have a PFLAG prefix to
avoid going insane trying to figure out which constant goes with
which flag.

Activity.dump() now includes a summary of the activity's view
hierarchy, using the View.toString() method.

All exceptions thrown by FragmentManager now perform a dump of
the owning activity state, where appropriate.

Change-Id: I6482e397e10cb5a0612ab02ce6ed5131823437a6
/frameworks/base/core/java/android/view/HardwareRenderer.java
4ff0cf4b83605bff630c4e6f1fabe4f72a3f93a1 06-Aug-2012 Romain Guy <romainguy@google.com> Add new debug tool to track hardware layers updates

You can setprop debug.hwui.show_layers_updates true to flash
hw layers in green when they update. This is also a setting
in the Dev. section of the settings app.

Change-Id: Ibe1d63a4f81567dc1d590c9b088d2e7505df8abf
/frameworks/base/core/java/android/view/HardwareRenderer.java
786fc93d71b833ab6b02b0c7ea5e30f25cceeedf 25-Jul-2012 Romain Guy <romainguy@google.com> Make HardwareRenderer able to target generic Surface objects

Change-Id: I4b7199a1eb30e0df354ae12c4819adc69db5df40
/frameworks/base/core/java/android/view/HardwareRenderer.java
77e67cf9055378d00bb57f458129462f33047039 20-Jun-2012 Romain Guy <romainguy@google.com> Add extra systrace tracing

This change shows how much time is spent updating and executing
framework display lists within a frame.
This change also fixes a crash that happnes if you attempt to
perform a dumpsys gfxinfo while the app is drawing (we are telling
developers to use this new tool.)

Change-Id: Ia4047a78a42b545ab77176ef4f371c300686548c
/frameworks/base/core/java/android/view/HardwareRenderer.java
cb82b942c89bf69b6c03e2f4951f519c1be115dc 13-Jun-2012 Chris Craik <ccraik@google.com> Fix attachFunctor path to ignore delay

Don't defer functor invocation when calling attach functor directly.

bug:6653638

Change-Id: Ifffc027df16612f380f39b82b7d0a4411d53b4ea
/frameworks/base/core/java/android/view/HardwareRenderer.java
44b2fe3fc114ee5f7273c6b0fee2cc999bf244a2 07-Jun-2012 Chet Haase <chet@google.com> Track canvas clearing for swap buffers logic.

A previous fix made it necessary for a frame to render something to GL
in order to cause a call to eglSwapBuffers(). Besides the calls being
tracked as part of issuing a DisplayList, there is also a potential call
to clear the canvas (via glClear()) on non-opaque surfaces. This call is also
good to track, since a surface that gets cleared without any other drawing operations
is worth flipping to the screen (to erase old contents on that surface).

This fix tracks the status of the pre-draw operations to find out whether
glClear() was called and then sets the drawing status appropriately.

Issue #6606422 QuickContact dismissal is janky again (Tracking)

Change-Id: I5fcaccfdc9293dd46b83f2fc279730a5d2740ebf
/frameworks/base/core/java/android/view/HardwareRenderer.java
932b7f6765968bd526c03512f3805fbc3924dc29 06-Jun-2012 Chris Craik <ccraik@google.com> Revert "Add more temporary logging for investigating detachFunctor"

bug:6608646

This reverts commit 8857b2f76abad1e4ec742dfd85d0c997880be376

Change-Id: I1563b5974c52b84201ae448298f804eb0dcc235d
/frameworks/base/core/java/android/view/HardwareRenderer.java
8857b2f76abad1e4ec742dfd85d0c997880be376 05-Jun-2012 Chris Craik <ccraik@google.com> Add more temporary logging for investigating detachFunctor

bug:6596807
Change-Id: Ic9e34e323b12a887f2e8df0773a6155627b6a64f
/frameworks/base/core/java/android/view/HardwareRenderer.java
561ff8a74e3d9ea15f58d9b6534da9ea5a63d84b 01-Jun-2012 Chet Haase <chet@google.com> Merge "Skip eglSwapBuffers() call when we do not draw to GL" into jb-dev
486590963e2207d68eebd6944fec70d50d41116a 01-Jun-2012 Chet Haase <chet@google.com> Skip eglSwapBuffers() call when we do not draw to GL

The fix is to track when we issue GL drawing commands, and to skip the
call to eglSwapBuffers() when a DisplayList does not result in
any actual rendering calls to GL.

Issue #6364143 QuickMuni list items and buttons flicker instead of fade

Change-Id: I60a02c61a58c32d92481a1e814b4c8a49c6a37a3
/frameworks/base/core/java/android/view/HardwareRenderer.java
41ee465734d0006797a8fd36e88976c1e85d161c 01-Jun-2012 Chris Craik <ccraik@google.com> Force webview invalidates on unsuccessful functor attach

Functor attach should always be successful, but adding a fallback just in
case. Also invalidates the WebView on initial content arriving.

bug:6511995
Change-Id: Ibca16505afec9f693ea4a7cc4966cd6d7353725c
/frameworks/base/core/java/android/view/HardwareRenderer.java
13b907353f18215b52b5ceda24bbf520d91d72a1 21-May-2012 Romain Guy <romainguy@google.com> Remove unused, obsolete debug code

All these features have either been abandonned and left un-maintained
for years or can be replaced by systrace.

Change-Id: I42e4579a8078744047e5fe08a7a15254970b09bc
/frameworks/base/core/java/android/view/HardwareRenderer.java
a21f877434dd25a93869b8641e3c38618bf317a9 07-May-2012 Romain Guy <romainguy@google.com> Log more frame data when profiling GL apps

Change-Id: Ib7377c22a2258aa6510677d80df34bb7e73dc714
/frameworks/base/core/java/android/view/HardwareRenderer.java
4b8c4f886b3d57e6ffe1a4650487c67334674a40 28-Apr-2012 Romain Guy <romainguy@google.com> New constant used by dev settings

Change-Id: I42f103ae8a9b9f051367c72131f0b216e200f6e0
/frameworks/base/core/java/android/view/HardwareRenderer.java
ba6be8a62dcdb3ffd210cd36b9af4e3a658eac47 24-Apr-2012 Romain Guy <romainguy@google.com> Prevent WebView from crashing when detached from the window
Bug #6365056

WebView enqueues a functor in the hardware renderer to handle
animations and this functor is called at a later time by the
hardware renderer. However, the functor was not removed from
the queue when WebView was removed from the window. This could
cause the hardware renderer to attempt to execute an invalid
functor and lead to a crash.

Change-Id: I9d38e80f3fdc5e29d4d0cdfa1e893c251a954508
/frameworks/base/core/java/android/view/HardwareRenderer.java
19f86e831ee0629b24385b0bb51d27ff91961dd2 24-Apr-2012 Romain Guy <romainguy@google.com> Invoke onTrimMemory with an EGL context
Bug #6369600

Change-Id: I3ded47c3688ef2f2873495392c35e898357204da
/frameworks/base/core/java/android/view/HardwareRenderer.java
1271e2cc80b01d577e9db339459ef0222bb9320d 20-Apr-2012 Chet Haase <chet@google.com> Remove USE_DISPLAY_LIST_PROPERTIES flag

This flag was still hanging around pending any need to disable
DisplayList properties. But things seem stable, so it's time to clean up
and simplify the code.

At the same time, I reduced redundance in DisplayList dimensions. We
used to call drawDisplayList() with width/height parameters that were
used to do a clip reject. This is redundant with the DisplayList properties
that set the bounds of the DisplayList; the left/right and top/bottom properties
represent the same width/height properties formerly used in drawDisplayList().
The new approach is to not pass dimensions to drawDisplayList(), but to
instead pull those dimensions directly from the DisplayList when needed.

Change-Id: I8871beff03b1d4be95f7c6e079c31a71d31e0c56
/frameworks/base/core/java/android/view/HardwareRenderer.java
1ac4765e959c79101f64b1279887ed469334c268 12-Apr-2012 Romain Guy <romainguy@google.com> Fix SurfaceTexture leak in TextureView
Bug #6318631

Change-Id: I282a7c9bb648365ba61c52a84ff510c8779130ef
/frameworks/base/core/java/android/view/HardwareRenderer.java
3da2dc9d4cc4785d2a0eacaf8d00222a46df150b 10-Apr-2012 Jesse Hall <jessehall@google.com> Merge "Release the scratch pbuffer surface after use"
3d4d2159bc84f03ea4be12af8c7de9500985bb82 06-Apr-2012 Chris Craik <ccraik@google.com> Merge "fix functor flag parsing, tweak process delay"
0872b370422eb1f9007b4717b8796543873e6390 02-Apr-2012 Jesse Hall <jessehall@google.com> Release the scratch pbuffer surface after use

Change-Id: Icf010969d19b20c3ddf64b44a78a115ac92f7ea5
/frameworks/base/core/java/android/view/HardwareRenderer.java
65924a3e56c2e7ac863f8e25e9f9a58b9db7d513 06-Apr-2012 Chris Craik <ccraik@google.com> fix functor flag parsing, tweak process delay

Change-Id: I0a679cc33f92ff6fd2e33db9ad58b52622def012
/frameworks/base/core/java/android/view/HardwareRenderer.java
2af3524beb75150d347accc925022daa53b4a789 05-Apr-2012 Jamie Gennis <jgennis@google.com> TextureView: add setSurfaceTexture method

This change adds support for transferring control of a TextureView's
SurfaceTexture between the UI framework and the application. It makes the
TextureView detach the SurfaceTexture from the UI framework's GLES context
before calling the surfaceTextureDestroyed callback, allowing the app to use
the SurfaceTexture in its own GLES context if it so chooses. This change also
adds the TextureView#setSurfaceTexture method, allowing an app have the
TextureView use a SurfaceTexture that already exists rather than creating a new
one.

Change-Id: Iac9cc917687e4239dd1c24eae553709aa37512da
/frameworks/base/core/java/android/view/HardwareRenderer.java
09280606dc5dc1b8f12f9317cf6922772b7d10a7 04-Apr-2012 Chet Haase <chet@google.com> Enhanced frame profiling from gfxinfo

You can now set the max number of frames being tracked by the gfxinfo
profiling data by doing 'adb shell setprop hwui.profil.maxframes #'.
Also, running gfxinfo automatically resets the data so that any set of
frame data always starts from the beginning.

Change-Id: I87ae3fb4d580741a1b2fba75be4ec540de7c52a4
/frameworks/base/core/java/android/view/HardwareRenderer.java
db8c9a6a4d9bf8c39f834b25611926caf21380f6 22-Mar-2012 Chet Haase <chet@google.com> Optimization of alpha with DisplayList properties

Some views (such as ImageView and TextView) handle non-opaque alpha
values directly. This was originally an optimization, but we can handle it faster
in many cases without this optimization when DisplayList properties are enabled.
Basically, if a view has non-overlapping rendering, we set the alpha value directly
on the renderer (the equivalent of setting it on the Paint object) and draw each
primitive with that alpha value. Doing it this way avoids re-creating DisplayLists
while getting the same speedup that onSetAlpha() used to get pre-DisplayList properties.

Change-Id: I0f7827f075d3b35093a882d4adbb300a1063c288
/frameworks/base/core/java/android/view/HardwareRenderer.java
8f3b8e32993d190a26c70c839a63d8ce4c3b16d9 28-Mar-2012 Romain Guy <romainguy@google.com> Allow fine-grained control over functors execution

Adds non-drawing execution mode

Change-Id: I82f92cf1b9a3b9ff2ca6d7427c4e02b73e04e6bf
/frameworks/base/core/java/android/view/HardwareRenderer.java
e6c966caa3aff3099e6fb00caefa10387f57b9c3 02-Apr-2012 Michael Jurka <mikejurka@google.com> Merge "Add frame counter to dumpGfxInfo"
7687882800f49e3fc3a14f1d7540412f77d6bd4d 30-Mar-2012 Romain Guy <romainguy@google.com> Detect surface resizes

HardwareRenderer normally relies on the window manager to be notified of
surface dimension changes. It is however possible to execute a drawing pass
before receiving the window manager notification. We must therefore compare
the actual size of the target surface to the window size and perform a full
redraw when they are not the same.

Change-Id: Idccc8592f3f777edee1ef67a98a4c2a825dcfba7
/frameworks/base/core/java/android/view/HardwareRenderer.java
a3fabff98590d26f0c362cb09dc378fece66215c 28-Mar-2012 Michael Jurka <mikejurka@google.com> Add frame counter to dumpGfxInfo

Change-Id: I016f706e32cbdbce014795d8fc537b15c389dc7a
/frameworks/base/core/java/android/view/HardwareRenderer.java
244ada1d35419b7be9de0fc833bb03955b725ffa 29-Mar-2012 Romain Guy <romainguy@google.com> Refactor GLES20Canvas/HardwareRenderer JNI layers

GLES20Canvas defined several JNI functions used only by HardwareRenderer.
Now that we have a JNI layer dedicated to HardwareRenderer we should
host the renderer related methods there.

Change-Id: I0bcb4ad0bcc1c4a37290df10c1685f2cfe5504ca
/frameworks/base/core/java/android/view/HardwareRenderer.java
6554943a1dd6854c0f4976900956e556767b49e1 27-Mar-2012 Romain Guy <romainguy@google.com> 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
/frameworks/base/core/java/android/view/HardwareRenderer.java
a998dff5d49a423aaf7097aa8f96bf5bdc681d25 24-Mar-2012 Romain Guy <romainguy@google.com> Destroy the hardware renderer when ViewRootImpl's die is post-poned
Bug #6109035

ViewRootImpl.die() can be invoked in such a way that doDie() will be
executed later. On memory limited device, an eglTerminate() may happen
before doDie() is executed which leads to unstable behaviors. This
change makes sure the renderer is destroyed as soon as possible.

Change-Id: I3322410cdd744b464951e2055aeade6069d1d673
/frameworks/base/core/java/android/view/HardwareRenderer.java
5d6999e1ca457948e06792ea6259ffa947c9fa81 23-Mar-2012 Romain Guy <romainguy@google.com> Don't make GLRenderer aware of GLES20Renderer

Change-Id: Ic9bab34070a3046b9252f6fd576b4d40553374fc
/frameworks/base/core/java/android/view/HardwareRenderer.java
e979e62ac7313b7cffe9b131bb8a99c356068b45 20-Mar-2012 Romain Guy <romainguy@google.com> Code cleanup

Change-Id: I390e92b4a778bd9dcde6535178c1a6b204b29fe4
/frameworks/base/core/java/android/view/HardwareRenderer.java
9d1992deaeb3d60d5928f05b649a2cc654ba98a3 13-Mar-2012 Chet Haase <chet@google.com> 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
/frameworks/base/core/java/android/view/HardwareRenderer.java
27ff913d56de8400083a13fc572e2812b32c890c 06-Mar-2012 Dianne Hackborn <hackbod@google.com> Work on more low memory reporting to apps.

There are now some new trim memory levels that are sent to
non-background applications as RAM becomes low.

There is a new API for an application to retrieve information
about memory trimming and such on demand.

Fixed various checks against the memory trim level to be
robust (not compare against exact values).

Change-Id: Ifd1c6151124350168aef20a94e517166fd2e03eb
/frameworks/base/core/java/android/view/HardwareRenderer.java
cfef12374c15b11b3c2a1041582be9728152e15d 23-Feb-2012 Romain Guy <romainguy@google.com> Perform early intersect to avoid unnecessary draws

Change-Id: I48d61c4488e622f93733d8e53a50c93e6a20166d
/frameworks/base/core/java/android/view/HardwareRenderer.java
b7ee8e2cb427820f7ac0e7e91b40705601516e9b 23-Feb-2012 Michael Jurka <mikejurka@google.com> am 6ad5d69d: am 0a232673: am bf378fd7: Don\'t allow screen invalidations to go outside bounds of screen

* commit '6ad5d69da5cff2e4b5fb7acdb2699e2315b83307':
Don't allow screen invalidations to go outside bounds of screen
bf378fd7d7a91085685fe9e5528b84c485041c77 23-Feb-2012 Michael Jurka <mikejurka@google.com> Don't allow screen invalidations to go outside bounds of screen

Fixes invalidation issue in Launcher

Change-Id: Iab32149489aed6884e917f0ac5a548d4ae26896e
/frameworks/base/core/java/android/view/HardwareRenderer.java
33f6beb10f98e8ba96250e284876d607055d278d 17-Feb-2012 Romain Guy <romainguy@google.com> Record possible clip rejects when recording display lists

This optimization allows us to quickly skip operations that lie
entirely outside of the known bounds of a display list. Because
of ViewGroup.setClipChildren, we must keep the operations recorded
in the display list. setClipChildren(false) is however a very
uncommon operation and we will therefore often benefit from this
new optimization.

Change-Id: I0942c864e55298e6dccd9977d15adefbce3ba3ad
/frameworks/base/core/java/android/view/HardwareRenderer.java
b04f7e9438e8f73081f9be3fda166098042263a5 15-Feb-2012 Romain Guy <romainguy@google.com> Make it easier to enable dirty regions debugging

adb shell setprop hwui.debug_dirty_regions true

Change-Id: Ifd269c443f5257b1e9c4ea987b134dcf6231106c
/frameworks/base/core/java/android/view/HardwareRenderer.java
a676ad7e34c9afbaafaeca8c3fe96e95c518828e 14-Feb-2012 Romain Guy <romainguy@google.com> New debugging tool in adb shell dumpsys gfxinfo

This tool lets you visualize the time it took, in ms, to:
- Build display lists ("Draw" phase)
- Process display lists ("Process" phase)
- Swap GL buffers ("Execute" phase)

To use this tool:
- adb shell setprop hwui.profile true
- adb shell dumpsys gfxinfo <process name>
- Copy the profile data and paste it in a spreadsheet
- Generate a graph (stacked graph) and enjoy

Change-Id: I7840c0ea0f153550425aa798e3ada2f357688cf5
/frameworks/base/core/java/android/view/HardwareRenderer.java
13631f3da855f200a151e7837ed9f6b079622b58 31-Jan-2012 Romain Guy <romainguy@google.com> Add debug markers to OpenGLRenderer

These markers will be used to group the GL commands by View in the
OpenGL ES debugging tool. This will help correlate individual GL
calls to higher level components like Views.

Change-Id: I73607ba2e7224a80ac32527968261ee008f049c6
/frameworks/base/core/java/android/view/HardwareRenderer.java
530041d3191ce817832a0108514617768e43cda6 26-Jan-2012 Romain Guy <romainguy@google.com> Add stencil buffer to the EGL config

Change-Id: If76c0cd6127534d90f9526b75c0f8e56259c6722
/frameworks/base/core/java/android/view/HardwareRenderer.java
b335fad4705348ff78d764fb4be53dcbe6b67abe 16-Jan-2012 Jamie Gennis <jgennis@google.com> hack up frame latency measurement

Change-Id: I6d9a466a23285304f0e229a5649815636ab5d6af
/frameworks/base/core/java/android/view/HardwareRenderer.java
893eace60992a640064b454d7ad477c1bbffcb1d 13-Jan-2012 Gilles Debunne <debunne@google.com> Merge "Sub display list in TextView"
44d79747b5e434e8f43928b5548442c65e40e5c3 13-Jan-2012 Romain Guy <romainguy@google.com> Remove unused parameter

Change-Id: I0896b2cdb9f1fa9c5e191e4ea425e22ac6f10f29
/frameworks/base/core/java/android/view/HardwareRenderer.java
b35ab7b72967adcfd01cec483a705dafe8b951d1 06-Dec-2011 Gilles Debunne <debunne@google.com> Sub display list in TextView

TextView uses a sub-display list to 'cache' the rendering of its
text. This saves time when drawing an editable text, where the blinking
cursor forces a re-draw twice per second, which creates pauses during
scrolling.

Added a sub-display list invalidation when an appearance span is
modified/added/removed.

Also added an invalidation of the display list when selection range
is changed.

Change-Id: I41e8068a12902b8a745c5bb77de8c77def76a270
/frameworks/base/core/java/android/view/HardwareRenderer.java
9477c6e6581ce97976250951f33e1297604ac777 09-Dec-2011 Romain Guy <romainguy@google.com> Enable dirty regions on newly created EGL surfaces

This change fixes an issue on some tiler architectures that do not
enable the swap buffer behavior by default on EGL surfaces.

Change-Id: Ibda1ae582da1a20afad3be9c3361080e72df5206
/frameworks/base/core/java/android/view/HardwareRenderer.java
95db2b20d7bc0aaf00b1d4418124f5cf0a755d74 01-Dec-2011 Jeff Brown <jeffbrown@google.com> Improve latency instrumentation.

Change-Id: I4edfa0a5659d207f7e46722e48ffa1dc43d2aa13
/frameworks/base/core/java/android/view/HardwareRenderer.java
08837c246c9c27902c59b41c8661c2f27a4aa2bc 28-Nov-2011 Chet Haase <chet@google.com> Fix flashing wifi dialog after rotating back from landscape.

There was an error in some of the OpenGL layer logic such that we would
occasionally set up a layer for rendering and then not clean up when it was
done. This caused future OpenGL rendering to go into that layer instead of
to the buffers being displayed on the screen, resulting in artifacts including
flashes and displaying of stale content. This happened specifically when
using the wifi settings dialog with the InputMethod keyboard displayed,
but it was probably visible in other situations as well.

Issue #5628248: Flickering/flashing after entering password for WiFi

Change-Id: I38139f620b310f4309570fa7224552d2ee633999
/frameworks/base/core/java/android/view/HardwareRenderer.java
31f2c2e94656530fbf6282803e62edb47e9a894d 21-Nov-2011 Romain Guy <romainguy@google.com> Notify views when EGL resources are about to be destroyed
Bug #5639899

Change-Id: I7c5d8bebf02294426f5b3ab1358a31c38a4fd064
/frameworks/base/core/java/android/view/HardwareRenderer.java
717a25dc2a411edb548859cd6870363346c71b01 16-Nov-2011 Dianne Hackborn <hackbod@google.com> Add new ManagedEGLContext class to help apps participate in memory trimming.

This class provides an API for an application to know when it is time to
destroy its EGL context when memory is being trimmed. By having this in
the framework, we can still detect whether it will be useful to destroy
any EGL contexts (because we know if doing so will destroy all of them).

Change-Id: I1eac8d640052778052926b875c7928008f752182
/frameworks/base/core/java/android/view/HardwareRenderer.java
50a66f0e9c5a85a6af4a99eb66656a69eba24572 11-Nov-2011 Romain Guy <romainguy@google.com> Merge "Terminate EGL when an app goes in the background" into ics-mr1
8ff6b9ebeeb24a6161ec6098e6bfdf8790ee5695 10-Nov-2011 Romain Guy <romainguy@google.com> Terminate EGL when an app goes in the background

This does not happen on high end gfx devices. This happens
only if only one EGL context is initialized in the current
process.

Change-Id: Ibd1737efdf84eef8a84108b05795440d1ae9964e
/frameworks/base/core/java/android/view/HardwareRenderer.java
a95826582773a194ed7fb66bc29c9b82fe9bb8d1 10-Nov-2011 Romain Guy <romainguy@google.com> Initialize egl_cache with an app writeable file

Change-Id: I5dda234feab0fedd6e4179a80715ae20dee1c833
/frameworks/base/core/java/android/view/HardwareRenderer.java
40e0383dce630ed9b2b1aa0e497709b89dfab6ef 06-Oct-2011 Chet Haase <chet@google.com> Fix issue #5384631: hw windows not resizing correctly

When the SystemUi becomes visible, the activity window resizes.
The hardware renderer was not begin resized to suit, so it was drawing
to a surface larger than that of the activity window, and some of the
rendering (like the action bar) appeared off the screen.

The fix is to keep track of the surface size in HardwareRenderer and to
recreate the surface when the size changes.

This change also removes the BUFFER_CHANGE flag from WindowManager.LayoutParams.
The only reason the flag existed was to trigger a hardware surface recreation,
but checking the old/new size is a more direct way of handling this.

Change-Id: I9d6bf6385794886d1d93c60609c170864cdcdfab
/frameworks/base/core/java/android/view/HardwareRenderer.java
5d927c2d8e832fcfcb0154c8741f896001141ef4 02-Sep-2011 Dianne Hackborn <hackbod@google.com> Fix issue #5150899: Call activity takes 15MB we never get back.

Persistent process can no longer use hardware acclerated drawing
when running on a low-memory device.

Change-Id: I3110335617af1c98fcede9bf41f4a1d0c20d0e87
/frameworks/base/core/java/android/view/HardwareRenderer.java
16260e73f6c1c9dc94acf0d328a3c564426b8711 01-Sep-2011 Romain Guy <romainguy@google.com> Dispatch onDetachedFromWindow before destroying everything
Bug #5245686

Change-Id: I637178ee0bb47fbec9b59198b388bb8de22c1786
/frameworks/base/core/java/android/view/HardwareRenderer.java
eca9b1f53c2c291cbfb89b5f3cc45db7bdca6c7d 26-Aug-2011 Romain Guy <romainguy@google.com> Prevent crash in VPN settings
Bug #5217245

Change-Id: Ibacf4cbd40537cd417f1518b5ac4367a3f3d7d03
/frameworks/base/core/java/android/view/HardwareRenderer.java
407ec78b828173257b0c5dae221649a4ccd8b058 25-Aug-2011 Romain Guy <romainguy@google.com> Add OpenGL backend to ImageWallpaper
Bug #5204874

Currently disabled.

Change-Id: I5e7b35dce2981b0691f107e39c6394b260466543
/frameworks/base/core/java/android/view/HardwareRenderer.java
86e3e22ba81fb75a5c7e5e007ca1c0cacfda3afb 16-Aug-2011 Romain Guy <romainguy@google.com> Prevent NPE in HardwareRenderer
Bug #5169815

Change-Id: I168b61f3a6cea679e455cf28282b69bb7f3072e5
/frameworks/base/core/java/android/view/HardwareRenderer.java
50d133e290468fd149b5c03e46549afca2ee05f8 13-Aug-2011 Romain Guy <romainguy@google.com> <blink/> is not an acceptable default behavior.
Bug #5156334

Change-Id: I9f803b090e81f4e490d0cccd6347a0f9f64bd20f
/frameworks/base/core/java/android/view/HardwareRenderer.java
1d0c708961f824ac5171238c205a7bf328d5d8a5 04-Aug-2011 Romain Guy <romainguy@google.com> Destroy the EGL surface when the ViewRootImpl surface is invalid
Bug #5109839

Change-Id: Icebde9abf43b852397a73ffef519004993b46901
/frameworks/base/core/java/android/view/HardwareRenderer.java
d3facf341bf106588aade72c0164532cd4bf941f 03-Aug-2011 Romain Guy <romainguy@google.com> Don't recreate the EGL surface if the surface is not ready
Bug #5114545

Change-Id: I95149dc18e0582ca358716a6b0d89a4edc8fca26
/frameworks/base/core/java/android/view/HardwareRenderer.java
cf15efba0792b052dca5baa350d9fb00e6a60667 02-Aug-2011 Romain Guy <romainguy@google.com> Properly cancel pending buffers on window size change

Change-Id: Id6108ce61a971673f3ebc8270e9dd00849c91ae5
/frameworks/base/core/java/android/view/HardwareRenderer.java
357c942462e4eb1d0b2e91b3fe8ec9ac7524bbed 02-Aug-2011 Romain Guy <romainguy@google.com> Prevent crash with NPE in HardwareRenderer
Bug #5109839

Change-Id: I402fc70ff4b25d273cf3150759d6f2d4d971975d
/frameworks/base/core/java/android/view/HardwareRenderer.java
1a7b1158c5c2566808c39638d54cae624bd2a361 30-Jul-2011 Romain Guy <romainguy@android.com> Trim HardwareRenderer memory more frequently.

Change-Id: I92e72ce5da324f9ffcfdf7a54d8b368c2531799c
/frameworks/base/core/java/android/view/HardwareRenderer.java
c68c913d357e2955d4bd7ca52829071e531c7825 29-Jul-2011 Dianne Hackborn <hackbod@google.com> Various work on out of memory managment.

- Improve how we handle processes that have shown UI, to take care
of more cases where we want to push them into the background LRU
list.
- New trim memory level for when an application that has done UI
is no longer visible to the user.
- Add APIs to get new trim memory callback.
- Add a host of new bind flags to tweak how the system will adjust
the OOM level of the target process.

Change-Id: I23ba354112f411a9f8773a67426b4dff85fa2439
/frameworks/base/core/java/android/view/HardwareRenderer.java
65b345fa22b878e141b8fd8ece9c208df00fa40f 28-Jul-2011 Romain Guy <romainguy@google.com> Reclaim more memory, more often.

Yay.

Change-Id: I04557ad575c307a55088549f48f0e9ad994b7275
/frameworks/base/core/java/android/view/HardwareRenderer.java
6d7475d666baefaa3ba9f0dcee25238739454241 28-Jul-2011 Romain Guy <romainguy@google.com> Destroy layers and flush layers cache when a window is destroyed.

Change-Id: I3fa1bc3ff50fb99e3d2e490925bd6b0a0f809fff
/frameworks/base/core/java/android/view/HardwareRenderer.java
912a7b32d0c59ba38265c5dd6ff84ce93f909a7f 27-Jul-2011 Romain Guy <romainguy@google.com> Make sure we have a current EGL context when invoking EGL
Bug #5081795

Change-Id: Iee3382d362a71c1e6c5c498b319bf7f7bcf5a2f0
/frameworks/base/core/java/android/view/HardwareRenderer.java
29d23ecfd8612ecd4a7b2140acd344934b73a558 25-Jul-2011 Romain Guy <romainguy@google.com> Add debug flag to print out the EGL configuration used by libhwui

Change-Id: I8be5aebb60b7441342d430131168d11dc551ec34
/frameworks/base/core/java/android/view/HardwareRenderer.java
484c719c1c4a86d10d7be821782a808d0e12ea4e 25-Jul-2011 Romain Guy <romainguy@google.com> Add ELG config debugging to HardwareRenderer

Change-Id: I1954111e999ea95982c273eb50b9ea82397bc823
/frameworks/base/core/java/android/view/HardwareRenderer.java
162a0217563f4665da6eb183dfce0fef740f641f 22-Jul-2011 Jeff Brown <jeffbrown@google.com> 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
/frameworks/base/core/java/android/view/HardwareRenderer.java
566b3efb25299d2a9c8ae827522802bad965426a 19-Jul-2011 Romain Guy <romainguy@google.com> Let HardwareRenderer support multiple threads.

This change will be useful to create multiples instances of
HardwareRenderer outside of ViewRootImpl. This will allow
the use of hardware accelerated canvas on TextureView or
for live wallpapers.

Change-Id: I877e43a31ba83d98a1a30556813c7e8a8a920eb5
/frameworks/base/core/java/android/view/HardwareRenderer.java
bdf7609867a3f886455c51dba91623a86cceb6e2 19-Jul-2011 Romain Guy <romainguy@google.com> Trim OpenGLRenderer's memory usage whenever possible

Change-Id: I9225077184f374b1a43300add15cc1d5b6869d1c
/frameworks/base/core/java/android/view/HardwareRenderer.java
08645eb0f4a8d73b2b2f26d3232f45cf459a27bc 13-Jul-2011 Romain Guy <romainguy@google.com> Revert "Don't preload HardwareRenderer, its static initialization is process dependant."

This reverts commit 821e24336b3ab1f902fc3ee8da423226f50b540c.
/frameworks/base/core/java/android/view/HardwareRenderer.java
821e24336b3ab1f902fc3ee8da423226f50b540c 13-Jul-2011 Romain Guy <romainguy@google.com> Don't preload HardwareRenderer, its static initialization is process dependant.

Change-Id: I229357aaaa10b19209983c122f98dd3c07e01d7f
/frameworks/base/core/java/android/view/HardwareRenderer.java
039857520b1a03a52051b966d87d587225bdfcc3 12-Jul-2011 Romain Guy <romainguy@google.com> Always make GL calls with a valid EGL context.
Bug #5010760

Change-Id: If7500ef69683948e727df1406f458f18b11259d1
/frameworks/base/core/java/android/view/HardwareRenderer.java
7e1160e8664a9c5c79367f4ba3c2266a39bbcef5 09-Jul-2011 Romain Guy <romainguy@google.com> Always redraw the UI on orientation change
Bug #4994715

In some cases, on some architectures, the hardware renderer could fail
to properly render a window after an orientation change. The fix is
to force the GL driver to drop any existing buffer to make sure the
next buffer used to draw has the correct geometry.

This change also fixes an issue that was preventing partial screen
updates from being properly enabled.

Change-Id: I874a48590845a8624425130af7db8e20022895dd
/frameworks/base/core/java/android/view/HardwareRenderer.java
9ace8f5e79e76893fe4ca9e4d10f6c4056330485 08-Jul-2011 Romain Guy <romainguy@google.com> Use NEAREST filtering for layers whenever possible.

Change-Id: Id5bee1bd4a322cf93e8000b08e18f1e1b058648e
/frameworks/base/core/java/android/view/HardwareRenderer.java
02ccac69fd1c0a03c24c5f3ace0ad4bed337b1fd 24-Jun-2011 Romain Guy <romainguy@google.com> Code cleanup

Change-Id: I64c346004e0adf9a776d0315534d4fe445f0c0ca
/frameworks/base/core/java/android/view/HardwareRenderer.java
a9489274d67b540804aafb587a226f7c2ae4464d 23-Jun-2011 Romain Guy <romainguy@google.com> Add the ability to specify the opacity of a TextureView

TextureView assumes its content is opaque by default.

Change-Id: Iba873423566a5b67c388081838bd910dceba32ba
/frameworks/base/core/java/android/view/HardwareRenderer.java
e5e0c50f7dfaccc220725c5595080e921ffda1e4 16-Jun-2011 Romain Guy <romainguy@android.com> Properly refcount SurfaceTexture in the JNI layer.

Change-Id: I4b4c8020c13b8d6ce0d302fe42410033bf5785a6
/frameworks/base/core/java/android/view/HardwareRenderer.java
77a811610f99e21da7f88dafef60d09f345d0506 15-Jun-2011 Romain Guy <romainguy@google.com> Add TextureView.getBitmap()

This API can be used to get a Bitmap copy of the content of a
TextureView.

Change-Id: I07522216c353720fba5cab333174f58f484eb911
/frameworks/base/core/java/android/view/HardwareRenderer.java
6f7d9394ec69e9fb38ca5fc2caf6d2aef6f7442d 02-Jun-2011 Romain Guy <romainguy@google.com> Take advantage of EGL_BUFFER_PRESERVED on IMG.

The IMG architecture does not support the EGL_SWAP_BEHAVIOR_PRESERVED_BIT
in EGL configurations. This bit is used only to be able to change the
EGL_SWAP_BEHAVIOR, which matters when the default behavior is not the
one we want. However on IMG, the default swap behavior is the one we
desire.

Change-Id: Iff5980c97df9e41bc837e424baf83b8eadbb7161
/frameworks/base/core/java/android/view/HardwareRenderer.java
7d70fbf0b5672bada8b25f065bc292796c3d4812 25-May-2011 Romain Guy <romainguy@google.com> Use OpenGL to render transition bitmaps.

When the IME is opened/dismissed, ViewAncestor would draw the
view hierarchy into a Bitmap, using the software rendering
pipeline. With this change, ViewAncestor will now use OpenGL.

Change-Id: I69e24570e12ff55f6f3cec18a664b33410a0eaf4
/frameworks/base/core/java/android/view/HardwareRenderer.java
c6cc0f8c19d9eccf408a443fa2bf668af261dcd0 12-Apr-2011 Joe Onorato <joeo@google.com> Rename ViewRoot to ViewAncestor.

ViewRoot is about to be a new public class for poking at ViewAncestor.

Change-Id: Ie95d707c6d8bbb48f78d093d7b2667851812a7d5
/frameworks/base/core/java/android/view/HardwareRenderer.java
df0a7fbdcff3c683641b7980da50a7d0eebe0876 03-May-2011 Romain Guy <romainguy@google.com> Merge "Allows to render with an OpenGL context inside a TextureView."
8f0095cd33558e9cc8a440047908e53b68906f5f 03-May-2011 Romain Guy <romainguy@google.com> Allows to render with an OpenGL context inside a TextureView.

Change-Id: I59453f7fc3997f0502a1c5d325d37fed376fabc7
/frameworks/base/core/java/android/view/HardwareRenderer.java
e91a9c7ab075c43e983fdeb9af80447caa501337 02-May-2011 Romain Guy <romainguy@google.com> Remove unnecessary code.

Change-Id: I0352bf861192df51fe78873d439e8d7ff887118e
/frameworks/base/core/java/android/view/HardwareRenderer.java
aa6c24c21c727a196451332448d4e3b11a80be69 29-Apr-2011 Romain Guy <romainguy@google.com> New widget: TextureView
Bug #4343984

TextureView can be used to render media content (video, OpenGL,
RenderScript) inside a View.

The key difference with SurfaceView is that TextureView does
not create a new Surface. This gives the ability to seamlessly
transform, animate, fade, etc. a TextureView, which was hard
if not impossible to do with a SurfaceView.
A TextureView also interacts perfectly with ScrollView,
ListView, etc. It allows application to embed media content
in a much more flexible way than before.

For instance, to render the camera preview at 50% opacity,
all you need to do is the following:

mTextureView.setAlpha(0.5f);
Camera c = Camera.open();
c.setPreviewTexture(mTextureView.getSurfaceTexture());
c.startPreview();

TextureView uses a SurfaceTexture to get the job done. More
APIs are required to make it easy to create OpenGL contexts
for a TextureView. It can currently be done with a bit of
JNI code.

Change-Id: Iaa7953097ab5beb8437bcbbfa03b2df5b7f80cd7
/frameworks/base/core/java/android/view/HardwareRenderer.java
4e91a180be46c0c7c3bf398d4df4cbe2404216b5 07-Apr-2011 Jeff Brown <jeffbrown@google.com> Coalesce input events that arrive faster than 333Hz.

Some drivers report individual finger updates one at a time
instead of all at once. When 10 fingers are down, this can
cause the framework to have to handle 10 times as many events
each with 10 times as much data. Applications like
PointerLocation would get significantly bogged down by all
of the redundant samples.

This change coalesces samples that are closely spaced in time,
before they are dispatched, as part of the motion event batching
protocol.

Increased the size of the InputChannel shared memory buffer so
that applications can catch up faster if they accumulate a
backlog of samples.

Added logging code to help measure input dispatch and drawing
latency issues in the view hierarchy. See ViewDebug.DEBUG_LATENCY.

Change-Id: Ia5898f781f19901d2225c529a910c32bdf4f504f
/frameworks/base/core/java/android/view/HardwareRenderer.java
aaceeb0c5be11121a81e44b9633c06fc5c0fcd4d 24-Mar-2011 Romain Guy <romainguy@google.com> Use the correct API to query system properties.

Change-Id: Ie120dee0e24959d4db3fdb0100b6d8fe7fe46cdb
/frameworks/base/core/java/android/view/HardwareRenderer.java
7b5b6abf852c039983eded25ebe43a70fef5a4ab 15-Mar-2011 Romain Guy <romainguy@google.com> Fix rendering artifact in edge fades.
Bug #4092053

The problem always existed but was made visible by partial invalidation.
When saving a layer, the renderer would try to postpone glClear()
operations until the next drawing command. This however does not work
since the clip might have changed. The fix is rather simple and
simply gets rid of this "optimization" (that turned out to be
usless anyway given how View issues saveLayer() calls.)

This change also fixes an issue with gradients (color stops where
not properly computed when using a null stops array) and optimizes
display lists rendering (quickly rejects larger portions of the
tree to avoid executing unnecessary code.)

Change-Id: I0f5b5f6e1220d41a09cc2fa84c212b0b4afd9c46
/frameworks/base/core/java/android/view/HardwareRenderer.java
e294d41593f13edc5598cf62f8a89e573b3eb653 09-Mar-2011 Romain Guy <romainguy@google.com> Prevents NPE when a View was detached
Bug #4068284

Change-Id: Ied1c9b8d32a3e9957c6b165642ba40bbdaf35d53
/frameworks/base/core/java/android/view/HardwareRenderer.java
cabfcc1364eb7e4de0b15b3574fba45027b45cfc 08-Mar-2011 Romain Guy <romainguy@google.com> Add support for partial invalidates in WebView
Bug #3461349

This change also fixes two bugs that prevented partial invalidates
from working with other views. Both bugs were in our EGL implementation:
they were preventing the caller from comparing the current context/surface
with another context/surface. This was causing HardwareRenderer to always
redraw the entire screen.

Change-Id: I33e096b304d4a0b7e6c8f92930f71d2ece9bebf5
/frameworks/base/core/java/android/view/HardwareRenderer.java
648251710162cdaf7371012a1cbb79b9bc5bc0e4 03-Mar-2011 Dianne Hackborn <hackbod@google.com> Fix issue #3485923: Gmail crash

Allow application to try to recover if a surface OOM error
happens on the client side.

Change-Id: I0308bd99647a35e4bcac448340b7fc6330a828f6
/frameworks/base/core/java/android/view/HardwareRenderer.java
069ea0e31a0aa283c83fae79f31a1798a6d85dde 08-Feb-2011 Romain Guy <romainguy@google.com> Better handling of EGL_SWAP_BEHAVIOR_PRESERVED_BIT
Bug #3410832
Bug #3410834

Change-Id: I6025d6b7200e4d23e43f783e9401df13a13e7b63
/frameworks/base/core/java/android/view/HardwareRenderer.java
62687ec12cb8e0b1d4044a235b1387b9a8c3b4b4 03-Feb-2011 Romain Guy <romainguy@google.com> Don't clobber the local dirty rect after rendering a layer.
Bug #3417254
Bug #3413433

Change-Id: I8045e9ec414ebe4ce4d38124142a00726d2c634d
/frameworks/base/core/java/android/view/HardwareRenderer.java
d88f54c5c4ce59585b8b9e6009836f14c00be743 25-Jan-2011 Romain Guy <romainguy@google.com> Fix rendering issues in Movie Studio.

Change-Id: I5b293767b9bdedeef0df4d27a179d0da48d7fe32
/frameworks/base/core/java/android/view/HardwareRenderer.java
7d7b5490a0b0763e831b31bc11f17d8159b5914a 25-Jan-2011 Romain Guy <romainguy@google.com> Enable partial invalidates when rendering with OpenGL.

Change-Id: Ie8be06c4776b815e8737753eb8003b4fd8936130
/frameworks/base/core/java/android/view/HardwareRenderer.java
daf98e941e140e8739458126640183b9f296a2ab 10-Jan-2011 Chet Haase <chet@google.com> 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
/frameworks/base/core/java/android/view/HardwareRenderer.java
2a83f001fdb189f945e82e81e717ba204824b112 19-Jan-2011 Romain Guy <romainguy@google.com> Recreate the EGL surface when ViewRoot's surface changes.
Bug #3306150

Change-Id: Ifbf0ab9deca7a34eff7d844ea7276d12d7284788
/frameworks/base/core/java/android/view/HardwareRenderer.java
4f6aff386045000c2c03b903c7109cb42092b7ea 13-Jan-2011 Romain Guy <romainguy@google.com> Only enable GL rendering on the main thread.

Change-Id: I41950f4c0a5063ee5d6950cf137eb60a1c7a72fe
/frameworks/base/core/java/android/view/HardwareRenderer.java
6c319ca1275c8db892c39b48fc54864c949f9171 11-Jan-2011 Romain Guy <romainguy@google.com> Better backend for hardware layers.

With this new backend, a hardware layer is only recreated when
its associated view is udpated. This offers fast composition
in GL and fast update of the layer in GL as well.

Change-Id: I97c43a612f5955c6bf1c192c8ca4af10fdf1d076
/frameworks/base/core/java/android/view/HardwareRenderer.java
b8c0de2c2726f4e8f0029710047efe0c8e6661ed 13-Dec-2010 Romain Guy <romainguy@google.com> Improve error detection in HardwareRenderer.draw().
Bug #3280872

This should avoid crashes before we detect a GL error and we switch over to
software rendering.

Change-Id: Ieb4992576d20014e194aab863a456f09c5e19672
/frameworks/base/core/java/android/view/HardwareRenderer.java
9745fae73b584f3e9a9c304098ed9b11f506e93b 08-Dec-2010 Romain Guy <romainguy@google.com> Fallback to software rendering when eglMakeCurrent fails.
Bug #3200621

Change-Id: Id8a455e64a1af23840752124b49c070c00e5e2a6
/frameworks/base/core/java/android/view/HardwareRenderer.java
67f27952c1bcb2230beef9b5ca0bf42edad436a9 08-Dec-2010 Romain Guy <romainguy@google.com> Correctly release the OpenGL Canvas on EGL error.

Change-Id: Ib31fd8445f7ce5f7aa7e0205de0e7db80d024fc2
/frameworks/base/core/java/android/view/HardwareRenderer.java
0f761d6b8f5d5a607c87dbcdca6fe0ec7911970e 01-Dec-2010 Dianne Hackborn <hackbod@google.com> Implement issue #3201795: Improve transition when keyboard comes up

ViewRoot now does a fade animation between a snapshot of the previous
layout to the new one when its content rect changes.

Also tweaked some things in the window manager to fix problems in
deciding when to animate the movement of a window and when not to.

Change-Id: I9b4b3bd53c8258bd39a2f2fc315e77cfc56a409c
/frameworks/base/core/java/android/view/HardwareRenderer.java
5c13d89c1332fcc499379b9064b891187b75ca32 08-Oct-2010 Chet Haase <chet@google.com> Optimizing display lists by referencing pointers to resources instead of copying them

Change-Id: I81ad3551d74aa1e5bb64d69e33d2eb29a6c1eb6a
/frameworks/base/core/java/android/view/HardwareRenderer.java
d10cd5765a2b706fc174f16b951d6b0a5d3740d3 10-Oct-2010 Romain Guy <romainguy@google.com> Always create OpenGL accelerated windows in RGBA 8888.

Bug #3081600

The OpenGL renderer in libhwui uses a single EGL context per process and
thus create it with an RGBA 8888 EGL configuration. To ensure that all
windows are compatible with this configuration, this change modifies
the window manager and SurfaceFlinger.

The window manager now checks the window's flags and if the window is
hardware accelerated, it forces the window's pixel format to be
translucent when creating the surface. The window itself is still
marked as opaque if we know that the window will be opaque on screen.
This keeps existing optimizations in place.

Similarly in SurfaceFlinger, a translucent Surface can now be created
with the Surface.OPAQUE flag, indicating SurfaceFlinger that the surface
does not require blending, despite its RGBA 8888 configuration.

Change-Id: Ic747b6b12564ba064412d842117880fcc199eb7c
/frameworks/base/core/java/android/view/HardwareRenderer.java
53ca03d9a3a6a95286302802173c4820b16328ce 09-Oct-2010 Romain Guy <romainguy@google.com> Don't set hwAccelerated=true when libhwui is not present.

Change-Id: I6df5a89e4b4d94d76e96b5d0a678b7a8f646268a
/frameworks/base/core/java/android/view/HardwareRenderer.java
5d3e2ea6f3a02b5bd073887eabfa4f50a59bbcf0 08-Oct-2010 Mike Dodd <mdodd@google.com> HardwareRenderer: When throwing an exception because of an EGL
error, include the specific error.

Change-Id: I8e4b0cdbc207824df4f4bb55c3b379b0ee4aeec2
/frameworks/base/core/java/android/view/HardwareRenderer.java
6b7bd24659fb175fe1f0e97c86c18969918b496a 07-Oct-2010 Romain Guy <romainguy@google.com> Don't clear the framebuffer when not needed.
/frameworks/base/core/java/android/view/HardwareRenderer.java
b051e895ccb696604349c6c5efe7c4747e1d1ab6 29-Sep-2010 Romain Guy <romainguy@google.com> Add display lists caching.

Change-Id: Iac3a248a81ed8cb076a83ef9d186b8ebba685b4c
/frameworks/base/core/java/android/view/HardwareRenderer.java
9a40babc62416259d18783ce8c03c00042ec317b 24-Sep-2010 Romain Guy <romainguy@google.com> Add drawing profiling to the HardwareRenderer.

Change-Id: Idf410f1764f3e73590b587d0d76a8d10c021f056
/frameworks/base/core/java/android/view/HardwareRenderer.java
b025b9c8b4efefadb01937db61a1f8ee7d2452bf 16-Sep-2010 Romain Guy <romainguy@google.com> Better error handling in the OpenGL renderer.

Add a glGetError() check on every frame
Don't attempt to create textures larger than the maximum size allowed

Change-Id: Iee4afae16089406dbe8bf10fc93b674f1271a0ca
/frameworks/base/core/java/android/view/HardwareRenderer.java
5233920a216302b4aa03b100c32e8b3efe33cbc6 04-Sep-2010 Romain Guy <romainguy@google.com> Prevent the system process from using the HardwareRenderer.

This change allows applications with the system UID to use the hardware
renderer.

Change-Id: I3c5d776ee9c07bb14933dbe3060cad4175e4fc95
/frameworks/base/core/java/android/view/HardwareRenderer.java
4caa4ed120a86e855d4d3b6b455c6fb9ca22e365 25-Aug-2010 Romain Guy <romainguy@google.com> Only destroy the GL Canvas when necessary.

Change-Id: I6caf4873b02dc4a6d7c8c91925d2447b3b0e0593
/frameworks/base/core/java/android/view/HardwareRenderer.java
fb8b763f762ae21923c58d64caa729b012f40e05 24-Aug-2010 Romain Guy <romainguy@google.com> Use only one GL context per process, share chaches.

Change-Id: Ieabaa25338d2f4b8d4fd90e7401ad6e7452eae11
/frameworks/base/core/java/android/view/HardwareRenderer.java
8fb954263dd2f918ad339045cc6d82e346515599 18-Aug-2010 Romain Guy <romainguy@google.com> Fix save()/restore() issues in the OpenGL renderer.

The save stack now behaves exactly like in Skia.

Change-Id: If7e642f41f2c8f693f6e8c26cba81507d466562e
/frameworks/base/core/java/android/view/HardwareRenderer.java
959c91f7f7b4f921d341264f5b4ef54e702a0df0 12-Aug-2010 Romain Guy <romainguy@google.com> Bunch of fixes.

Fixes memory leak, fixes multiple context support, fix 3d transforms.

Change-Id: I7462cfbc57857dbd4de4e76b9d4cba58a1bce77b
/frameworks/base/core/java/android/view/HardwareRenderer.java
61c8c9c5b2006d18e9310b6521c65b36ffe75ce4 10-Aug-2010 Romain Guy <romainguy@google.com> Fix tons of bugs and add new text rendering support.

Change-Id: I326c66b10784006f6df2f12d38e120cef94cd0d7
/frameworks/base/core/java/android/view/HardwareRenderer.java
163935113919a184122b8b3bd672ef08c8df65dc 08-Aug-2010 Romain Guy <romainguy@android.com> Make libhwui entirely optional.

The makefile variable USE_OPENGL_RENDERER must be set to true to compile
libhwui and the related code in the JNI layer.

This change also removes obsolete APIs from Canvas that must not be used
and would be confusing if left in. These APIs were remnants of our first
attempt at an OpenGL renderer for the view hierarchy and had not been
taken out before Android 1.0 was released.

Change-Id: I2475ff1307212bab26c926724f3c508681c7dae1
/frameworks/base/core/java/android/view/HardwareRenderer.java
dbd77cd444f89d94ec5333223c1bc17dbe0c90cd 09-Jul-2010 Romain Guy <romainguy@google.com> Remove support for density compatibility in the hardware renderer.

Change-Id: I535e919986e5ccfb344ede8516ccd84c02642823
/frameworks/base/core/java/android/view/HardwareRenderer.java
f86ef57f8bcd8ba43ce222ec6a8b4f67d3600640 01-Jul-2010 Romain Guy <romainguy@google.com> Don't use full screen FBOs, this dramatically increase performance.

The next step will be to add an FBO cache to avoid churning memory on every
frame we draw. This change also adds support for drawBitmap(Bitmap, Matrix, Paint).

Change-Id: I7825cdcf0cad9bffe6219e05d8328a53d4a6e583
/frameworks/base/core/java/android/view/HardwareRenderer.java
ce0537b80087a6225273040a987414b1dd081aa0 30-Jun-2010 Romain Guy <romainguy@google.com> Add hooks for drawBitmap().

Change-Id: I58e962c3a8b2bc75c2605fe369ad3002579d86e0

Add texture cache.

Change-Id: I1c0e5581d228869e114438258a1014e33e024ad7
/frameworks/base/core/java/android/view/HardwareRenderer.java
e4d011201cea40d46cb2b2eef401db8fddc5c9c6 17-Jun-2010 Romain Guy <romainguy@google.com> Add libhwui, to hardware accelerate the Canvas API using OpenGL ES 2.0.

This is the initial checkin to setup the library and turn on OEGL ES 2.0
in ViewRoot, not a functional renderer.

Change-Id: I6655c54166e2967da2e21e7d6dcfba78bf113b44
/frameworks/base/core/java/android/view/HardwareRenderer.java
e3924992733234fd7d7a614c165a94e0a2cd6b84 11-Jun-2010 Romain Guy <romainguy@google.com> Refactor HardwareRenderer to allow the use of OpenGL ES 2.0.

The current OpenGL ES 2.0 HardwareRenderer will fail and does not
even attempt to create a Canvas. The next step will be to create
a new native-backed Canvas that relies on OpenGL ES 2.0 and bypasses
the current OpenGL ES 1.0 implementation done in Skia.

Change-Id: I7a8e9f87f316e9137ef191bb5609213e160eaa4c
/frameworks/base/core/java/android/view/HardwareRenderer.java
2d6145993e19d2bb664766dbaf3c1e9ad3d12cdc 10-Jun-2010 Romain Guy <romainguy@google.com> Move OpenGL support out of ViewRoot into a new HardwareRenderer class.

Change-Id: Iffaed924a5defc3c4df26223c390dc27eee115b1
/frameworks/base/core/java/android/view/HardwareRenderer.java