summaryrefslogtreecommitdiffstats
path: root/libs
Commit message (Collapse)AuthorAgeFilesLines
* Track the atlas' generation IDRomain Guy2013-06-276-29/+64
| | | | | | | | | | | | Bug #9589379 If the atlas is terminated/reinitialized and a view does not invalidate in between it might end up using a stale AssetAtlas::Entry. This change is similar to how 9patch meshes are cached in DrawPatchOp: we simply track the generation ID of the cache to make sure we always use the latest data. Change-Id: Ib5abb3769d2ce0eabe9adc04e320ca27c422019e
* Refcount 9-patches and properly handle GC eventsRomain Guy2013-06-2611-32/+299
| | | | | | | | | | | | | | | | | This change adds refcounting of Res_png_9patch instances, the native data structure used to represent 9-patches. The Dalvik NinePatch class now holds a native pointer instead of a Dalvik byte[]. This pointer is used whenever we need to draw the 9-patch (software or hardware.) Since we are now tracking garbage collection of NinePatch objects libhwui's PatchCache must keep a list of free blocks in the VBO used to store the meshes. This change also removes unnecessary instances tracking from GLES20DisplayList. Bitmaps and 9-patches are refcounted at the native level and do not need to be tracked by the Dalvik layer. Change-Id: Ib8682d573a538aaf1945f8ec5a9bd5da5d16f74b
* (Small) 9patch drawing improvementsRomain Guy2013-06-241-2/+10
| | | | | | | Save a bit of memory in meshs generated from native code Avoid an extra if/else when drawing with hardware accelration on Change-Id: I31a4550bde4d2c27961710ebcc92b66cd71153cc
* Merge "Initialize MergingDrawBatch clip with viewport bounds"Chris Craik2013-06-213-3/+10
|\
| * Initialize MergingDrawBatch clip with viewport boundsChris Craik2013-06-213-3/+10
| | | | | | | | | | | | | | | | | | | | This allows merged, clipped operations to behave correctly within a savelayer, even if the base viewport has a large offset. Additionally, disregard opaqueness when within a complexclip/savelayer, as the coverage can't be trusted. Change-Id: Ic908b82a4bb410bc7fac1b4295f4874ed166efc5
* | Merge "Refcount the paint used by Canvas.drawPatch()"Romain Guy2013-06-211-0/+1
|\ \ | |/ |/|
| * Refcount the paint used by Canvas.drawPatch()Romain Guy2013-06-211-0/+1
| | | | | | | | | | | | Prevents crashes :) Change-Id: I62103ce97490613142321f080b82c2edaed67a95
* | Merge "Batch 9-patches in a single mesh whenever possible"Romain Guy2013-06-218-55/+171
|\ \ | |/
| * Batch 9-patches in a single mesh whenever possibleRomain Guy2013-06-218-55/+171
| | | | | | | | | | | | | | | | | | | | This change also fixes the way batched bitmaps were handled inside a layer. The layer is now correctly dirtied to minimize the amount of pixels to blend. Fix alpha, mode and opaque computations for DrawPatchOp. Change-Id: I1b6cd581c0f0db66c1002bb4fb1a9811e55bfa78
* | Merge "Make op outputting const, for more general logging"Chris Craik2013-06-211-43/+43
|\ \ | |/ |/|
| * Make op outputting const, for more general loggingChris Craik2013-06-191-43/+43
| | | | | | | | Change-Id: Iaf78985ee5558e0b5d32d7bc1cd039eaffc820e5
* | Merge "An identity matrix should be considered a pure translate matrix"Romain Guy2013-06-212-8/+8
|\ \
| * | An identity matrix should be considered a pure translate matrixRomain Guy2013-06-202-8/+8
| | | | | | | | | | | | Change-Id: I75e91797e8270f902f67bdd7bb526cccc23adc6b
* | | Merge "Add debugging logs for GPU pixel buffers"Romain Guy2013-06-201-0/+9
|\ \ \ | |/ /
| * | Add debugging logs for GPU pixel buffersRomain Guy2013-06-201-0/+9
| | | | | | | | | | | | Change-Id: I7edb04dd30ee6fd823099e72788169cc185e70f2
* | | Merge "input: Handle a few extra error conditions."Jeff Brown2013-06-201-2/+2
|\ \ \
| * | | input: Handle a few extra error conditions.Jeff Brown2013-06-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It turns out that SOCK_SEQPACKET sockets may sometimes return ECONNREFUSED or ECONNRESET errors when the peer dies instead of the usual EPIPE. Bug: 9479906 Change-Id: Ia7e572b08bf63e43ba5aeda58281508beb5f8c73
* | | | Merge "Fix regression: TextureView.setAlpha() was ignored"Romain Guy2013-06-191-1/+1
|\ \ \ \ | | |/ / | |/| / | |_|/ |/| |
| * | Fix regression: TextureView.setAlpha() was ignoredRomain Guy2013-06-191-1/+1
| | | | | | | | | | | | Change-Id: I9f43eec0fe23a65dcc1cf9cd0ac1f5e8907786a7
* | | Merge "Share Caches' index buffer with FontRenderer"Romain Guy2013-06-198-51/+24
|\ \ \ | |/ / | | / | |/ |/|
| * Share Caches' index buffer with FontRendererRomain Guy2013-06-188-51/+24
| | | | | | | | | | | | | | | | | | This reduces state changes when we draw 9patches and text together, which happens *a lot*. Also disable the NV profiling extension by default since it doesn't play nice with display lists deferrals. To enable it set debug.hwui.nv_profiling to true. Change-Id: I518b44b7d294e5def10c78911ceb9f01ae401609
* | Merge "Take hinting into account when caching fonts Bug #9464403"Romain Guy2013-06-182-0/+6
|\ \ | |/
| * Take hinting into account when caching fontsRomain Guy2013-06-182-0/+6
| | | | | | | | | | | | Bug #9464403 Change-Id: I26a5f0c17eb27d096717b444d3e18ad1d2b5a43c
* | Merge "Handle all text bounds as post-translated"Chris Craik2013-06-171-1/+0
|\ \
| * | Handle all text bounds as post-translatedChris Craik2013-06-171-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were treating immediate mode bounds as pre translate, which is inconsistent with using them for quickRejection. This fixes the overdraw counter not drawing correctly (since it uses immediate mode drawing. Change-Id: I1c734d367a00942bd7d9b041822c0a9f284e70a8
* | | Merge "Better handle op size edge cases"Chris Craik2013-06-174-5/+10
|\ \ \
| * | | Better handle op size edge casesChris Craik2013-06-174-5/+10
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bug:9464358 Previously, empty and unknown sized ops are assumed to fully cover their clip. This is now corrected such that empty sized ops are pre-rejected before defer. Additionally, unknown sized ops disable overdraw avoidance. Change-Id: Icf2ce24f98be5ea6299e24ffcf826790373564a1
* | | Merge "Cancel layer update when a layer is about to be destroyed Bug #9310706"Romain Guy2013-06-175-3/+25
|\ \ \ | | |/ | |/|
| * | Cancel layer update when a layer is about to be destroyedRomain Guy2013-06-175-3/+25
| |/ | | | | | | | | | | Bug #9310706 Change-Id: I73eea6314c326f15a979617e3a05b525935f0d3f
* | Merge "Check for layer renderer in flush"Chris Craik2013-06-171-1/+2
|\ \
| * | Check for layer renderer in flushChris Craik2013-06-171-1/+2
| |/ | | | | | | | | | | | | | | | | 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
* | Merge "Fix clip merging behavior"Chris Craik2013-06-173-20/+41
|\ \ | |/ |/|
| * Fix clip merging behaviorChris Craik2013-06-143-20/+41
| | | | | | | | | | | | | | Previously, a new op with a clipped side could be added to a MergingDrawBatch without considering the batch's current bounds. Change-Id: I1b873ecf821bad7cda6630c3f311edd90ac5cc8c
* | Merge more 9patchesRomain Guy2013-06-141-4/+3
|/ | | | Change-Id: If8b16af84f0ee42afc406922d15897e51d833e68
* Merge "Fix various draw ops that may incorrectly not scissor"Chris Craik2013-06-144-54/+60
|\
| * Fix various draw ops that may incorrectly not scissorChris Craik2013-06-134-54/+60
| | | | | | | | | | | | | | | | | | | | bug:8965976 Also consolidates quickReject scissor-ing and scissor-less paths. Renamed plain 'quickReject' method, as it has sideEffects beyond what the java and skia canvases do. Change-Id: I4bdf874d3c8f469d283eae1e71c5e7ea53d47016
* | Merge "Add new Query class for debugging"Romain Guy2013-06-135-3/+159
|\ \
| * | Add new Query class for debuggingRomain Guy2013-06-135-3/+159
| | | | | | | | | | | | | | | | | | | | | This class can be used to perform occlusion queries. An occlusion query can be used to test whether an object is entirely hidden or not. Change-Id: Ida456df81dbe008a64d3ff4cb7879340785c6abf
* | | Reset batching state when overlap batch deletion occursChris Craik2013-06-132-4/+8
| |/ |/| | | | | Change-Id: Ifdbee9baaa734e27d15d2b54aa3b3abfffbce1e9
* | Merge "Restore buildLayer()'s old behavior; it's synchronous again Bug #9193833"Romain Guy2013-06-133-0/+128
|\ \ | |/
| * Restore buildLayer()'s old behavior; it's synchronous againRomain Guy2013-06-123-0/+128
| | | | | | | | | | | | Bug #9193833 Change-Id: I4ee07e65c0a8967f0b55da030ecaad6dfc46136f
* | Merge "Overdraw avoidance and merging of clipped ops"Chris Craik2013-06-138-140/+282
|\ \
| * | Overdraw avoidance and merging of clipped opsChris Craik2013-06-128-140/+282
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Remove crash workarounds, add loggingChris Craik2013-06-122-7/+16
|/ | | | | bug:9321162 Change-Id: I748c27f979af1a303be01db29aedcbad6d608c38
* Merge "Avoid 9patch cache lookups when possible"Romain Guy2013-06-128-24/+71
|\
| * Avoid 9patch cache lookups when possibleRomain Guy2013-06-118-24/+71
| | | | | | | | | | | | | | This optimization saves up to 0.3ms per frame on the Play Store's front page, on a Nexus 4 device. Change-Id: Iaa4ef33c6e3b37e175efd5b9eea9ef59b43f14f3
* | am 8cb26c09: am cb5d644f: Merge "Workaround possible use after delete" into ↵Chris Craik2013-06-111-1/+2
|\ \ | |/ |/| | | | | | | | | jb-mr2-dev * commit '8cb26c099dc6357340141c9d81a1131ee404ae41': Workaround possible use after delete
| * Workaround possible use after deleteChris Craik2013-06-101-1/+2
| | | | | | | | | | bug:9321162 Change-Id: Ic35af5b5925da56e9a143e6b33658831038f3b72
* | Assume a texture is unbound after deleting itRomain Guy2013-06-0613-11/+53
| | | | | | | | | | | | | | | | | | | | | | 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
* | Remove string allocations when creating display listsRomain Guy2013-06-051-1/+6
| | | | | | | | Change-Id: Id520db981a3988cb980c8da5dbea8f26ef94989f