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

Side by Side Diff: content/renderer/render_widget.cc

Issue 9802006: Implement active wheel fling transfer via WebCompositorInputHandlerClient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 8 years, 8 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/renderer/render_widget.h" 5 #include "content/renderer/render_widget.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/message_loop.h" 12 #include "base/message_loop.h"
13 #include "base/metrics/histogram.h" 13 #include "base/metrics/histogram.h"
14 #include "base/stl_util.h" 14 #include "base/stl_util.h"
15 #include "base/utf_string_conversions.h" 15 #include "base/utf_string_conversions.h"
16 #include "build/build_config.h" 16 #include "build/build_config.h"
17 #include "content/common/swapped_out_messages.h" 17 #include "content/common/swapped_out_messages.h"
18 #include "content/common/view_messages.h" 18 #include "content/common/view_messages.h"
19 #include "content/public/common/content_switches.h" 19 #include "content/public/common/content_switches.h"
20 #include "content/renderer/gpu/compositor_thread.h"
21 #include "content/renderer/render_process.h" 20 #include "content/renderer/render_process.h"
22 #include "content/renderer/render_thread_impl.h" 21 #include "content/renderer/render_thread_impl.h"
23 #include "content/renderer/renderer_webkitplatformsupport_impl.h" 22 #include "content/renderer/renderer_webkitplatformsupport_impl.h"
24 #include "ipc/ipc_sync_message.h" 23 #include "ipc/ipc_sync_message.h"
25 #include "skia/ext/platform_canvas.h" 24 #include "skia/ext/platform_canvas.h"
26 #include "third_party/skia/include/core/SkShader.h" 25 #include "third_party/skia/include/core/SkShader.h"
27 #include "third_party/skia/include/effects/SkTableColorFilter.h" 26 #include "third_party/skia/include/effects/SkTableColorFilter.h"
28 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h" 27 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h"
29 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPoint.h" 28 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPoint.h"
30 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPagePopup.h" 29 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPagePopup.h"
(...skipping 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after
1068 FROM_HERE, base::Bind(&RenderWidget::InvalidationCallback, this)); 1067 FROM_HERE, base::Bind(&RenderWidget::InvalidationCallback, this));
1069 } 1068 }
1070 1069
1071 void RenderWidget::didAutoResize(const WebSize& new_size) { 1070 void RenderWidget::didAutoResize(const WebSize& new_size) {
1072 size_ = new_size; 1071 size_ = new_size;
1073 } 1072 }
1074 1073
1075 void RenderWidget::didActivateCompositor(int input_handler_identifier) { 1074 void RenderWidget::didActivateCompositor(int input_handler_identifier) {
1076 TRACE_EVENT0("gpu", "RenderWidget::didActivateCompositor"); 1075 TRACE_EVENT0("gpu", "RenderWidget::didActivateCompositor");
1077 1076
1078 CompositorThread* compositor_thread =
1079 RenderThreadImpl::current()->compositor_thread();
1080 if (compositor_thread)
1081 compositor_thread->AddInputHandler(routing_id_, input_handler_identifier);
1082
1083 if (!is_accelerated_compositing_active_) { 1077 if (!is_accelerated_compositing_active_) {
1084 // When not in accelerated compositing mode, in certain cases (e.g. waiting 1078 // When not in accelerated compositing mode, in certain cases (e.g. waiting
1085 // for a resize or if no backing store) the RenderWidgetHost is blocking the 1079 // for a resize or if no backing store) the RenderWidgetHost is blocking the
1086 // browser's UI thread for some time, waiting for an UpdateRect. If we are 1080 // browser's UI thread for some time, waiting for an UpdateRect. If we are
1087 // going to switch to accelerated compositing, the GPU process may need 1081 // going to switch to accelerated compositing, the GPU process may need
1088 // round-trips to the browser's UI thread before finishing the frame, 1082 // round-trips to the browser's UI thread before finishing the frame,
1089 // causing deadlocks if we delay the UpdateRect until we receive the 1083 // causing deadlocks if we delay the UpdateRect until we receive the
1090 // OnSwapBuffersComplete. So send a dummy message that will unblock the 1084 // OnSwapBuffersComplete. So send a dummy message that will unblock the
1091 // browser's UI thread. 1085 // browser's UI thread.
1092 Send(new ViewHostMsg_UpdateIsDelayed(routing_id_)); 1086 Send(new ViewHostMsg_UpdateIsDelayed(routing_id_));
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
1676 } 1670 }
1677 } 1671 }
1678 1672
1679 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { 1673 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) {
1680 return false; 1674 return false;
1681 } 1675 }
1682 1676
1683 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { 1677 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const {
1684 return false; 1678 return false;
1685 } 1679 }
OLDNEW
« content/renderer/gpu/compositor_thread.cc ('K') | « content/renderer/render_view_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698