diff options
author | boliu@chromium.org <boliu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-11 03:52:06 +0000 |
---|---|---|
committer | boliu@chromium.org <boliu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-11 03:52:06 +0000 |
commit | 22e0fb543cc42661bdd473ea72f808f9d30b9888 (patch) | |
tree | 7cfe583a88255f9bef6e4dc0372a1a8af1125c9b /android_webview/browser | |
parent | bfedda1e129220274a9bf9cb12df4394f83fe7c2 (diff) | |
download | chromium_src-22e0fb543cc42661bdd473ea72f808f9d30b9888.zip chromium_src-22e0fb543cc42661bdd473ea72f808f9d30b9888.tar.gz chromium_src-22e0fb543cc42661bdd473ea72f808f9d30b9888.tar.bz2 |
Fix software mode after r205072
We still call RequestProcessMode which now initializes hardware mode.
Make sure we early return out if the hardware mode command line flag
is not set.
BUG=
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/16599017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205389 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'android_webview/browser')
-rw-r--r-- | android_webview/browser/in_process_view_renderer.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/android_webview/browser/in_process_view_renderer.cc b/android_webview/browser/in_process_view_renderer.cc index 29969da..ff45481 100644 --- a/android_webview/browser/in_process_view_renderer.cc +++ b/android_webview/browser/in_process_view_renderer.cc @@ -257,6 +257,11 @@ bool RenderPictureToCanvas(SkPicture* picture, SkCanvas* canvas) { return true; } +// TODO(boliu): Remove this when hardware mode is ready. +bool HardwareEnabled() { + return CommandLine::ForCurrentProcess()->HasSwitch("testing-webview-gl-mode"); +} + } // namespace InProcessViewRenderer::InProcessViewRenderer( @@ -318,10 +323,13 @@ bool InProcessViewRenderer::PrepareDrawGL(int x, int y) { // No harm in updating |hw_rendering_scroll_| even if we return false. hw_rendering_scroll_ = gfx::Point(x, y); return attached_to_window_ && compositor_ && !hardware_failed_ && - CommandLine::ForCurrentProcess()->HasSwitch("testing-webview-gl-mode"); + HardwareEnabled(); } void InProcessViewRenderer::DrawGL(AwDrawGLInfo* draw_info) { + if (!HardwareEnabled()) + return; + DCHECK(view_visible_); // We need to watch if the current Android context has changed and enforce |