summaryrefslogtreecommitdiffstats
path: root/android_webview/browser/gl_view_renderer_manager.cc
Commit message (Collapse)AuthorAgeFilesLines
* aw: Fix hardware init/tear down in pop up flowboliu@chromium.org2014-05-231-0/+5
| | | | | | | | | | | | | | | | | | | | Previously we did not call onDetached on old native AwContents, which now no longer cleans up hardware resources correctly. This also had the side effect that the following onAttach with the new native AwContents is ignored in java code due to attach/detach mismatch. As make onDetached more strict with respect to ordering. And lock to protect variable accessed on multiple threads. Also need to ensure we never requestDrawGL on the blank native AwContents that's destroyed during pop up. BUG=376622 Review URL: https://codereview.chromium.org/288983007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@272500 0039d316-1c4b-4281-b951-d872f2087c98
* aw: Refactor hardware initboliu@chromium.org2014-05-091-0/+1
| | | | | | | | | | | | | | | | | | | | Move inserting the initialization task to first OnDraw with hardware canvas rather than OnAttach. Also insert view into GLViewRendererManager here. Refactor DeferredGpuCommandService into its own file, and have AwContents interact with it. Move ScopedAppGLStateRestore into AwContents as well. This meant that the header cannot include any GL files, so required a refactor there. Also discovered GLViewRendererManager::PushBack is not thread safe during refactoring. Fix that as well. BUG=344087 Review URL: https://codereview.chromium.org/273703008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269461 0039d316-1c4b-4281-b951-d872f2087c98
* Leak instead of deadlock if executeHardwareAction failsboliu@chromium.org2014-04-281-13/+0
| | | | | | | | | | | | | | | | | | If executeHardwareAction fails in onDetachedFromWindow, then HardwareRenderer destructor will deadlock later when being destroyed on UI thread. In this case, run the destructor on UI without deadlock but leak GL resources instead. Achieve this by running always running release gl even on UI thread, and making the allow_gl global to be a true thread local, which can be set to true on UI thread. BUG= TBR=benm Review URL: https://codereview.chromium.org/255783007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266429 0039d316-1c4b-4281-b951-d872f2087c98
* aw: Move HardwareRenderer out of BrowserViewRendererboliu@chromium.org2014-03-051-19/+13
| | | | | | | | | | | | | | | | | | | | | | Hardware initialization now is done as part of HardwareRenderer constructor and destructor. AwContents now directly owns HardwareRenderer and post results back to BrowserViewRenderer where needed. Expose View.executeHardwareAction to chromium and use it to run hardware only code. Also take this opportunity to clean up unneeded public draw_gl.h and draw_sw.h interfaces. Rolled corresponding AOSP change: https://android-review.googlesource.com/#/c/83824/ BUG=344087 NOTRY=true Review URL: https://codereview.chromium.org/185133003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254957 0039d316-1c4b-4281-b951-d872f2087c98
* aw: Add SharedRendererStateboliu@chromium.org2014-02-271-4/+4
| | | | | | | | | | | | | | | | | | | BrowserViewRenderer and HardwareRenderer should be independent, and only share data through a lock-protected SharedRendererState. This class is inspired by cc::ThreadProxy, and handles all threading issues between UI and RT threads. For now, move all SynchronousCompositor calls to shared state. Also pass DrawGL input and output through the shared state. Next step is to not have BVR directly own and call into HR. BUG=344087 NOTRY=true Review URL: https://codereview.chromium.org/181113003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@253679 0039d316-1c4b-4281-b951-d872f2087c98
* aw: Split hardware rendering into HardwareRendererboliu@chromium.org2014-02-261-2/+12
| | | | | | | | | | | | | | | | | | The split is currently not perfect, but idea is all compositor interactions dealing with hardware mode is moved to HardwareRenderer. Should be a no-op change in general. Also removed the BrowserViewRenderer <- InProcessViewRenderer inheritance since it is not needed anymore. Removed other random cruft too. BUG=344087 NOTRY=true Review URL: https://codereview.chromium.org/176543004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@253315 0039d316-1c4b-4281-b951-d872f2087c98
* aw: Do not assume functor will be called on UI threadboliu@chromium.org2014-02-201-0/+21
| | | | | | | | | | | | | | Instead save the thread of the DrawGL call and use that to determine if GL is allowed. Not that RequestGL and most other things still run on UI thread. No thread safety added in this change. BUG=344087 Review URL: https://codereview.chromium.org/172793002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@252285 0039d316-1c4b-4281-b951-d872f2087c98
* [Android WebView] Maintain global DrawGL MRU listboliu@chromium.org2013-08-031-0/+45
Use this list of RequestProcessGL to drive GL in case when GL is not allowed. BUG= NOTRY=true Review URL: https://chromiumcodereview.appspot.com/21159005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@215447 0039d316-1c4b-4281-b951-d872f2087c98