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

Unified Diff: content/renderer/render_widget.cc

Issue 1408123005: Android Webview IPC-based sync compositing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix win compile Created 5 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 | « content/renderer/render_thread_impl.cc ('k') | ipc/ipc_message_start.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_widget.cc
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index 10eff2c6a1c5844034937991ca8ab73a7b6c907b..191df39c0804d5d0f5eba8ac726841b1863a56bf 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -84,6 +84,8 @@
#if defined(OS_ANDROID)
#include <android/keycodes.h>
#include "content/renderer/android/synchronous_compositor_factory.h"
+#include "content/renderer/android/synchronous_compositor_filter.h"
+#include "content/renderer/android/synchronous_compositor_output_surface.h"
#endif
#if defined(OS_POSIX)
@@ -1032,6 +1034,12 @@ scoped_ptr<cc::OutputSurface> RenderWidget::CreateOutputSurface(bool fallback) {
return factory->CreateOutputSurface(
routing_id(), frame_swap_message_queue_, context_provider,
worker_context_provider);
+ } else if (RenderThreadImpl::current()->sync_compositor_message_filter()) {
+ return make_scoped_ptr(new SynchronousCompositorOutputSurface(
+ context_provider, worker_context_provider, routing_id(),
+ content::RenderThreadImpl::current()
+ ->sync_compositor_message_filter(),
+ frame_swap_message_queue_));
}
#endif
}
@@ -2373,7 +2381,9 @@ RenderWidget::CreateGraphicsContext3D(bool compositor) {
WebGraphicsContext3DCommandBufferImpl::SharedMemoryLimits limits;
#if defined(OS_ANDROID)
bool using_synchronous_compositing =
- SynchronousCompositorFactory::GetInstance();
+ SynchronousCompositorFactory::GetInstance() ||
+ base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kIPCSyncCompositing);
// If we raster too fast we become upload bound, and pending
// uploads consume memory. For maximum upload throughput, we would
// want to allow for upload_throughput * pipeline_time of pending
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | ipc/ipc_message_start.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698