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

Unified Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 634313002: Add mouse input forwarding to gpu service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: IPC passes ValueState Created 6 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 | « no previous file | content/common/gpu/gpu_channel.h » ('j') | content/common/gpu/gpu_channel.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_impl.cc
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 9a1d709a2ef00f024c3194de5ec841498afcfc3b..ac93c2ea9dd81c6767cdb11f4e7c03d813a55e37 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -60,6 +60,7 @@
#include "content/public/common/content_switches.h"
#include "content/public/common/result_codes.h"
#include "content/public/common/web_preferences.h"
+#include "gpu/command_buffer/service/gpu_switches.h"
#include "skia/ext/image_operations.h"
#include "skia/ext/platform_canvas.h"
#include "third_party/WebKit/public/web/WebCompositionUnderline.h"
@@ -855,6 +856,24 @@ void RenderWidgetHostImpl::StopHangMonitorTimeout() {
void RenderWidgetHostImpl::ForwardMouseEvent(const WebMouseEvent& mouse_event) {
ForwardMouseEventWithLatencyInfo(mouse_event, ui::LatencyInfo());
+ const base::CommandLine& command_line =
jdduke (slow) 2014/11/18 16:55:30 I'm wondering if we still want to send this messag
orglofch 2014/11/20 02:16:21 Done.
+ *base::CommandLine::ForCurrentProcess();
+ // Pass mouse state to gpu service if the subscribe uniform
+ // extension is enabled
Ken Russell (switch to Gerrit) 2014/11/17 23:19:32 Style nit here and throughout: please add comments
orglofch 2014/11/20 02:16:21 Done.
+ if (command_line.HasSwitch(switches::kEnableSubscribeUniformExtension)) {
+ gpu::ValueState state;
+ state.int_value[0] = mouse_event.x;
+ state.int_value[1] = mouse_event.y;
+ GpuProcessHost::SendOnIO(
+#if defined(OS_WIN)
Ken Russell (switch to Gerrit) 2014/11/17 23:19:32 This #ifdef is gross. Can you please figure out a
orglofch 2014/11/20 02:16:21 Done. This was unnecesarry logic, the GPU should b
+ GpuProcessHost::GPU_PROCESS_KIND_UNSANDBOXED,
+#else
+ GpuProcessHost::GPU_PROCESS_KIND_SANDBOXED,
+#endif
+ CAUSE_FOR_GPU_LAUNCH_NO_LAUNCH,
+ new GpuMsg_UpdateValueState(
+ process_->GetID(), GL_MOUSE_POSITION_CHROMIUM, state));
+ }
}
void RenderWidgetHostImpl::ForwardMouseEventWithLatencyInfo(
« no previous file with comments | « no previous file | content/common/gpu/gpu_channel.h » ('j') | content/common/gpu/gpu_channel.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698