History log of /frameworks/base/core/java/android/view/GLES20Canvas.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
ef09a210dd6ea481158b7028ec2424a7f5769ed2 25-Sep-2012 Romain Guy <romainguy@google.com> Don't destroy the same texture twice
Bug #7221449

SurfaceTexture already deletes the GL texture when detachFromContext
is invoked. The newly introduced refcount would casue the Layer
object to be destroyed later and attempt to delete the GL texture
again. By the time the second cleanup occurs, the texture name
might have been reused by somebody else, resulting in erroneous
behaviors.

Change-Id: I257c589fea64b34c00f46fbfaa7732e6854a5e41
/frameworks/base/core/java/android/view/GLES20Canvas.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/GLES20Canvas.java
603f6de35f21d74ae242d52d501f4f5c25ff4f4c 15-Sep-2012 Chet Haase <chet@google.com> Fix occasional crash bug with layers

Launcher occasionally crashes with a stack trace indicating that the memory
of a Layer object is corrupt. It is possible for us to delete a Layer
structure and then, briefly, use it to draw a DisplayList again before
that DisplayList gets recreated (without the layer that got deleted).

When this happens, if the memory got corrupted, it's possible to crash.

The fix is to add Layer to the other objects which we currently refcount
(bitmaps, shaders, etc.). Then instead of deleting a Layer, we decrement the
refcount. We increment when creating it, then increment it again when it's
referenced from a DisplayList. Then we decrement the refcount instead of
deleting it, and decrement when we clear a DisplayList that refers to it.
Then when the refcount reaches 0, we delete it.

Issue #6994632 Native crash in launcher when trying to launch all apps screen

Change-Id: I0627be8d49bb2f9ba8d158a84b764bb4e7df934c
/frameworks/base/core/java/android/view/GLES20Canvas.java
d15ebf25c595b855f6978d0600218e3ea5f31e92 05-Sep-2012 Chet Haase <chet@google.com> Enable changing properties of layer paint

