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

Side by Side Diff: android_webview/browser/renderer_host/view_renderer_host.cc

Issue 13907007: Replace merge-ui-and-compositor-threads flag with no-merge-ui-and-compositor-threads flag (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync Created 7 years, 7 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "android_webview/browser/renderer_host/view_renderer_host.h" 5 #include "android_webview/browser/renderer_host/view_renderer_host.h"
6 6
7 #include "android_webview/browser/scoped_allow_wait_for_legacy_web_view_api.h" 7 #include "android_webview/browser/scoped_allow_wait_for_legacy_web_view_api.h"
8 #include "android_webview/common/aw_switches.h" 8 #include "android_webview/common/aw_switches.h"
9 #include "android_webview/common/render_view_messages.h" 9 #include "android_webview/common/render_view_messages.h"
10 #include "android_webview/common/renderer_picture_map.h" 10 #include "android_webview/common/renderer_picture_map.h"
(...skipping 30 matching lines...) Expand all
41 } 41 }
42 42
43 void ViewRendererHost::OnPictureUpdated() { 43 void ViewRendererHost::OnPictureUpdated() {
44 client_->OnPictureUpdated(web_contents()->GetRenderProcessHost()->GetID(), 44 client_->OnPictureUpdated(web_contents()->GetRenderProcessHost()->GetID(),
45 routing_id()); 45 routing_id());
46 } 46 }
47 47
48 void ViewRendererHost::OnDidActivateAcceleratedCompositing( 48 void ViewRendererHost::OnDidActivateAcceleratedCompositing(
49 int input_handler_id) { 49 int input_handler_id) {
50 50
51 if (!CommandLine::ForCurrentProcess()->HasSwitch( 51 if (CommandLine::ForCurrentProcess()->HasSwitch(
52 switches::kMergeUIAndRendererCompositorThreads)) { 52 switches::kNoMergeUIAndRendererCompositorThreads)) {
53 return; 53 return;
54 } 54 }
55 55
56 // This call is only meaningful and thread-safe when the UI and renderer 56 // This call is only meaningful and thread-safe when the UI and renderer
57 // compositor share the same thread. Any other case will likely yield 57 // compositor share the same thread. Any other case will likely yield
58 // terrible, terrible damage. 58 // terrible, terrible damage.
59 WebKit::WebCompositorInputHandler* input_handler = 59 WebKit::WebCompositorInputHandler* input_handler =
60 WebKit::WebCompositorInputHandler::fromIdentifier(input_handler_id); 60 WebKit::WebCompositorInputHandler::fromIdentifier(input_handler_id);
61 if (!input_handler) 61 if (!input_handler)
62 return; 62 return;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 return handled ? true : WebContentsObserver::OnMessageReceived(message); 95 return handled ? true : WebContentsObserver::OnMessageReceived(message);
96 } 96 }
97 97
98 bool ViewRendererHost::IsRenderViewReady() const { 98 bool ViewRendererHost::IsRenderViewReady() const {
99 return web_contents()->GetRenderProcessHost()->HasConnection() && 99 return web_contents()->GetRenderProcessHost()->HasConnection() &&
100 web_contents()->GetRenderViewHost() && 100 web_contents()->GetRenderViewHost() &&
101 web_contents()->GetRenderViewHost()->IsRenderViewLive(); 101 web_contents()->GetRenderViewHost()->IsRenderViewLive();
102 } 102 }
103 103
104 } // namespace android_webview 104 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/browser/browser_view_renderer_impl.cc ('k') | android_webview/common/aw_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698