448455fe783b0a711340322dca272b8cc0ebe473 |
|
22-Jul-2013 |
Romain Guy <romainguy@google.com> |
Use global indices array to draw layers An array of indices local to a layer would only be necessary if we changed the way we resolve T-junctions. Since we only ever draw quads, let's just use the indices we use everywhere else. This change also uses the global indices array to render list of colored rectangles to save on the number of vertices generated CPU-side. Change-Id: Ia6d1970b0e9247805af5a114ca2a84b5d0b7c282
/frameworks/base/libs/hwui/Layer.cpp
|
fb5c9050978afad2c1df570a13a6747f438c27f7 |
|
17-Jun-2013 |
Romain Guy <romainguy@google.com> |
Merge "Cancel layer update when a layer is about to be destroyed Bug #9310706"
|
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/libs/hwui/Layer.cpp
|
8c6e17c2a9b0ad7864a261cc9a30b9623e20bdcb |
|
17-Jun-2013 |
Chris Craik <ccraik@google.com> |
Check for layer renderer in flush bug:9310706 In some cases flush will occur after a layer is destroyed. Avoid trying to draw after putting the layer in the layer cache. Change-Id: I55d66f420e7354fe552c82eb3145a7d91b4441e3
/frameworks/base/libs/hwui/Layer.cpp
|
28ce94a4ffc7576f40776d212f1ada79fafaa061 |
|
31-May-2013 |
Chris Craik <ccraik@google.com> |
Overdraw avoidance and merging of clipped ops bug:8951267 If an opaque op, or group of opaque ops covers the invalidate region, skip draw operations that precede it. Clipped operations may now be merged, but only if they share a clipRect - this is a very case for e.g. ListView, where all background elements may now be a part of the same MergingDrawBatch. It is this more aggressive merging that groups together clipped background elements in the ListView case, enabling the overdraw avoidance skipping the window background. Change-Id: Ib0961977e272c5ac37f59e4c67d828467422d259
/frameworks/base/libs/hwui/Layer.cpp
|
be1b127c7bec252e0c6ab0e06ed6babed07d496f |
|
06-Jun-2013 |
Romain Guy <romainguy@google.com> |
Assume a texture is unbound after deleting it Bug #9316260 The GL specification indicates that deleting a bound texture has the side effect of binding the default texture (name=0). This change replaces all calls to glDeleteTextures() by Caches::deleteTexture() to properly keep track of texture bindings. Change-Id: Ifbc60ef433e0f9776a668dd5bd5f0adbc65a77a0
/frameworks/base/libs/hwui/Layer.cpp
|
8aa195d7081b889f3a7b1f426cbd8556377aae5e |
|
05-Jun-2013 |
Romain Guy <romainguy@google.com> |
Introduce Caches::bindTexture() to reduce glBindTexture calls Change-Id: Ic345422567c020c0a9035ff51dcf2ae2a1fc59f4
/frameworks/base/libs/hwui/Layer.cpp
|
34416eaa1c07b3d7a139e780cea8f8d73219650e |
|
16-Apr-2013 |
Chris Craik <ccraik@google.com> |
Make layer double drawing visible in overdraw debug mode A clipped saveLayer will cause two draws - first to an onscreen buffer, then again back to the framebuffer. This change - when in overdraw debug - reissues draws associated with a clipped saveLayer, but only to the stencil buffer. Operations within a saveLayer are shown correctly to be twice drawn, and View.setAlpha() without an associated hardware layer, or hasOverlappingRendering() are made more visible. Hardware layers, on any frame that they are updated, similarly draw twice, and will also be counted against the stencil buffer doubly. Note: greater depths of layers - e.g. a saveLayer within a saveLayer - are not respected, as that would require additional region tracking. Change-Id: I61fb0e61038fe66013d59914c20bb47a550dea7d
/frameworks/base/libs/hwui/Layer.cpp
|
a151ef8c667a52d9fae28c09f780784f19bdb039 |
|
05-Apr-2013 |
Romain Guy <romainguy@google.com> |
Merge "First OpenGL ES 3.0 based optimization" into jb-mr2-dev
|
1206b9bba91f7ed899c5c87427cce725fe5aadfc |
|
04-Apr-2013 |
Chris Craik <ccraik@google.com> |
Traverse layers in update order bug:8540150 Layers now require traversal in update order, as it will be child first, then parent for layer-in-layer Fixes issue with deferred layer playback not flushing in order, and thus child not painting before parent Also fixes DisplayList to only be cleared after flush in deferred list Change-Id: I2f284d00079cdb20798aeef6a1c94e823940db40
/frameworks/base/libs/hwui/Layer.cpp
|
0908764b2b3cf5075df4178a5f0a8547dcb7b317 |
|
04-Apr-2013 |
Romain Guy <romainguy@google.com> |
First OpenGL ES 3.0 based optimization This change uses a new OpenGL ES 3.0 feature to upload less data when the font cache needs to be update. This can result in significant performance improvements on device with large textures or with locales that use a lot of glyphs (CJK for instance.) This change also fixes various unpack alignment issues. The unpack alignment, as well as the unpack row length, is not texture specific but a global state that affect all glTex/SubImage2D calls. Some of them were missing the appropriate glPixelStorei() call. This could result in corrupted textures. Change-Id: Iefb429d4d0d0b4e0faeadf27daafee6d30a21d85
/frameworks/base/libs/hwui/Layer.cpp
|
02b49b70ede0b9eb760ff334823aee1d9520ed85 |
|
29-Mar-2013 |
Romain Guy <romainguy@google.com> |
Prevent crash when a single layer is enqueued several times for updates Bug #8504687 Change-Id: I9b01bbc4e3f37af23dfe5e68d3d03ad3d238b94a
/frameworks/base/libs/hwui/Layer.cpp
|
696dcf84a382fcc5ef7041e0bbf3af20b0ecb99f |
|
28-Mar-2013 |
Romain Guy <romainguy@google.com> |
Update layers to clear them Bug #8489505 A layer should be updated even with an empty deferred display list. It is possible for a layer to request an update just to execute a clear which will be handled by LayerRenderer::prepareDirty(). Change-Id: Iffb98bd71d6caa8d4a701df98197676f9423c0c2
/frameworks/base/libs/hwui/Layer.cpp
|
ce4a7dfc516ee61301e9af91fad17ca1320efaab |
|
28-Mar-2013 |
Romain Guy <romainguy@google.com> |
Don't crash when making a layer larger than supported dimensions Bug #8437401 A misplaced ref count decrement was causing a crash when attempting to resize a layer to dimensions larger than the max texture size supported by the GPU. This change fixes the crash and clarifies the warnings to make it more obvious what's happening. Change-Id: I632dc1b90aaa2605969e10523491a81c4922d3dc
/frameworks/base/libs/hwui/Layer.cpp
|
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/libs/hwui/Layer.cpp
|
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/libs/hwui/Layer.cpp
|
3bbacf27c0be1bae4e4483577fc89ae3113abe5d |
|
07-Feb-2013 |
Romain Guy <romainguy@google.com> |
Add a RenderBuffer object to store stencil buffers. Bug #7146141 This change is needed to add a render buffer cache to avoid creating and destroying stencil buffers on every frame. This change also allows the renderer to use a 1 bit or 4 bit stencil buffer whenever possible. Finally this change fixes a bug introduced by a previous CL which causes the stencil buffer to not be updated in certain conditions. The fix relies on a new optional parameter in drawColorRects() that can be used to avoid performing a quickReject on rectangles generated by the clip region. Change-Id: I2f55a8e807009887b276a83cde9f53fd5c01199f
/frameworks/base/libs/hwui/Layer.cpp
|
2055abaa0a590c35e27e1ae2e7d7cfccdfb98b59 |
|
19-Jan-2013 |
Romain Guy <romainguy@google.com> |
Allow layers with a stencil buffer to be resized on the fly Bug #7146141 This change moves the resizeLayer() from LayerCache (where it should never have been anyway) to Layer. This makes a little more sense. Change-Id: I8b2f9c19c558e738405a58b9e71ec5799fc6be88
/frameworks/base/libs/hwui/Layer.cpp
|
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/libs/hwui/Layer.cpp
|
5bb3c730f5ebd2a0db1b02a8981c6fdbea6c1a2e |
|
30-Nov-2012 |
Romain Guy <romainguy@google.com> |
Apply dev. settings at runtime Bug #7434649 Change-Id: I16f00eaa8a5eefd9f9849e196cf2cb1659215390
/frameworks/base/libs/hwui/Layer.cpp
|
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/libs/hwui/Layer.cpp
|
98d3a64ffa13596e3ea9125bbff40c51ec96bd8d |
|
26-Sep-2012 |
Chet Haase <chet@google.com> |
Assign default texture id of 0 Some logic depends on a default value of 0, which was not being assigned. Issue #7195815 chrome url bar is corrupted Issue #7190656 Textures corrupted on mr1 Change-Id: I346b7b76e885bf8f04740e711fd88f917a5418c7
/frameworks/base/libs/hwui/Layer.cpp
|
56257aff8a55c847be72be9924c392033fd8151d |
|
26-Sep-2012 |
Dave Burke <daveburke@google.com> |
Revert "Deleting objects on the wrong thread is a silly idea Bug #7195815" This reverts commit 8a1374946a928fcba7495c87ff6adda327fdfb9f Change-Id: I53564a6c531d334afcc1fce0bea1e57ae266aa78
/frameworks/base/libs/hwui/Layer.cpp
|
8a1374946a928fcba7495c87ff6adda327fdfb9f |
|
26-Sep-2012 |
Romain Guy <romainguy@google.com> |
Deleting objects on the wrong thread is a silly idea Bug #7195815 Turns out that multi-threading is hard. Change-Id: Ib0b4bd6dc3caea27f7ced22cbb363bb955fe58ab
/frameworks/base/libs/hwui/Layer.cpp
|
97dc9172b0e58979c63de0dedbab656399a62281 |
|
24-Sep-2012 |
Romain Guy <romainguy@google.com> |
Avoid deadlock when deleting layers Bug #7217459 Change-Id: I12bfa6c30c5030bd1b23ea6a3ce64240ab1dfba3
/frameworks/base/libs/hwui/Layer.cpp
|
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/libs/hwui/Layer.cpp
|
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/libs/hwui/Layer.cpp
|