summaryrefslogtreecommitdiffstats
path: root/libs
Commit message (Collapse)AuthorAgeFilesLines
* Tweak RT-animator schedulingJohn Reck2014-12-194-15/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 18226391 The issue occurs as a result of a dispatchFrame itself taking longer than 12ms, the alloted budget. The result is that a vsync request (which occured at the end) would miss the vsync that occured 1ms prior to the end of the frame. As a result it would end up waiting for the following vsync, essentially dropping to 30fps even though 60 could have been sustained. Fix this with a few tweaks. First, adjust the UI thread's delay bias from (now + 4ms) to (vsync + 4ms), this prevents RT animators from slowly drifting if the vsync occurs mid-task. Second, request a vsync preemptively prior to running callbacks. This way if any callbacks needs the next vsync and it takes "too long", we will catch that vsync. Finally, fix an issue where the display event queue was always drained & rejected at the end of a task loop. Instead, drain and reject all stale vsyncs. This still prevents the issue of both UI thread & RT thread trying to drive 2 frames in a single pulse, but also allows RT to notice that it missed a vsync pulse it needed and that it should speed-up a bit in response Change-Id: I9d6be037737e9283297898cac2e3563453e797cd
* Merge "Revert overdraw avoidance visualization change" into lmp-mr1-devChris Craik2014-12-173-8/+13
|\
| * Revert overdraw avoidance visualization changeChris Craik2014-12-173-8/+13
| | | | | | | | | | | | | | | | bug:18787324 Partial revert of 23d307c8d88f4a3849163b9e5b7cd11d0d4f372c. Change-Id: Ic8b91b046707fc5b8fa53c35ea7b37bb19c3c943
* | Merge "Force-flush state sync on texid change" into lmp-mr1-devJohn Reck2014-12-111-0/+6
|\ \
| * | Force-flush state sync on texid changeJohn Reck2014-12-111-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 18718646 Caused because the Texture object thought the GLES texture was in a different state than it was as it persists across EGL/GL contexts. Fix this by force-flushing the default values when the texid has changed. Change-Id: I264bac9a2beb08df8e2ba8a85ad15f0dd1fce22a
* | | Merge "Correct layer size formatting in trace" into lmp-mr1-devChris Craik2014-12-111-2/+2
|\ \ \ | |/ / |/| |
| * | Correct layer size formatting in traceChris Craik2014-12-111-2/+2
| |/ | | | | | | | | bug:18722704 Change-Id: Icef9aaa62633b2d86ad250f43d4c8fa5cc0b6842
* | Merge "Don't preload textures for AssetAtlas" into lmp-mr1-devJohn Reck2014-12-1111-73/+75
|\ \
| * | Don't preload textures for AssetAtlasJohn Reck2014-12-1011-73/+75
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 18317479 RenderNode::prepareSubTree calls prefetchAndMarkInUse on every bitmapResoruce in the DisplayList. However, this resulted in textures being uploaded for bitmaps that would be drawn from the AssetAtlas instead. To fix this we teach TextureCache about the AssetAtlas so that calls to TextureCache return the Texture from AssetAtlas if it exists. Thus usage of AssetAtlas is now purely to allow for further optimizations via draw merging instead of a requirement to get any benefit at all. Change-Id: I65282fa05bac46f4e93822b3467ffa0261ccf200
* | Merge "Fix issue where non-resource attributes would cause ↵Adam Lesinski2014-12-101-0/+17
|\ \ | | | | | | | | | obtainStyleAttributes to fail" into lmp-mr1-dev
| * | Fix issue where non-resource attributes would cause obtainStyleAttributes to ↵Adam Lesinski2014-12-101-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fail A sentinal value of 0x00000000 was used to mark the first time an AttributeFinder was used. If the resource ID of an attribute was also 0x00000000 (which occurs with non-resource attributes, like 'style'), then it would be mistaken as the sentinel start value. Bug:18421787 Change-Id: I4be353e0f8c940cb6f262d155129f048dcc444ae
* | | Fix frame-allocated path lifecyclesChris Craik2014-12-104-8/+19
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | bug:18667472 Previously, we were allocating per-frame temporary paths within the PlaybackStateStruct, but these are not safe as layers allocate these transiently. Instead, move these to the OpenGLRenderer, which has better define lifecycle. Additionally, don't store SkPath objects directly in vector, since they are then subject to relocation. Change-Id: I8187ef542fcd5b030502bb75eb123ee26c0daa96
* | Merge "Teach AssetAtlas about more drawables" into lmp-mr1-devJohn Reck2014-12-091-2/+4
|\ \
| * | Teach AssetAtlas about more drawablesJohn Reck2014-12-091-2/+4
| |/ | | | | | | | | | | Bug: 18317479 Change-Id: I16868ee204d24af72af9a2efc987f7e9eb1d266b
* | Remove unnecessary/erroneous reference countingDerek Sollenberger2014-12-091-8/+0
|/ | | | | | | | | | | | | The SkBitmap* used by HWUI holds a reference to the PixelRef (which in turn holds the colorTable) so keeping an additional ref is not only unnecessary, but also potentially problematic. If a bitmap changes its pixelRef after it has been added to a displayList, then we end up with unbalanced ref/unref calls that cause the newly added PixelRef to be unref'd and prematurely deleted, while the original PixelRef is leaked. bug: 18659976 Change-Id: I34a06152e7bb2d733249a207dafd36b9b5dc0712
* Merge "AAPT: Move private attrs to new type for framework" into lmp-mr1-devAdam Lesinski2014-12-041-46/+57
|\
| * AAPT: Move private attrs to new type for frameworkAdam Lesinski2014-12-031-46/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Private attributes are typically placed after public attributes in the resource table. Each time a new version of the Android framework is released, new public attributes take the place of the private attributes, and the private attributes are shifted after the new public ones. This means that any apps built against the newer SDK may inadvertently be using private attributes on older devices. This change moves all private attributes to a completely different type ID, so there will never be collisions across versions. These private attributes are automatically moved to a synthesized type only for the system resources. Bug:18263655 Change-Id: I7a850512953fadcc9f3524d509cea30249782db8
* | Resume RT-animations after a pauseSurfaceJohn Reck2014-12-036-12/+13
|/ | | | | | | | | | | | | 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
* Merge "Clip outline to View clip bounds for shadow computation" into lmp-mr1-devChris Craik2014-12-021-4/+23
|\
| * Clip outline to View clip bounds for shadow computationChris Craik2014-12-011-4/+23
| | | | | | | | | | | | | | | | | | bug:18509823 This allows animations of View clipBounds (and other callers of setClipBounds) to affect shadows, instead of leaving them floating. Change-Id: I249fa4b371a170cb0c54001f5b0e0097e109b8b8
* | Merge "Prevent calling GL functions with an invalid surface" into lmp-mr1-devJohn Reck2014-12-011-1/+1
|\ \
| * | Prevent calling GL functions with an invalid surfaceSangkyu Lee2014-12-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 18518580 When destroying CanvasContext, the surface can be invalid state. So the surface should be updated to null prior to destroying GL resources to ensure that GL functions are not called with an invalid surface. Some GL implementation makes an error if GL functions are called with an invalid surface. (Adreno 3xx) Cherry picked from AOSP: f76d36f96bf221672e98e440c9df7cbf0e02e84e Change-Id: Ie6f6ea081ec931fc9df30b2c3ed066ec1ae9d294
* | | Merge "Enable stencil clipping within clearLayerRegions" into lmp-mr1-devChris Craik2014-12-011-7/+1
|\ \ \ | |/ / |/| |
| * | Enable stencil clipping within clearLayerRegionsDohyun Lee2014-11-261-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bug:18538502 Cherry-pick of adc0d9da8648abfea1035fb1108eceea9fd9b5b1 from AOSP Previously stencil clipping within clearLayerRegions is disabled by commit 62d307c2402777d5e53b4590af5f32f8c55afd81. However, clearing whole layer regions causes black-colored triangle regions when a TextView has RotateAnimation because the draw within clearLayerRegions does not affected by the current stencil clip. Change-Id: Id32a0b16754b109905f833e063ebfa156bd953f2 Signed-off-by: Dohyun Lee <dohyun.lee@lge.com>
* | | Merge "Revert "Force-use the pbuffer surface for destroy"" into lmp-mr1-devChris Craik2014-11-261-2/+1
|\ \ \ | |_|/ |/| |
| * | Revert "Force-use the pbuffer surface for destroy"Chris Craik2014-11-261-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | bug:18528859 This reverts commit b945f2313aee6e49a082ba5caaf95334d2570d52. Change-Id: I6915624d356cb8570471eb3a5b8921f59b58db6d
* | | Merge "Force-use the pbuffer surface for destroy" into lmp-mr1-devJohn Reck2014-11-251-1/+2
|\ \ \ | |/ /
| * | Force-use the pbuffer surface for destroyJohn Reck2014-11-251-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 18518580 If CanvasContext is being destroyed() the Surface is probably no longer valid as well, so make sure to makeCurrent() to the pbuffer surface so that the subsequent GL operations are not using an invalid EGLSurface Change-Id: Ica5d6a065841772c47e00ad65aa7894c7e27e043
* | | Merge "Improve DisplayList state output" into lmp-mr1-devChris Craik2014-11-253-3/+7
|\ \ \ | |/ / |/| |
| * | Improve DisplayList state outputChris Craik2014-11-213-3/+7
| |/ | | | | | | | | | | | | | | bug:17991451 Log hardware layers and shadow casting Change-Id: I2ae40f270d18f5b2a5af985513e0f5e8841216c2
* | Switch TextureCache to SkPixelRef::fStableIdJohn Reck2014-11-244-32/+30
| | | | | | | | | | Bug: 18245805 Change-Id: I08e6792dbeed86b13e569c7f2137de0e50dc2763
* | Merge "Revert "Add a way to override Xfermode DO NOT MERGE"" into lmp-mr1-devChris Craik2014-11-212-34/+12
|\ \
| * | Revert "Add a way to override Xfermode DO NOT MERGE"Chris Craik2014-11-212-34/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Feature no longer needed. bug:18448377 This reverts commit 4678dcc5524258908eadc5fe1e5e1874768967eb. Change-Id: Ib0a19946e966a54857165555827b5fa7b34b6bea
* | | Merge "Improve logging around performance critical events" into lmp-mr1-devChris Craik2014-11-209-37/+89
|\ \ \
| * | | Improve logging around performance critical eventsChris Craik2014-11-199-37/+89
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | bug:17702227 Add details useful to developers (such as layer size/View name), and switch away from logging implementation names/details, since they are generally not relevant to developers. Change-Id: Iee605d182f241450f7e75a6d0c283d51fa1312f5
* | | Merge "Trace some interesting events" into lmp-mr1-devJohn Reck2014-11-184-0/+8
|\ \ \
| * | | Trace some interesting eventsJohn Reck2014-11-174-0/+8
| | | | | | | | | | | | | | | | | | | | Bug: 18337099 Change-Id: Ie2e60da2b9f06e0368061c944d8123ab6903355c
* | | | Merge "Implement back-tracking when searching for attributes in XML or ↵Adam Lesinski2014-11-173-3/+119
|\ \ \ \ | |/ / / |/| | | | | | | resource bag" into lmp-mr1-dev
| * | | Implement back-tracking when searching for attributes in XML or resource bagAdam Lesinski2014-11-043-3/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Shared libraries have their package ID assigned at run-time, so some of the guarantees we used to have about sort order of attributes in bags or XML elements no longer hold. This CL adds back-tracking and can jump to the nearest attribute with the same package ID and continue searching. This means that attributes with the same package ID must be sorted by increasing resource ID, as was the case before. Attributes with the same package ID must be grouped together, but the groups can be in any order. Ex: 0x02010001, 0x02010002, 0x01010000, 0x01010010, 0x7f010032 Bug:17666947 Change-Id: I9c198bbb6ca788849aac85b6323606ea5d9550d6
* | | | Merge "Add a way to override Xfermode DO NOT MERGE" into lmp-mr1-devRob Tsuk2014-11-122-12/+34
|\ \ \ \ | | |_|/ | |/| |
| * | | Add a way to override Xfermode DO NOT MERGERob Tsuk2014-11-122-12/+34
| | |/ | |/| | | | | | | | | | | | | | | | Add a non-public API to Canvas/GLES20Canvas to provide a way to draw the touch ripple animation without using a save layer. Change-Id: I6e2095adffe515194f669fb75bb67abf813bd518
* | | Merge "Shadow: Fix the crash in spot shadow" into lmp-mr1-devztenghui2014-11-121-7/+13
|\ \ \ | |/ / |/| |
| * | Shadow: Fix the crash in spot shadowztenghui2014-11-121-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the crash from searching for closest umbra vertex by initialized the starting index correctly. Fix another potential crash related to ray intersection by introducing epsilon. b/18315089 Change-Id: I9ac9a781a885701a8388714d44f79a1d905e5d33
* | | Merge "Have an actual fallback if the surface is lost" into lmp-mr1-devJohn Reck2014-11-074-0/+14
|\ \ \
| * | | Have an actual fallback if the surface is lostJohn Reck2014-11-074-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 17516789 This will force a relayout/reinitialize pass if the Surface is lost mid-render instead of crashing on the next frame Change-Id: If08bfa16f740728fa7c05904fa11e26f07b81e2e
* | | | Merge "Fix wrong-thread issue" into lmp-mr1-devJohn Reck2014-11-074-6/+9
|\ \ \ \ | |_|/ / |/| | |
| * | | Fix wrong-thread issueJohn Reck2014-11-074-6/+9
| |/ / | | | | | | | | | | | | | | | Bug: 18259560 Change-Id: Ic63a86efba9c86f21defac0695a73db8b09ae284
* | | Merge "A better looking and faster spot shadow." into lmp-mr1-devztenghui2014-11-064-651/+303
|\ \ \
| * | | A better looking and faster spot shadow.ztenghui2014-11-064-651/+303
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. This improve the looking, the star shape (spike) on long action bar is gone. Shadow is more smooth now. 2. The performance is better, too. For averaging around rect, round rect and circle, the spot shadow itself is 3 times faster. On N7 v1, it could be less than 0.1 ms. b/14976551 b/16712006 Change-Id: I61ed546ee56e7c8dbe504dfcaef12d084904b4b8
* | | | Yank ResourceCache out of CachesJohn Reck2014-11-067-22/+35
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 17947547 Pull the ResourceCache (aka, ref-counting side channel) out of Caches so that DisplayListRenderer doesn't use Caches, avoiding the risk of instantiating Caches on the wrong thread or without a GL context Change-Id: I7d63b70b3b0a0163308c5dedd6ef255eadebe8fd