Previously, to draw a layered view with a changed Paint object for the
drawLayer operation, you'd have to invalidate the parent view, to get the
native DisplayList to pick up the new Paint properties. This change adds
API and functionality so that the developer can call setLayerPaint(), which
does the proper invalidation (lightweight, doesn't cause redrawing the view).

Issue #6923810 Make it easy to efficiently animate a layer's Paint

Change-Id: I7fea79788d50f6d9c86dd5e5b2a4490cb95142bb
/frameworks/base/core/java/android/view/GLES20Canvas.java
f0af1d5cb255f136d2fff773be7518ffd7ae3b93 12-Jul-2012 Romain Guy <romainguy@google.com> Remove unused View.flushLayer() API

Change-Id: I5d4c7388afb5265964ab6b769cc0abfee9745c84
/frameworks/base/core/java/android/view/GLES20Canvas.java
846a533945576e5cb1a66529ca3a52d71749f04f 12-Jul-2012 Romain Guy <romainguy@google.com> Update layers' opaque property when needed

Before this change, changing a View's opacity would not be reflected
by hardware layers. This could cause layers to retain their previous
opacity.

Change-Id: Iba2c8b4242deca021651df9324cc7c585a64653d
/frameworks/base/core/java/android/view/GLES20Canvas.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/GLES20Canvas.java
e651cc6239616a202f6e96ebc2ed93b4b8b3627c 15-May-2012 Romain Guy <romainguy@google.com> Remove all Dalvik allocations from Cavnas.drawBitmap(int[], ...)

Change-Id: Ie28538a2104d21154fdc78a56525e7403f08287d
/frameworks/base/core/java/android/view/GLES20Canvas.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/GLES20Canvas.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/GLES20Canvas.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/GLES20Canvas.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/GLES20Canvas.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/GLES20Canvas.java
2bf68f063b0077ddef6ebfe54f2ae5e063c2c229 02-Mar-2012 Romain Guy <romainguy@google.com> Deferred layer updates

Change-Id: I83d9e564fe274db658dcee9e0cc5bbf9223ebb49
/frameworks/base/core/java/android/view/GLES20Canvas.java
765dcf32307dbd93ce43f064c426ce157be2d2ae 27-Feb-2012 Romain Guy <romainguy@google.com> Small optimization for the battery status screen

Change-Id: I2833ba4009f6c284c9ef33c45a4dd7365423fb5f
/frameworks/base/core/java/android/view/GLES20Canvas.java
325740fb444af8fc7fb0119b2e30ce322c2ae134 25-Feb-2012 Romain Guy <romainguy@google.com> Add hooks to implement Canvas.drawTextOnPath() in GL

Change-Id: I165c9e05facf5365aa6850605688e538640c7fcc
/frameworks/base/core/java/android/view/GLES20Canvas.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/GLES20Canvas.java
445c83c7755fae179cf3328e89307e2775e97a5e 17-Feb-2012 Romain Guy <romainguy@google.com> Ensure we always reset graphics modifiers
Bug #6025838

If a modifier is setup and not reset crashes can occur.

Change-Id: I715524fb46928f1f06499cc1402499ef59f4a050
/frameworks/base/core/java/android/view/GLES20Canvas.java
bc52cce276b6238e8f30f71a0dcf24209481261e 08-Feb-2012 Romain Guy <romainguy@google.com> Better error message when drawing with recycled bitmaps

Change-Id: Ie8332261c4376f270ea630d775210198c0196447
/frameworks/base/core/java/android/view/GLES20Canvas.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/GLES20Canvas.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/GLES20Canvas.java
5ff9df658230d49e42c43586997a02d8e4dd417e 24-Jan-2012 Romain Guy <romainguy@google.com> Add full support for Canvas.setDrawFilter()

Change-Id: I0ad35d0603c4eeda469014803be14c1dcdde918c
/frameworks/base/core/java/android/view/GLES20Canvas.java
f9d9c065ed75f1196316a9a31f92309f602cef76 20-Jan-2012 Romain Guy <romainguy@google.com> Deprecate unused APIs

Change-Id: I0107e246b632dda96b8b025217936954f1f46283
/frameworks/base/core/java/android/view/GLES20Canvas.java
75582e889d4895483309e38364266073be6d46b8 19-Jan-2012 Romain Guy <romainguy@google.com> Add basic code required for drawPicture()

Change-Id: Ib9e73cd4b932836d4debe920200f8d1c1861c2d4
/frameworks/base/core/java/android/view/GLES20Canvas.java
84fce187b0ae79adc5b4e64c26f72c8ed59e9703 19-Jan-2012 Romain Guy <romainguy@google.com> Don't crash on Canvas.drawPicture()

Implementation yet to come but prevent app crashes.

Change-Id: I81d6851ebf776a98e13c606bab272a03aec406ee
/frameworks/base/core/java/android/view/GLES20Canvas.java
eb9a5367e8f0e970db8509ffb2584f5376bc62ed 18-Jan-2012 Romain Guy <romainguy@google.com> First pass at implementing Canvas.drawPosText() in GL

Change-Id: Ia3ac347e95d57eb86c63045156c8dbc0572b03cb
/frameworks/base/core/java/android/view/GLES20Canvas.java
7677d8f006b94c76dcad6f551bf14f983f58dc14 17-Jan-2012 Romain Guy <romainguy@google.com> Improve GLES20Canvas clip support

Remove UnsupportedOperationException
Add primitive support for clipPath/clipRegion
Add support for quickReject(Path, EdgeType)

Change-Id: Ie7a80df7f380f488710bac31103772a9eab21612
/frameworks/base/core/java/android/view/GLES20Canvas.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/GLES20Canvas.java
9c4b79af221b53f602f946faa9ff317a596a0c39 11-Nov-2011 Romain Guy <romainguy@google.com> Discard framebuffer rendering queues when discarding layers
Bug #5581817

Change-Id: Ie30700a29059d2ea60eb7bd3f8bd20ac48a149ab
/frameworks/base/core/java/android/view/GLES20Canvas.java
cb52d6760078197cd6d0c16349348dd2ad16a88c 29-Nov-2011 Romain Guy <romainguy@google.com> am 02e88f23: am 46685db9: Merge "Fix crash in existing applications Bug #5659476" into ics-mr1

* commit '02e88f23a65c602e83d7a46c0925e653b948e418':
Fix crash in existing applications Bug #5659476
ff98fa5a847f66e591287154c634ef7895a9549c 28-Nov-2011 Romain Guy <romainguy@google.com> Fix crash in existing applications
Bug #5659476

The FontRenderer was not cleaning up its temporary state, leading
to crashes when invoking renderDropShadow.

Change-Id: I43b24820dd5625af8c080bbe11b64de2f74164b2
/frameworks/base/core/java/android/view/GLES20Canvas.java
28a5ec9613a824d2ec15ce5e5cec77a6fcf444d5 14-Nov-2011 Dave Burke <daveburke@google.com> am 2cfb873c: am 9d66da8a: Merge "Revert "Discard framebuffer rendering queues when discarding layers"" into ics-mr1

* commit '2cfb873c9f0b56f2c7d694a21c968511223933af':
Revert "Discard framebuffer rendering queues when discarding layers"
7077506f9945b87b02bdd47ffce75a5b813c821c 14-Nov-2011 Dave Burke <daveburke@google.com> Revert "Discard framebuffer rendering queues when discarding layers"

This reverts commit da96f8ac2c1c35a54f3f36e6d776cb386a251d03.
/frameworks/base/core/java/android/view/GLES20Canvas.java
3f511aaf1cb9dfa69e2f4225a5bd41bec0864cc7 14-Nov-2011 Mathias Agopian <mathias@google.com> am a16ee939: am 28587497: Merge "Discard framebuffer rendering queues when discarding layers Bug #5581817" into ics-mr1

* commit 'a16ee9390e1fcea8ff7cbefd253659c37f2999a3':
Discard framebuffer rendering queues when discarding layers Bug #5581817
1333742bedc9b462024302f302e3a7f27053df66 11-Nov-2011 Akwasi Boateng <akwasi.boateng@ti.com> am cb0db030: Merge branch \'ics-mr1-plus-aosp\' of ssh://android-git:29418/platform/frameworks/base into ics-mr1-plus-aosp

* commit 'cb0db0306b5849a35d3d99eea1b34ce019c6f0d8':
Make the overridden ImageView#setVisibility remotable
Clamp non-monotonic stats instead of dropping.
DO NOT MERGE. Fix leak in LayoutTransition
Fix lastVisible/global rects
Fix Wimax-less build.
Fix leak in LayoutTransition
Deferring wallpaper update to improve workspace scrolling (issue 5506959)
Terminate EGL when an app goes in the background
boot animation is dithered and scaled
Fix NdefRecord byte-stream constructor.
PopupWindow dismiss() can get into a recursive loop.
Fold WiMAX state into the mobile RSSI.
Remove dedicated wimax icon to fix RSSI layout.
da96f8ac2c1c35a54f3f36e6d776cb386a251d03 11-Nov-2011 Romain Guy <romainguy@google.com> Discard framebuffer rendering queues when discarding layers
Bug #5581817

Change-Id: If612846ec5f7793710fc4df152791fb32c506551
/frameworks/base/core/java/android/view/GLES20Canvas.java
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/GLES20Canvas.java
e707859415f4c8e1c01228dfaa58fb0a690d442e 28-Oct-2011 Romain Guy <romainguy@android.com> Load identity matrix when calling Canvas.setMatrix(null)
Bug #5446826

Change-Id: I3a7817f266b17e9abe948500816d629edd9a2822
/frameworks/base/core/java/android/view/GLES20Canvas.java
189887e0ae171c1b7601991442104a30e56c50ab 25-Aug-2011 Romain Guy <romainguy@google.com> Implement saveLayer*() correctly

When the Rect parameter is null, the layer's bounds must match the
clip rect.

Change-Id: Idbb3973af039bf319e840d1095b7037bf1015f35
/frameworks/base/core/java/android/view/GLES20Canvas.java
302a9df1d50373c82923bb84ff665dfce584fb22 16-Aug-2011 Romain Guy <romainguy@google.com> Add an API to set the transform on a TextureView's surface texture.
Bug #5156689

Change-Id: I635a625885c9b832a60d44ece0de7613ceb84109
/frameworks/base/core/java/android/view/GLES20Canvas.java
9d865512f1a39bac6bed612b24023213d5a1fb1d 12-Aug-2011 Romain Guy <romainguy@google.com> Remove unnecessary private API

Change-Id: I2ecb367528ec0691c07153a3d163b82a6ca33fdf
/frameworks/base/core/java/android/view/GLES20Canvas.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/GLES20Canvas.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/GLES20Canvas.java
eea60692b060737faeaa02bb30f5b79e2202b482 27-Jul-2011 Romain Guy <romainguy@google.com> Improve layers debugging

Change-Id: Ia4950dd5f0e0a224ecb69c581d33aa4f32260a7c
/frameworks/base/core/java/android/view/GLES20Canvas.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/GLES20Canvas.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/GLES20Canvas.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/GLES20Canvas.java
f61970fc79e9c5cf340fa942597628242361864a 07-Jul-2011 Romain Guy <romainguy@google.com> Add an API to query maximum bitmap/texture size on Canvas.

Change-Id: I2c576c9a4ecad9f33cc6636bcbc29786acdf052d
/frameworks/base/core/java/android/view/GLES20Canvas.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/GLES20Canvas.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/GLES20Canvas.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/GLES20Canvas.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/GLES20Canvas.java
ed30fd8e9a2d65ee5c8520de55b0089c219f390c 23-Apr-2011 Chet Haase <chet@google.com> Add ability for hierarchyviewer to output displaylist info

Clicking on a node in hierarchyviewer1 and hierarchyviewer2 and then
clicking the new "Dump DisplayList" button will cause the display
list for the selected node (including its children) to be output into
logcat.

Change-Id: Iad05f5f6cca0f8b465dccd962b501dc18fe6e053
/frameworks/base/core/java/android/view/GLES20Canvas.java
a17de9b493123f0d6e6d0b842150bf29322b7a88 05-May-2011 Chet Haase <chet@google.com> Revert "Add ability for hierarchyviewer to output displaylist info"

This reverts commit b2a4b52e8d5e499d33e2765e8c47851bf0266299.
/frameworks/base/core/java/android/view/GLES20Canvas.java
b2a4b52e8d5e499d33e2765e8c47851bf0266299 23-Apr-2011 Chet Haase <chet@google.com> Add ability for hierarchyviewer to output displaylist info

Clicking on a node in hierarchyviewer1 and hierarchyviewer2 and then
clicking the new "Dump DisplayList" button will cause the display
list for the selected node (including its children) to be output into
logcat.

Change-Id: Id32f62569ad1ab4d533bc62987f3a7390c1bb4e6
/frameworks/base/core/java/android/view/GLES20Canvas.java
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/GLES20Canvas.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/GLES20Canvas.java
56215274f25d0040af00bf69b0df990894c0b4b0 24-Mar-2011 Romain Guy <romainguy@google.com> Apply color filters to bitmaps.

Change-Id: I36354a6a2d330b2e61ed2af12b6701b151880288
/frameworks/base/core/java/android/view/GLES20Canvas.java
ed6fcb034b44d9a6ac2fc72fee6030417811f234 21-Mar-2011 Romain Guy <romainguy@google.com> Add support for drawPoint() and drawPoints().

Change-Id: I01bef50c08ec3160f8d40dc060b2cf6c2e4d7639
/frameworks/base/core/java/android/view/GLES20Canvas.java
a168d7372132d6c87835878794b6ed43d0d282fd 19-Mar-2011 Romain Guy <romainguy@google.com> Correctly apply filters to Alpha8 bitmaps.

This change also removes unnecessary operations from display lists.

Change-Id: I627f85861982731f0ee7705b48b36d9c56f22f39
/frameworks/base/core/java/android/view/GLES20Canvas.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/GLES20Canvas.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/GLES20Canvas.java
2b1847ea60650a9f68372abe860415f18b55081d 26-Jan-2011 Romain Guy <romainguy@google.com> Remove unused API

Change-Id: I1714fd82a64b752f0350ef4ef9179ce19e089c6a
/frameworks/base/core/java/android/view/GLES20Canvas.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/GLES20Canvas.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/GLES20Canvas.java
8b2f5267f16c295f12faab810527cd6311997e34 24-Jan-2011 Romain Guy <romainguy@google.com> Add support for arcs.

Change-Id: I96c057ff4eb1b464b03f132da0b85333777bee4f
/frameworks/base/core/java/android/view/GLES20Canvas.java
c1cd9ba335b293f11e1082447ef08e474710a05f 23-Jan-2011 Romain Guy <romainguy@google.com> Add support for ovals and stroked rectangles.

Change-Id: I1292e241386763c82e6622c8f7ed90b0f5b7bd4f
/frameworks/base/core/java/android/view/GLES20Canvas.java
5a7b466a2b4b7ced739bd5c31e022de61650545a 21-Jan-2011 Romain Guy <romainguy@google.com> Add support for drawBitmapMesh().

Change-Id: Ic77f9c534bb90dc7b9458299544bd50b8b6ae6a5
/frameworks/base/core/java/android/view/GLES20Canvas.java
01d58e43ede5ca98cbebdd166f9b0c545032c01b 20-Jan-2011 Romain Guy <romainguy@google.com> Add rounded rects and circles support to OpenGLRenderer.

Change-Id: I6cedf2b495d58de7c0437096809fa9e4518a1b8c
/frameworks/base/core/java/android/view/GLES20Canvas.java
807daf7df615b60ce6fc41355aabe3aa353cebab 18-Jan-2011 Romain Guy <romainguy@google.com> Add support for skew()

Change-Id: Ia3a9a867f74fd78b61f75179e3788fdc2f0cacd0
/frameworks/base/core/java/android/view/GLES20Canvas.java
ada830f639591b99c3e40de22b07296c7932a33f 13-Jan-2011 Romain Guy <romainguy@google.com> Cleanup implementation of hardware layers.

The new implementation relies on OpenGLRenderer's existing layer
code instead of duplicating it. The new code is much cleaner, with
simpler and better APIs and allows tracking of drawn regions inside
layers. Region tracking is not yet enabled but this will be done
in a future CL.

Change-Id: Ie826121a2227de8252c77b992a61218defea5143
/frameworks/base/core/java/android/view/GLES20Canvas.java
57066eb64c9a190d1afc87bb060bbb2d31e5b86c 12-Jan-2011 Romain Guy <romainguy@google.com> Cleanup GL objects on the correct thread.

Change-Id: Iddfea6e08a6591a4fab147151098ef27005f373d
/frameworks/base/core/java/android/view/GLES20Canvas.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/GLES20Canvas.java
171c592f0b7066acf279863c8a52ddabea49d3db 06-Jan-2011 Romain Guy <romainguy@google.com> New layers API for Views.

This API can be used to back a view and its children with either a
software layer (bitmap) or hardware layer (FBO). Layers have
various usages, including color filtering and performance
improvements during animations.

Change-Id: Ifc3bea847918042730fc5a8c2d4206dd6c9420a3
/frameworks/base/core/java/android/view/GLES20Canvas.java
5977baa1fa24125c148a72699b53e62abaf08960 06-Jan-2011 Chet Haase <chet@google.com> Reuse of native display list objects

Change-Id: Ia4553e23930ad20e56c11faa7809be788a1ad4bb
/frameworks/base/core/java/android/view/GLES20Canvas.java
9e90a9953b65ae575ec8db3989857e0c145724b1 05-Jan-2011 Chet Haase <chet@google.com> Reuse display lists at the java level.

Objects are invalidated and reset instead of being nulled out
and recreated. This avoids creating small amounts of garbage for
the display list and canvas objects.

Change-Id: I464fac7ea8944c19ad6d03f13a95d9017e3f4262
/frameworks/base/core/java/android/view/GLES20Canvas.java
f890fab5a6715548e520a6f010a3bfe7607ce56e 20-Dec-2010 Patrick Dubroy <dubroy@google.com> Ensure bitmaps aren't freed while referenced from a display list

Also removes the reference queue finalizers. They aren't necessary
anymore now that Bitmaps are allocated in the heap.
/frameworks/base/core/java/android/view/GLES20Canvas.java
e4ac2d6b5723c95e648c489b187ddde449452c13 01-Dec-2010 Patrick Dubroy <dubroy@google.com> Allocate bitmap backing buffers in the Java heap.

Change-Id: I60f6ccff13357c1c518e9d56b02fe0171637edd1
/frameworks/base/core/java/android/view/GLES20Canvas.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/GLES20Canvas.java
41030da16856c8869e1e51d4a0405432fa96614e 13-Oct-2010 Romain Guy <romainguy@google.com> Add a getNativeMatrix() API.

This API can be used by WebView to apply the appropriate transform
on its rendering.

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

Change-Id: Iac3a248a81ed8cb076a83ef9d186b8ebba685b4c
/frameworks/base/core/java/android/view/GLES20Canvas.java
759ea80dca64ad652110a129e0d8bf93fea79f61 17-Sep-2010 Romain Guy <romainguy@google.com> Add support for drawLines(), with anti-aliasing

Change-Id: I16c0593c5671490909dec13a85df601e1428a1a6
/frameworks/base/core/java/android/view/GLES20Canvas.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/GLES20Canvas.java
8aef54fa17f2a3753d9a8f2027629bc480088f69 02-Sep-2010 Romain Guy <romainguy@android.com> Add support for Canvas flags on save.

This is required for the rewrite of layers support.

Change-Id: I5c0867dcf5aeb0392c8d0fbab05febb0eaff70d9
/frameworks/base/core/java/android/view/GLES20Canvas.java
da8532c6f48b4c10b5e2ccb9e08690341efa1616 31-Aug-2010 Romain Guy <romainguy@google.com> Add hooks for hardware accelerated WebView.

Change-Id: I907cdec8a67594f87749ac46bda85f04af5a2003
/frameworks/base/core/java/android/view/GLES20Canvas.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/GLES20Canvas.java
1e45aae5de003657e5d18f74d34998f5de5db5b7 14-Aug-2010 Romain Guy <romainguy@google.com> Add drop shadows.

Change-Id: Ic6a72409d4785968d1fbdff229f17ee5c00b240b
/frameworks/base/core/java/android/view/GLES20Canvas.java
a48a1a87ba17f20f7006eaab21dcedf86c015c13 10-Aug-2010 Romain Guy <romainguy@google.com> Fast text selection drawing.

Change-Id: I93fb1312b47bc05345defa9b6cfe47c0658bb329
/frameworks/base/core/java/android/view/GLES20Canvas.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/GLES20Canvas.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/GLES20Canvas.java
7fbcc0492fca03857e3c45064f4aa040af817d55 05-Aug-2010 Romain Guy <romainguy@google.com> Add support for paths.

Rendering is implementing by rasterizing the paths into A8 textures.
This cna be extremely inefficient if the path changes often.

Change-Id: I609343f304ae38e0d319359403ee73b9b5b3c93a
/frameworks/base/core/java/android/view/GLES20Canvas.java
db1938e0e6ef816e228c815adccebd5cb05f2aa8 03-Aug-2010 Romain Guy <romainguy@google.com> Add support for ColorFilters.

Color filters are fully supported and can be used with shaders.

Change-Id: Id90ccf1c81cb462f2431f366f3f8f710d7971e04
/frameworks/base/core/java/android/view/GLES20Canvas.java
06f96e2652e4855b6520ad9dd70583677605b79a 31-Jul-2010 Romain Guy <romainguy@google.com> Refactor Skia shaders handling.

With this change, Skia shaders can easily be applied to any mesh. This change also
supports ComposeShader. For instance, this can be used to blend a gradient and a
bitmap togehter and paint a string of text with the result.

Change-Id: I701c2f9cf7f89b2ff58005e8a1d0d80ccf4a4aea
/frameworks/base/core/java/android/view/GLES20Canvas.java
694b519ac647fe998fd396fe0784cc8e179aadc4 22-Jul-2010 Romain Guy <romainguy@google.com> Add text rendering.

Change-Id: Ibe5a9fa844d531b31b55e43de403a98d49f659b9
/frameworks/base/core/java/android/view/GLES20Canvas.java
a1db574036c9bc2d397b69f8200594027e1fff16 20-Jul-2010 Romain Guy <romainguy@google.com> Add preliminary support for text rendering.

Change-Id: I547eb631dbda24d13960d54b4144fb8908fd8a49
/frameworks/base/core/java/android/view/GLES20Canvas.java
c0ac193b9415680f0a69e20a3f5f22d16f8053be 20-Jul-2010 Romain Guy <romainguy@google.com> Add support for linear gradients.

Change-Id: Id15329da065045b3f06fdaed615f33cd57608496
/frameworks/base/core/java/android/view/GLES20Canvas.java
7fac2e18339f765320d759e8d4c090f92431959e 17-Jul-2010 Romain Guy <romainguy@android.com> Add plumbing to support gradients in OpenGL renderer.

The LinearGradient class keeps a copy of the various parameters that
define the gradient. The copies are native arrays to avoid copying
Java arrays on every draw call. The gradient code path is implemented
until OpenGLRenderer::drawRect() (see TODO.) The actual gradient
implementation will be added in a latter change.

Change-Id: I9300d250ef5e2e9c2e097c3116ee71dfc9d752d8
/frameworks/base/core/java/android/view/GLES20Canvas.java
079ba2c85b15e882629b8d188f5fbdb42f7f8eea 16-Jul-2010 Romain Guy <romainguy@android.com> Improve clip support (add intersect, union and replace.)

This change also modifies the way the clip is stored. The clip is now
always stored in screen-space coordinates.

Change-Id: I96375784d82dfe975bc6477a159e6866e7052487
/frameworks/base/core/java/android/view/GLES20Canvas.java
d27977d1a91d5a6b3cc9fa7664ac7e835e7bd895 15-Jul-2010 Romain Guy <romainguy@google.com> Add support for BitmapShader.

This change also fixes an issue with the clip and layers.

Change-Id: I5fd9832098d8cf7ae8eb781ff9bffe7defaea279
/frameworks/base/core/java/android/view/GLES20Canvas.java
6926c72e25b8dec3dd4b84af0819fa1937ae7296 13-Jul-2010 Romain Guy <romainguy@google.com> Correctly support pre-multiplied alpha, optimizations, more stuff.

Add support for the following drawing functions:
- drawBitmap(int[]...)
- drawPaint()

Optimizes shader state changes by enabling/disabling attribute arrays
only when needed.

Adds quick rejects when drawing trivial shapes to avoid unnecessary
OpenGL operations.

Change-Id: Ic2c6c2ed1523d08a63a8c95601a1ec40b6c7fbc9
/frameworks/base/core/java/android/view/GLES20Canvas.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/GLES20Canvas.java
deba785f122a47915756ffd991f5540d952cf937 08-Jul-2010 Romain Guy <romainguy@google.com> Add support to draw 9patches in OpenGL.

This change only adds the necessary API and stubs. The implementation
will be added in another change.

Change-Id: Ie50b8aff5868e78796cee331df15bdbf990d2ea1
/frameworks/base/core/java/android/view/GLES20Canvas.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/GLES20Canvas.java
8ba548f81d1ab5f1750cbf86098c4a14e0b8bead 01-Jul-2010 Romain Guy <romainguy@google.com> Add implementation for drawBitmap(Bitmap, Rect, Rect, Paint)

Change-Id: I10904d2325a5431d15801aebcec1048715678e8c
/frameworks/base/core/java/android/view/GLES20Canvas.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/GLES20Canvas.java
bd6b79b40247aea7bfe13d0831c6c0472df6c636 26-Jun-2010 Romain Guy <romainguy@android.com> Add implementations for saveLayerAlpha() and textured rects.

Even though there's an implementation for textured rects, drawBitmap() is not
hooked up yet as it will require a good texture cache.

This method is implemented using FBOs. There's currently an issue either in the
driver or in the Canvas renderer that forces the FBO to be fullscreen, which is
extremely expensive and yields terrible performance.

Change-Id: I148419195e12d45653c60186938aa78c23a68e2c
/frameworks/base/core/java/android/view/GLES20Canvas.java
c7d53494f1fbd9f9d74af89053ff9fdb1ccbac6c 25-Jun-2010 Romain Guy <romainguy@android.com> Implement quickReject() and drawRect().

The OpenGL ES 2.0 renderer can now draw colored rectangles. At least there's
something on screen now.

Change-Id: I80a13ccc1dd56784edf74f2670a364f30700234a
/frameworks/base/core/java/android/view/GLES20Canvas.java
9d5316e3f56d138504565ff311145ac01621dff4 25-Jun-2010 Romain Guy <romainguy@google.com> Add colored rectangles implementation in OpenGLRenderer.

Drawing two rectangles one after the other discards the second one because of
Z buffering issues. This will be fixed in another changelist.

Change-Id: Ida1b3cde8a78e60cacc07e477abc44def527ff67
/frameworks/base/core/java/android/view/GLES20Canvas.java
f6a11b8a9e25ff9861bbba19251bea84d8a5daf2 24-Jun-2010 Romain Guy <romainguy@google.com> Add support for transformations.

This change adds partial support for the following transforms:
- scale()
- translate()
- rotate()
- setMatrix()
- getMatrix()

The transform is stored in a snapshot and saved/restored as needed.
The transform is currently not applied to the clip rect and is not
mapped to the vertex shader.

Change-Id: Id48993453311200804149917d0c126a4d0471226
/frameworks/base/core/java/android/view/GLES20Canvas.java
bb9524b6bdddc7ac77d8628daa8b366b8a7be4a4 23-Jun-2010 Romain Guy <romainguy@google.com> Add implementations for clipRect(), save() and restore().

The current implementation of clipRect() does not apply local transformations
before setting the new clip.

Change-Id: I5997871bb638dfcd1a8ef96354846af52427e445
/frameworks/base/core/java/android/view/GLES20Canvas.java
85bf02fc16784d935fb9eebfa9cb20fe46ff7951 22-Jun-2010 Romain Guy <romainguy@google.com> Fix the simulator build.

Change-Id: Ie404f7c2c308f0657f273af19a56e8c039b61898
/frameworks/base/core/java/android/view/GLES20Canvas.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/GLES20Canvas.java