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/DisplayList.java
|
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/DisplayList.java
|
38c2ece5ce4c59f30e5832779bf1d86d68b1c442 |
|
24-May-2012 |
Romain Guy <romainguy@google.com> |
Clear bitmap references from display lists as early as possible Bug #6555840 Apps like Google+ with large bitmaps displayed in listivews could run into memory issues because of these references. Change-Id: I39486bda13ce00c5a3b6481139ad54547506a8b4
/frameworks/base/core/java/android/view/DisplayList.java
|
3dd4b51fc37c1f05b1b583f5706e3a12216b9822 |
|
04-May-2012 |
Romain Guy <romainguy@google.com> |
Fix javadoc Change-Id: I1f1262a9a385e981a98876f8396ad375ab74827d
/frameworks/base/core/java/android/view/DisplayList.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/DisplayList.java
|
9420abd56a2af7ddbeb70562b79d61b2dca8c5a1 |
|
30-Mar-2012 |
Chet Haase <chet@google.com> |
Re-enable DisplayList properties. Re-enabling DisplayList properties last week caused some app errors due to the way that some transforms were being handled (specifically, those coming from the old Animations and ViewGroup's childStaticTransformation field). This change pushes *all* transform/alpha data from View.draw() into the view's DisplayList, making DisplayLists more encapsulated (and correct). Change-Id: Ia702c6aae050784bb3ed505aa87553113f8a1938
/frameworks/base/core/java/android/view/DisplayList.java
|
c553fea6b0b8d371c22bb4011cc9555d441aab39 |
|
27-Mar-2012 |
Romain Guy <romainguy@google.com> |
Fix constants to be unique Change-Id: Ia3736bc35c9ff7b52f0f20c274cd302bfb180fa7
/frameworks/base/core/java/android/view/DisplayList.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/DisplayList.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/DisplayList.java
|
51e4d4db296c252641161b39e98f49acebc46062 |
|
16-Mar-2012 |
Romain Guy <romainguy@google.com> |
Better implementation to clear display lists Change-Id: I58f9af4bae70a8117db1455a50c0c5daf19b2f4a
/frameworks/base/core/java/android/view/DisplayList.java
|
bc7616eae90002879f1d82d5e99dea7d1152b742 |
|
15-Mar-2012 |
Romain Guy <romainguy@google.com> |
Postpone DisplayList recycling when detached from window This was causing a crash in apps that remove views during a draw pass. Change-Id: I1c4621639fe920291b2c6fb7bfd17a69101a1329
/frameworks/base/core/java/android/view/DisplayList.java
|
a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3 |
|
21-Feb-2012 |
Chet Haase <chet@google.com> |
Handle view properties at the native level Basic functionality of handling View properties (transforms, left/right/top/bottom, and alpha) at the native DisplayList level. This logic is disabled for now (via compile-time flags in View.java and DisplayListRenderer.h) as we continue work on it (there is no advantage to the new approach until we optimize invalidation and rendering paths to use the new code path). Change-Id: I370c8d21fbd291be415f55515ab8dced6f6d51a3
/frameworks/base/core/java/android/view/DisplayList.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/DisplayList.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/DisplayList.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/DisplayList.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/DisplayList.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/DisplayList.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/DisplayList.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/DisplayList.java
|
b051e895ccb696604349c6c5efe7c4747e1d1ab6 |
|
29-Sep-2010 |
Romain Guy <romainguy@google.com> |
Add display lists caching. Change-Id: Iac3a248a81ed8cb076a83ef9d186b8ebba685b4c
/frameworks/base/core/java/android/view/DisplayList.java
|