aw: Refactor hardware init
commita0a15ed2b985456951e9918461d9a27a59ed9cdd
authorboliu@chromium.org <boliu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Fri, 9 May 2014 23:16:42 +0000 (9 23:16 +0000)
committerboliu@chromium.org <boliu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Fri, 9 May 2014 23:16:42 +0000 (9 23:16 +0000)
treece95a01d524758660b8c0238d0a451448e765238
parent3c08e31c702cabbb2c94d96c36ec6a4bcb2e7f57
aw: Refactor hardware init

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
android_webview/android_webview.gyp
android_webview/browser/deferred_gpu_command_service.cc [new file with mode: 0644]
android_webview/browser/deferred_gpu_command_service.h [copied from android_webview/browser/hardware_renderer.h with 60% similarity]
android_webview/browser/gl_view_renderer_manager.cc
android_webview/browser/gl_view_renderer_manager.h
android_webview/browser/hardware_renderer.cc
android_webview/browser/hardware_renderer.h
android_webview/browser/scoped_app_gl_state_restore.cc
android_webview/browser/scoped_app_gl_state_restore.h
android_webview/native/aw_contents.cc
android_webview/native/aw_contents.h