Chromium Code Reviews| 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 344032a75a8f43b2137907f525dbea883cdd3a7c..557454a4b22d8f8779388d44bca8aeb4c2ab558a 100644 |
| --- a/content/browser/renderer_host/render_widget_host_impl.cc |
| +++ b/content/browser/renderer_host/render_widget_host_impl.cc |
| @@ -60,6 +60,8 @@ |
| #include "content/public/common/content_switches.h" |
| #include "content/public/common/result_codes.h" |
| #include "content/public/common/web_preferences.h" |
| +#include "gpu/GLES2/gl2extchromium.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" |
| @@ -186,6 +188,7 @@ RenderWidgetHostImpl::RenderWidgetHostImpl(RenderWidgetHostDelegate* delegate, |
| allow_privileged_mouse_lock_(false), |
| has_touch_handler_(false), |
| last_input_number_(static_cast<int64>(GetProcess()->GetID()) << 32), |
| + subscribe_uniform_enabled_(false), |
| next_browser_snapshot_id_(1), |
| browser_composite_latency_history_(kBrowserCompositeLatencyHistorySize), |
| weak_factory_(this) { |
| @@ -234,6 +237,10 @@ RenderWidgetHostImpl::RenderWidgetHostImpl(RenderWidgetHostDelegate* delegate, |
| base::Bind(&RenderWidgetHostImpl::RendererIsUnresponsive, |
| weak_factory_.GetWeakPtr()))); |
| } |
| + |
| + subscribe_uniform_enabled_ = |
| + base::CommandLine::ForCurrentProcess()->HasSwitch( |
| + switches::kEnableSubscribeUniformExtension); |
| } |
| RenderWidgetHostImpl::~RenderWidgetHostImpl() { |
| @@ -899,6 +906,19 @@ void RenderWidgetHostImpl::ForwardMouseEventWithLatencyInfo( |
| input_router_->SendMouseEvent(MouseEventWithLatencyInfo(mouse_event, |
| latency_info)); |
| + |
| + // Pass mouse state to gpu service if the subscribe uniform |
| + // extension is enabled. |
| + if (subscribe_uniform_enabled_) { |
|
piman
2014/11/21 23:46:38
It can be done as a follow-up, but I'd like to see
orglofch
2014/11/25 20:05:09
Acknowledged. Marked as a TODO.
|
| + gpu::ValueState state; |
| + state.int_value[0] = mouse_event.x; |
| + state.int_value[1] = mouse_event.y; |
| + GpuProcessHost::SendOnIO( |
| + GpuProcessHost::GPU_PROCESS_KIND_SANDBOXED, |
| + CAUSE_FOR_GPU_LAUNCH_NO_LAUNCH, |
| + new GpuMsg_UpdateValueState( |
| + process_->GetID(), GL_MOUSE_POSITION_CHROMIUM, state)); |
| + } |
| } |
| void RenderWidgetHostImpl::OnPointerEventActivate() { |