Chromium Code Reviews| 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 1094 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1105 TRACE_EVENT0("gpu", "RenderWidget::didDeactivateCompositor"); | 1105 TRACE_EVENT0("gpu", "RenderWidget::didDeactivateCompositor"); |
| 1106 | 1106 |
| 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() { |
|
piman
2012/03/28 16:45:50
Just to double-check, this is only called with the
nduca
2012/03/28 18:01:12
Yes, now.
| |
| 1116 TRACE_EVENT0("gpu", "RenderWidget::willBeginCompositorFrame"); | 1116 TRACE_EVENT0("gpu", "RenderWidget::willBeginCompositorFrame"); |
| 1117 | |
| 1118 // The following two can result in further layout and possibly | |
| 1119 // enable GPU acceleration so they need to be called before any painting | |
| 1120 // is done. | |
| 1121 UpdateTextInputState(); | |
| 1122 UpdateSelectionBounds(); | |
| 1123 | |
| 1117 WillInitiatePaint(); | 1124 WillInitiatePaint(); |
| 1118 } | 1125 } |
| 1119 | 1126 |
| 1120 void RenderWidget::didBecomeReadyForAdditionalInput() { | 1127 void RenderWidget::didBecomeReadyForAdditionalInput() { |
| 1121 TRACE_EVENT0("renderer", "RenderWidget::didBecomeReadyForAdditionalInput"); | 1128 TRACE_EVENT0("renderer", "RenderWidget::didBecomeReadyForAdditionalInput"); |
| 1122 if (pending_input_event_ack_.get()) | 1129 if (pending_input_event_ack_.get()) |
| 1123 Send(pending_input_event_ack_.release()); | 1130 Send(pending_input_event_ack_.release()); |
| 1124 } | 1131 } |
| 1125 | 1132 |
| 1126 void RenderWidget::didCommitAndDrawCompositorFrame() { | 1133 void RenderWidget::didCommitAndDrawCompositorFrame() { |
| (...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1686 } | 1693 } |
| 1687 } | 1694 } |
| 1688 | 1695 |
| 1689 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { | 1696 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { |
| 1690 return false; | 1697 return false; |
| 1691 } | 1698 } |
| 1692 | 1699 |
| 1693 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { | 1700 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { |
| 1694 return false; | 1701 return false; |
| 1695 } | 1702 } |
| OLD | NEW |