summaryrefslogtreecommitdiff
path: root/libs/hwui/renderthread/RenderThread.cpp
AgeCommit message (Collapse)Author
2018-12-14New WebViewFunctor APIJohn Reck
Should function alongside existing functor API. Bug: 120997728 Test: hwuiunit passes Change-Id: I8f6143d0be1111431b55016f34de319f6b8c8910
2018-09-20Fix crash when EGLSurface is no longer valid.Derek Sollenberger
The EGLSurface stored in the pipeline can become obsolete if the EglManager/RenderThread has to destroy the context. This CL enables the RenderThread to notify all active pipelines that their surface is invalid. Bug: 115290937 Test: hwui_unit_tests Change-Id: Ib3054822273bc35406630b7442229a81b39a2c91
2018-09-18Refactor DeviceInfo in HWUIDerek Sollenberger
Remove the need for both Vulkan and EGL managers to initialize it. Also remove unused code paths. Test: hwui_unit_tests Change-Id: I33ad881468eddbf91ec63207f0d82bed8d97f5ad
2018-09-10Refactor HWUI readback code to be backend independentStan Iliev
Implement readback from Surface, TextureView and HW Bitmap for Vulkan pipeline by wrapping the graphics buffer in an SkImage. Refactor both Vulkan and GL readback to use common code. TextureView readback is moved from IRenderPipeline interface to Readback class. Refactor all 3 readback flows to use common implementation. Test: Passed all view, uirendering and graphics CTS tests with GL Test: Passed many CTS test with Vulkan, that require readback Bug: 113673613 Change-Id: Ifbfd8170a5401f87a709b4b1b9fa058e8e11768d
2018-09-05Reland "TextureView Vulkan support and optimized OpenGL draw"Stan Iliev
Fix an issue with incorrect texture matrix, when there is 90/270 rotation. This happened, because after refactoring SkImage has buffer width/height, instead of layer width/height. This reverts commit a683eb3945320f592f58705c3c31b3c044f4bd72. Bug: 113673613 Test: Ran TextureView CTS and lensblur in camera app Change-Id: If3bcf9cd5195de09fd67a753708568a8e3ca3a9a
2018-09-04Add cache validation to ensure the validityYichi Chen
Create cache identity from GL_VERSION and store in ShaderCache. In the next time ShaderCache is restored from disk, compare the cache identity to ensure its validity. If GL_VERSION changes in between, flush out entire FileBlobCache and start from an empty one. Bug: b/71800782 Test: Wrote a new unit test to save and restore ShaderCache Test: hwui_unit_tests Change-Id: Ie573dc4f18733eee090725be30445d879765231b
2018-08-30Merge "Revert "TextureView Vulkan support and optimized OpenGL draw""Stan Iliev
2018-08-30Revert "TextureView Vulkan support and optimized OpenGL draw"John Reck
This reverts commit c8e22a653297837da9a80b0ba65f6854c8986c96. Reason for revert: broke camera, b/113555199 Bug: 113555199 Change-Id: Iae9b462694d5de0cd99427afead63b567fb4d71d
2018-08-29Merge "TextureView Vulkan support and optimized OpenGL draw"TreeHugger Robot
2018-08-29TextureView Vulkan support and optimized OpenGL drawStan Iliev
Render TextureView as hardware bitmaps, instead of GL textures. Cache SkImage for each observed GraphicBuffer, which is faster even for GL. Implement C++ SurfaceTexture, which allows Java SurfaceTexture to be used with Vulkan HWUI render thread and application GL. threads. Delete GLLayer and VkLayer classes and texture code from old HWUI pipeline. Test: Ran skiagl and skiavk pipeline with a TextureView app. Test: TextureView CTS tests pass for GL pipeline. Test: Ran Android NDK Native codec sample app. Change-Id: Idc94f864ce2d34fd6ceff4be4fc7d3327e99879c
2018-08-15Prefer ES 2.0 with external image support vs ES 3.0 without that supportDerek Sollenberger
We currently attempt to use ES 3.0 shaders even if it lacks the extension for external images. This CL reverts back to ES 2.0 in the event that we find that the OES_EGL_image_external_essl3 is not present. Test: no change in graphics output Bug: 111220579 Change-Id: I6bd7145026d9686cfcf49393a19580208db8a367
2018-04-30Remove unneeded pipeline checkJohn Reck
Test: none Change-Id: I1123567c51efff3eef6c09f76c1624e48f71c802
2018-04-27Move all non-GL HW Bitmap work off RTJohn Reck
Bug: 78288006 Test: hwuiunit passes, systrace showed work distribution as expected, and photos using HW bitmaps still works Change-Id: Id3285b637b5d74d3c5891ed3051ac1e44015987a
2018-04-26Remove RenderThread from EglManagerJohn Reck
Refactor to make EglManager re-usable. Test: hwuiunit passes, hwuimacro works Change-Id: Ie8e9398c703fada1dc5d8baca5f42485eadea202
2018-04-18Revert "Add support for render-ahead"John Reck
This reverts commit ec100976e0655acaa204c8800dfb83dadae20cc8. Reason for revert: b/77971494 Test: hwuiunit passes Change-Id: I2e7dc719d2df1dd939b275496c0edc38e458c434
2018-04-12So long OpenGLPipeline & OpenGLReadback (2/??)John Reck
Hello EglReadback Test: hwuiunit & PixelCopyTests pass Change-Id: I36a8cb45b11141b09e75a2e978ed13e336425625
2018-04-11Remove RenderPipelineType::OpenGL (1/many)John Reck
Just removes the define & all things referencing the define. Test: hwui_unit passes Change-Id: I3f98c271e23ef696c40addf260abdc0fb149a70d
2018-04-09Add support for render-aheadJohn Reck
For periods of time during which latency is less important allow a client to request a deeper render-ahead pipeline. The latency tradeoff results in less overall visual jank Test: none, only used by macrobench Change-Id: I516203b70bdc75b6415fa08bf9c4fb1b598b0102
2018-03-16Don't use IPC in isolateProcessJohn Reck
Fixes: 74395652 Test: hwuiunit passes in 'shell stop' state (pseudo-isolated process), manually checked non-isolated processes still have working vsync via systrace of RT animations demo Change-Id: I630ea011dc7eb2efa265b25673d3304b3b2510d3
2018-01-12Create an empty stub for Vulkan readbackStan Iliev
Create a stub for Vulkan readback. This avoids crashing, because OpenGL readback does not work for Vulkan. Test: Ran calc and gmail apps with skiavk pipeline. Change-Id: I11cddde0a1efae1aa549e7a47d01051ec975f470
2017-12-11Update GrContext creation calls to use sk_spGreg Daniel
Test: manual testing Change-Id: I68d8706ffa7bc7c6622ea0b8c45d7297a131f6bf
2017-12-01Switch RenderThread to a Java daemon threadJohn Reck
Bug: 69962494 Test: device boots, hwui unit tests pass Change-Id: I9d5f2fccebf845328914c82aa97285cf605a4354
2017-11-14Disable skia shader cacheStan Iliev
Disable skia shader cache, which is causing image rendering issues. Test: Ran CNN app and images are OK. Bug: 69264347 Change-Id: Ie81f3398074f28ac1670333f1fd3c95267b2beb3
2017-11-13Fix leak of FILE* in dumpingJohn Reck
Avoid fdopen as fclose, which frees the FILE*, will close the FD which we don't want. Just normalize on dprintf instead, and we can add buffering if it turns out to matter at some point Test: ran 'dumpsys gfxinfo framestats' in a loop while observing PSS Change-Id: I7808753641aa1055cfdf570c3e017017f11f1dee
2017-11-08Implement SkSL cacheStan Iliev
Implement SkSL cache by reusing code and logic from egl_cache_t. Test: Improves startup times for gmail by 15ms and 10ms for calc app. Bug: 66740665 Change-Id: I9ba479c649ba97a2c29a48d40579ba001264c957
2017-11-03Format the world (or just HWUI)John Reck
Test: No code changes, just ran through clang-format Change-Id: Id23aa4ec7eebc0446fe3a30260f33e7fd455bb8c
2017-10-27Switch to a fancy new queueJohn Reck
Test: unit tests & benchmarks pass/faster Change-Id: I9521432172d6dd6039c5280b1265479a36a86247
2017-08-25Release VectorDrawable cache surface on render threadStan Iliev
Release VectorDrawable cache surface on render thread. This is fixing an assert in skia GrSingleOwner.h:33. Test: Ran gmail before and after the change. Bug: 64842607 Change-Id: I46e0c2557ac5b2fc3be2cc2d35abf96f6d6c9399
2017-07-05Move frame history into jank trackerJohn Reck
Test: hwui_unit_tests & manual Change-Id: If761947652750640268217cd8cd97c8382441b44
2017-06-06Implement CacheManager for the Skia pipelines.Derek Sollenberger
The core of the implementation is complete and provides heuristic cache sizing based on the size of the surface being used. This CL will also be used to add the following features in the future... 1) Support Vulkan pipeline reporting on the size of the surface. 2) Complete the VectorDrawableAtlas stub code 3) Automatic purging of stale resources for low memory devices. Test: hwui_unit_tests (new test added) and CtsUiRendering Bug: 62260637 Change-Id: Ib85159cca28b646fe249f2190b07f1b7e0f50d8f
2017-06-02Implement HW Bitmap for Skia pipelineStan Iliev
Implement HW Bitmap for Skia pipeline. Use new Skia SkImage::MakeFromAHardwareBuffer API, which will enable to record HW Bitmap into a picture. Move logic that uploads SkBitmap into a GraphicBuffer into pipeline specific classes. Test: All CTS and other tests pass for HWUI pipleine. For Skia pipeline graphics CTS tests pass, 2 UIRendering CTS tests which excise HW bitmaps with color spaces fail, bitmapShaderEglImage macrobench fails (to be fixed by a CL in Skia), HWUI unit tests pass, no EGL leaks found. Change-Id: Id5926d7cccd81af8b55400f44fb524a427543d05
2017-05-17Revert "Fix recent apps in system UI for Skia pipeline"John Reck
This reverts commit b33013fb3c570e0a3ced8729dced9f0d294761a6. Reason for revert: Caused a memory leak, b/38330767 Bug: 38136140 Bug: 38330767 Test: manual, verified memory isn't leaking doing the steps in b/38330767 Change-Id: I98b2dfd750be57a15785808e2d5723616e2ce20a
2017-05-12Fix recent apps in system UI for Skia pipelineStan Iliev
Enable HW Bitmaps for Skia pipeline just enough to make recent apps list working by adding support for BitmapShader. Drawing HW bitmaps in a canvas is also supported. Test: recent apps work, HWUI unit tests pass, CTS tests pass. bug: 38136140 Change-Id: Ibd06c859c86dc213310d5ce5272497e1882d0cc6
2017-03-27Add missing assert that task isn't queuedJohn Reck
Probably won't fix anything but this assert is in queue() but not queueAtFront() and inserting a task twice is Really Bad. Bug: 36139852 Test: ¯\_(ツ)_/¯ Change-Id: Ida0f829eecfdd46c17c36b816528c49d12b7cf29
2017-03-06Merge "Check for spurious wake ups" am: 3a3cd0a27f am: c2dcebe6e6Tom Cherry
am: 1344c034c5 Change-Id: I8ffc749ab6fbd825ce238fff4ba1d12609585c04
2017-02-28Check for spurious wake upsTom Cherry
Condition::wait() can spuriously wake up, so we must guard it with another check to ensure that a given wake was truly due to having been signaled. Bug: 34592766 Test: Boot bullhead Change-Id: Iaa5a0ca6186aea50c51e2c402ef95d7ba861be92
2016-11-18Merge "Avoid starving RT anims"John Reck
am: f77c220aa9 Change-Id: I3d4ba24ae0e6de4683d47163fd8f3bf65b98bd17
2016-11-17Avoid starving RT animsJohn Reck
Test: Manual, usleep(16000) in DrawFrameTask and tap on recents Merged-In: I88bb30a2503bc908ec45650c7d36b6fb3cc750d0 Change-Id: I88bb30a2503bc908ec45650c7d36b6fb3cc750d0
2016-11-17Merge "Avoid starving RT anims"John Reck
2016-11-16Support Surface and Layer Readback in the SkiaPipelines.Derek Sollenberger
Test: CTS TextureViewTests and UIRendering Change-Id: I2969c8f5a975bfd9aebcbb585c64d1fcbb2487c2
2016-11-15Avoid starving RT animsJohn Reck
Test: Manual, usleep(16000) in DrawFrameTask and tap on recents Change-Id: I88bb30a2503bc908ec45650c7d36b6fb3cc750d0
2016-11-09Handle vulkan windowing directly in SkiaVulkanPipelineDerek Sollenberger
Test: manual testing in skiavk mode Change-Id: I2fab80bae2787bfdacbc70d0402e98450e59406d
2016-07-29resolve merge conflicts of 67daab6 to nyc-mr1-dev-plus-aospJohn Reck
Change-Id: I35f867b8d6408a7eae9cf5643f0908259de90cb1
2016-07-29Teach JankTracker about new swap behaviorsJohn Reck
Bug: 30440166 If we are using HWC2, there's a change in timing when in triple buffering with the pipelined offsets. This changes JankTracker to recognize that and silently erase that from the total duration Change-Id: Ib1fd4209070f17dbd2baed707c8cf73fb11c3cf2
2016-04-28resolve merge conflicts of 1599b981 to nyc-dev-plus-aospChih-Hung Hsieh
Change-Id: I90807581e10b6a0024515ff634ac8b29eaa5fc9f
2016-04-27Fix google-explicit-constructor warnings.Chih-Hung Hsieh
Bug: 28341362 Change-Id: Ibdd6a210bb7ff228e3624cc319169f77aca3b51e
2015-11-10Fix threading issuesJohn Reck
Bug: 25584167 Change-Id: I413ef9e0c86f7cca1f7d085e0071745ca0192853
2015-11-03Remove almost-all android::Singleton usersJohn Reck
Bug: 25426213 Change-Id: I88e6206e8915cce95c3a8a8a82a4bb8fbf668141
2015-10-20Add initial OpReorderer benchmarksChris Craik
Change-Id: I6ca8ea89be2159331b2ad7031769c65f54161918
2015-05-05Cleanup propertiesChris Craik
bug:19967854 Separate properties from Caches, into static, RenderThread-only class. Also rewrites the means for java to set properties to correctly handle threading, and adds an override for profile bars so that SysUi doesn't clutter the screen with them. Change-Id: I6e21a96065f52b9ecc49d1a126244804ba106fa9