| OLD | NEW |
| 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" |
| (...skipping 1096 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1107 is_accelerated_compositing_active_ = false; | 1107 is_accelerated_compositing_active_ = false; |
| 1108 Send(new ViewHostMsg_DidActivateAcceleratedCompositing( | 1108 Send(new ViewHostMsg_DidActivateAcceleratedCompositing( |
| 1109 routing_id_, is_accelerated_compositing_active_)); | 1109 routing_id_, is_accelerated_compositing_active_)); |
| 1110 | 1110 |
| 1111 if (using_asynchronous_swapbuffers_) | 1111 if (using_asynchronous_swapbuffers_) |
| 1112 using_asynchronous_swapbuffers_ = false; | 1112 using_asynchronous_swapbuffers_ = false; |
| 1113 } | 1113 } |
| 1114 | 1114 |
| 1115 void RenderWidget::willBeginCompositorFrame() { | 1115 void RenderWidget::willBeginCompositorFrame() { |
| 1116 TRACE_EVENT0("gpu", "RenderWidget::willBeginCompositorFrame"); | 1116 TRACE_EVENT0("gpu", "RenderWidget::willBeginCompositorFrame"); |
| 1117 |
| 1118 DCHECK(RenderThreadImpl::current()->compositor_thread()); |
| 1119 |
| 1120 // The following two can result in further layout and possibly |
| 1121 // enable GPU acceleration so they need to be called before any painting |
| 1122 // is done. |
| 1123 UpdateTextInputState(); |
| 1124 UpdateSelectionBounds(); |
| 1125 |
| 1117 WillInitiatePaint(); | 1126 WillInitiatePaint(); |
| 1118 } | 1127 } |
| 1119 | 1128 |
| 1120 void RenderWidget::didBecomeReadyForAdditionalInput() { | 1129 void RenderWidget::didBecomeReadyForAdditionalInput() { |
| 1121 TRACE_EVENT0("renderer", "RenderWidget::didBecomeReadyForAdditionalInput"); | 1130 TRACE_EVENT0("renderer", "RenderWidget::didBecomeReadyForAdditionalInput"); |
| 1122 if (pending_input_event_ack_.get()) | 1131 if (pending_input_event_ack_.get()) |
| 1123 Send(pending_input_event_ack_.release()); | 1132 Send(pending_input_event_ack_.release()); |
| 1124 } | 1133 } |
| 1125 | 1134 |
| 1126 void RenderWidget::didCommitAndDrawCompositorFrame() { | 1135 void RenderWidget::didCommitAndDrawCompositorFrame() { |
| (...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1686 } | 1695 } |
| 1687 } | 1696 } |
| 1688 | 1697 |
| 1689 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { | 1698 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { |
| 1690 return false; | 1699 return false; |
| 1691 } | 1700 } |
| 1692 | 1701 |
| 1693 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { | 1702 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { |
| 1694 return false; | 1703 return false; |
| 1695 } | 1704 } |
| OLD | NEW |