summaryrefslogtreecommitdiffstats
path: root/libs/hwui/renderthread
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | am 165fb8f5: am f89dac47: Merge "Tweak RT-animator scheduling" into lmp-mr1-devJohn Reck2014-12-194-15/+22
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | automerge: ed3c296 * commit 'ed3c2962be1e2966c3b46f20e81d2902a8302d8b': Tweak RT-animator scheduling
| * | | am 165fb8f5: am f89dac47: Merge "Tweak RT-animator scheduling" into lmp-mr1-devJohn Reck2014-12-194-15/+22
| |\ \ \ | | |/ / | | | | | | | | | | | | * commit '165fb8f5aa0709a8dc35f99a9b81f6906452a648': Tweak RT-animator scheduling
| | * | 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
| * | | Fix styleJohn Reck2014-12-122-3/+3
| | | | | | | | | | | | | | | | Change-Id: I7227b0eac126bf470ed50249a7809b845872983b
* | | | resolved conflicts for merge of d67bb501 to masterYohann Roussel2014-12-111-1/+2
|\ \ \ \ | |/ / / | | | | | | | | Change-Id: I40698ce1e382cb41eec7af5ea49ac0e2f997d555
| * | | am eb2dcc79: Merge "Don\'t preload textures for AssetAtlas" into lmp-mr1-devJohn Reck2014-12-111-1/+2
| |\ \ \ | | |/ / | | | | | | | | | | | | | | | | | | | | automerge: e4a6ed9 * commit 'e4a6ed9d6d8721c9fad018b0d43dfe7daf4b24e7': Don't preload textures for AssetAtlas
| | * | Don't preload textures for AssetAtlasJohn Reck2014-12-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | resolved conflicts for merge of a75b0ad3 to masterJohn Reck2014-12-046-12/+13
|\ \ \ \ | |/ / / | | | | | | | | Change-Id: I32a2d129c556407727ada909daa6470309d42499
| * | | resolved conflicts for merge of a51a0901 to lmp-mr1-dev-plus-aospJohn Reck2014-12-046-12/+13
| |\ \ \ | | |/ / | | | | | | | | Change-Id: Id7df835f0bd3d5d276b162635ddfb7fe0918dfed
| | * | 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
| | * | 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
* | | | am d7af6eaa: am d51205fd: am 6afc5cf3: Merge "Prevent calling GL functions ↵John Reck2014-12-011-1/+1
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | with an invalid surface" * commit 'd7af6eaace4ffdd3635a1cdeff65e9dc1af39f67': Prevent calling GL functions with an invalid surface
| * | | am d51205fd: am 6afc5cf3: Merge "Prevent calling GL functions with an ↵John Reck2014-12-011-1/+1
| |\ \ \ | | | |/ | | |/| | | | | | | | | | | | | | | | | invalid surface" * commit 'd51205fda7351ca32e54ef34b32e72f6c7c79847': Prevent calling GL functions with an invalid surface
| | * | Prevent calling GL functions with an invalid surfaceSangkyu Lee2014-11-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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) Change-Id: Ie6f6ea081ec931fc9df30b2c3ed066ec1ae9d294
* | | | am e986817a: am 6eac26a4: am ca84c8b1: Merge "Revert "Force-use the pbuffer ↵Chris Craik2014-11-261-2/+1
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | surface for destroy"" into lmp-mr1-dev * commit 'e986817a2dc8a412c12e456319965a67ac60f236': Revert "Force-use the pbuffer surface for destroy"
| * | | am 6eac26a4: am ca84c8b1: Merge "Revert "Force-use the pbuffer surface for ↵Chris Craik2014-11-261-2/+1
| |\ \ \ | | | |/ | | |/| | | | | | | | | | | | | | | | | destroy"" into lmp-mr1-dev * commit '6eac26a49957eda233ad22ad75da43379f220bbc': Revert "Force-use the pbuffer surface for destroy"
| | * | Revert "Force-use the pbuffer surface for destroy"Chris Craik2014-11-261-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bug:18528859 This reverts commit b945f2313aee6e49a082ba5caaf95334d2570d52. Change-Id: I6915624d356cb8570471eb3a5b8921f59b58db6d
* | | | am 0d4ab958: am 4e3404d9: am dec3f138: Merge "Force-use the pbuffer surface ↵John Reck2014-11-261-1/+2
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | for destroy" into lmp-mr1-dev * commit '0d4ab958c11801f5453e999f930416c87c63d100': Force-use the pbuffer surface for destroy
| * | | am 4e3404d9: am dec3f138: Merge "Force-use the pbuffer surface for destroy" ↵John Reck2014-11-261-1/+2
| |\ \ \ | | |/ / | | | | | | | | | | | | | | | | | | | | into lmp-mr1-dev * commit '4e3404d90fe33a0ff790aff4a97b6bb55e4c0e8f': Force-use the pbuffer surface for destroy
| | * | 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
* | | | Revert "resolved conflicts for merge of 220c3f4f to master"Andreas Gampe2014-11-223-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reverted as hwui doesn't agree. This reverts commit 8a902d9f24e83c87b054adb5836b4a5b8a257be9. Change-Id: I109e7b02bee2921e2155ded6df36f52e6f574b5a
* | | | resolved conflicts for merge of 220c3f4f to masterAndreas Gampe2014-11-213-7/+9
|\ \ \ \ | |/ / / | | | | | | | | Change-Id: I37ecce8fddecdff82b0eace16f1ee75152f7171e
| * | | resolved conflicts for merge of 99377df1 to lmp-mr1-dev-plus-aospAndreas Gampe2014-11-213-7/+9
| |\ \ \ | | | | | | | | | | | | | | | Change-Id: I3a98f55832ac447b1ed0dd129c7a93d088025943
| | * | | Frameworks/base: Unused parameters in hwuiAndreas Gampe2014-11-213-7/+9
| | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove Clang cutout for unused parameters. Fix warnings. Remove Clang cutout for deprecated Skia function usage. Has been fixed in the L push. Change-Id: I7ea073ff67127cc1e14e798b655e2c50615fe8e7
* | | | am 842697a3: am decc26df: am f0f68117: Merge "Trace some interesting events" ↵John Reck2014-11-182-0/+4
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | into lmp-mr1-dev * commit '842697a3602204036e991cfea8b74da3df6e7f14': Trace some interesting events
| * | | am decc26df: am f0f68117: Merge "Trace some interesting events" into lmp-mr1-devJohn Reck2014-11-182-0/+4
| |\ \ \ | | | |/ | | |/| | | | | | | | | * commit 'decc26df39b734ca1cbaccda1cbe3b355eba6898': Trace some interesting events
| | * | Trace some interesting eventsJohn Reck2014-11-172-0/+4
| | | | | | | | | | | | | | | | | | | | Bug: 18337099 Change-Id: Ie2e60da2b9f06e0368061c944d8123ab6903355c
| * | | resolved conflicts for merge of 1d03b816 to lmp-mr1-dev-plus-aospAndreas Gampe2014-11-102-0/+8
| |\ \ \ | | |/ / | |/| / | | |/ Change-Id: Ib673768fe5fc03615626ef4b10590e5317f22172
| | * Frameworks/base: Wall Werror in libs/hwuiAndreas Gampe2014-11-102-0/+8
| | | | | | | | | | | | | | | | | | Turn on -Wall -Werror in libs/hwui. Fix errors. Change-Id: I74962d08c889712dacbd0d86d6760fc10802b6bd
* | | resolved conflicts for merge of 1d03b816 to lmp-mr1-dev-plus-aospAndreas Gampe2014-11-102-0/+8
| | | | | | | | | | | | | | | | | | (cherry picked from commit 1272887050a269d6d506b42099c2857847ad100b) Change-Id: Ib673768fe5fc03615626ef4b10590e5317f22172
* | | am f1923c36: am 8dda03a0: am ca93f69c: Merge "Have an actual fallback if the ↵John Reck2014-11-074-0/+14
|\ \ \ | |/ / | | | | | | | | | | | | | | | surface is lost" into lmp-mr1-dev * commit 'f1923c368c5c08a477b9f94dea6a499798d91d4f': Have an actual fallback if the surface is lost
| * | 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
* | | Remove status return from all uirenderer::Renderer functionsTom Hudson2014-11-041-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This moves the interface closer to android::Canvas. The only use of return values was in the OpenGLRenderer subclass; that is replaced with an internal dirty flag: returned from finish(), checked by CanvasContext. This is part of a series of CLs to refactor the Graphics JNI bindings. BUG:15672762 R=djsollen@google.com,ccraik@google.com Change-Id: Ifd533eb8839a254b0d3a5d04fc5a2905afdfc89e
* | | am e05575e9: am a8d83d63: Merge "Layer changes" into lmp-mr1-dev automerge: ↵John Reck2014-10-316-24/+52
|\ \ \ | |/ / | | | | | | | | | | | | | | | a51fba0 * commit 'e05575e9c36850d8cfe49396ac9a1372511b12bf': Layer changes
| * | Layer changesJohn Reck2014-10-316-24/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 17208461 * Switch Layer to be VirtualLightRefBase instead of Caches' side-channel ref-counting * Include active layers in gfxinfo dump * Run gfxinfo dump on the correct thread * Dump gfxinfo on Layer creation failure Change-Id: I28d195699e2334518e215ab28c7a17355aee9678
* | | am 97054254: am 141823ec: Merge "Be more conservative about current buffer" ↵John Reck2014-10-301-5/+4
|\ \ \ | |/ / | | | | | | | | | | | | | | | into lmp-mr1-dev automerge: a27e1a3 * commit '97054254d4c8eef66538814e1d5def776ceba97a': Be more conservative about current buffer
| * | Be more conservative about current bufferJohn Reck2014-10-271-5/+4
| | | | | | | | | | | | | | | Bug: 18065565 Change-Id: I0b9c85ecf384ebe525e3a38803ab77d7ee37f33a
* | | am b64e4372: am 82572cc4: am badac04d: Merge "Add some free zoom to ↵John Reck2014-10-236-27/+62
|\ \ \ | |/ / | | | | | | | | | | | | | | | lockHardwareCanvas" into lmp-mr1-dev * commit 'b64e4372bb60bdce75e2af7d0b94efe92d94ac6a': Add some free zoom to lockHardwareCanvas
| * | Add some free zoom to lockHardwareCanvasJohn Reck2014-10-236-27/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 18099195 Don't use EGL_SWAP_BUFFER_PRESERVED on surfaces that will never benefit. Also clean up some confusing naming Change-Id: I674ca64e0464a3282cff79e5ecd350d08f47c014
* | | am e73a54f3: am bf463af2: Merge "Surface:lockHardwareCanvas" into lmp-mr1-devJohn Reck2014-10-211-1/+1
|\ \ \ | |/ / | | | | | | | | | | | | | | | automerge: 76f24bd * commit '76f24bde7816dd97ed2375ec41c9817be0330d9f': Surface:lockHardwareCanvas
| * | Surface:lockHardwareCanvasJohn Reck2014-10-211-1/+1
| | | | | | | | | | | | | | | | | | Bug: 17440886 Change-Id: I1f2d98c63ec1a2814c2258cf7e0096139263770a
* | | Clean up physical couplingTom Hudson2014-10-151-0/+1
|/ / | | | | | | | | | | | | | | Narrow the use of #include directives in hwui, replacing with forward declarations where straightforward. Speeds compiles; doesn't do any restructuring of code. Change-Id: Icac2baffb5896f55d8c6718e9bd9d4bfa02d3ca0
* | Trim graphics memory when closing the shadeJorim Jaggi2014-10-081-0/+1
|/ | | | | | | | | | | | | | | | | | | | Graphics memory usually gets trimmed in applications when the activity goes into the background. We use quite a lot of graphics memory when the shade/lockscreen is open, and some of them never gets freed unless the recents activity is closed, because we don't have these activity-trimming-heuristics for the shade. This change proactively trims the graphics memory when the shade gets closed or when the lockscreen is hidden, to emulate the same heuristics as for activities. This change also adds trimMemory on RenderThread to systrace to verify that no jank is introduced with this change. This change immediately saves around 10-30 MB on an xxhdpi device after the shade is closed. Bug: 17581375 Change-Id: I4fb622efb51815fe08187be97ba15d012d4de5d4
* Cleanup DeferredLayerUpdaterJohn Reck2014-10-034-25/+3
| | | | | | | | | | Bug: 17765082 DeferredLayerUpdater had fallen behind RT updates. Re-snap to latest expectations, ensuring to call requireGlContext() prior to detachSurfaceTexture to avoid leaking SurfaceTextures Change-Id: Ic65fb9831e5284f658866da8da9ad5af1d227699
* Merge "Fix garbage showing up beneath dialogs" into lmp-devChris Craik2014-09-191-1/+1
|\
| * Fix garbage showing up beneath dialogsChris Craik2014-09-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | bug:17463894 Fixes the setViewport method to immediately affect the return values of getViewportWidth/Height methods. Also works around tiling extension issues observed on first frame after window resize by disabling tiling for that frame. Change-Id: Ie172d572d20d74a1be9cc58ad389af2cffa0e4b6
* | Special case EGL_BAD_SURFACEJohn Reck2014-09-173-6/+20
|/ | | | | | Bug: 17516789 Change-Id: I3dcb10360c2aef6326f7dbbff6815866d4c143b6
* Fix race conditionJohn Reck2014-09-051-1/+1
| | | | | | | | | | | | Bug: 17372309 AnimationContext::startFrame() happens both with and without the UI thread lock. Pass the TraversalMode into it so that ThreadedRenderer's subclass can correctly decide when it is safe to push over mPendingAnimatingRenderNodes, as doing so outside of the lock is Very Bad. Change-Id: Ife5dd3a2b46b0a207cd9234c159a674afdbf5efd
* Yet more layer tracking loggingJohn Reck2014-09-043-0/+8
| | | | | | Bug: 17208461 Change-Id: I55e7d0921eb565867e966d68b798b7b92c391b55
* Fix some wrong-thread issues around animator managementJohn Reck2014-09-031-0/+1
| | | | | | | | | | | | Bug: 17372309 Fixes a case where UI thread and RT thread both used the same method which wasn't safe for either of them. Adds additional assertions & logging in unusual circumstances to try and track down where the issue is occuring from. Change-Id: I93d31a6fd0c5927259b67bdf96a475944226eee6