Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2292)

Unified Diff: android_webview/browser/browser_view_renderer.cc

Issue 2457353002: aw: Enable async ondraw (Closed)
Patch Set: fix unit tests Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « android_webview/browser/browser_view_renderer.h ('k') | android_webview/browser/render_thread_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/browser/browser_view_renderer.cc
diff --git a/android_webview/browser/browser_view_renderer.cc b/android_webview/browser/browser_view_renderer.cc
index 675c2c6af1c36339a7bba345314e0767a6a072e9..1933de978b19e65d75cb18fd5d4ce022ced96721 100644
--- a/android_webview/browser/browser_view_renderer.cc
+++ b/android_webview/browser/browser_view_renderer.cc
@@ -93,8 +93,8 @@ BrowserViewRenderer::BrowserViewRenderer(
const scoped_refptr<base::SingleThreadTaskRunner>& ui_task_runner)
: client_(client),
ui_task_runner_(ui_task_runner),
- async_on_draw_hardware_(base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kAsyncOnDrawHardware)),
+ sync_on_draw_hardware_(base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kSyncOnDrawHardware)),
current_compositor_frame_consumer_(nullptr),
compositor_(nullptr),
is_paused_(false),
@@ -234,7 +234,7 @@ bool BrowserViewRenderer::OnDrawHardware() {
scoped_refptr<content::SynchronousCompositor::FrameFuture> future; // Async.
content::SynchronousCompositor::Frame frame; // Sync.
- bool async = async_on_draw_hardware_ && allow_async_draw_;
+ bool async = !sync_on_draw_hardware_ && allow_async_draw_;
if (async) {
future = compositor_->DemandDrawHwAsync(
size_, viewport_rect_for_tile_priority, transform_for_tile_priority);
« no previous file with comments | « android_webview/browser/browser_view_renderer.h ('k') | android_webview/browser/render_thread_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698