| 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 1090 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1101 TRACE_EVENT0("gpu", "RenderWidget::didDeactivateCompositor"); | 1101 TRACE_EVENT0("gpu", "RenderWidget::didDeactivateCompositor"); |
| 1102 | 1102 |
| 1103 is_accelerated_compositing_active_ = false; | 1103 is_accelerated_compositing_active_ = false; |
| 1104 Send(new ViewHostMsg_DidActivateAcceleratedCompositing( | 1104 Send(new ViewHostMsg_DidActivateAcceleratedCompositing( |
| 1105 routing_id_, is_accelerated_compositing_active_)); | 1105 routing_id_, is_accelerated_compositing_active_)); |
| 1106 | 1106 |
| 1107 if (using_asynchronous_swapbuffers_) | 1107 if (using_asynchronous_swapbuffers_) |
| 1108 using_asynchronous_swapbuffers_ = false; | 1108 using_asynchronous_swapbuffers_ = false; |
| 1109 } | 1109 } |
| 1110 | 1110 |
| 1111 void RenderWidget::willBeginCompositorFrame() { |
| 1112 TRACE_EVENT0("gpu", "RenderWidget::willBeginCompositorFrame"); |
| 1113 WillInitiatePaint(); |
| 1114 } |
| 1115 |
| 1111 void RenderWidget::didCommitAndDrawCompositorFrame() { | 1116 void RenderWidget::didCommitAndDrawCompositorFrame() { |
| 1112 TRACE_EVENT0("gpu", "RenderWidget::didCommitAndDrawCompositorFrame"); | 1117 TRACE_EVENT0("gpu", "RenderWidget::didCommitAndDrawCompositorFrame"); |
| 1113 // Accelerated FPS tick for performance tests. See throughput_tests.cc. | 1118 // Accelerated FPS tick for performance tests. See throughput_tests.cc. |
| 1114 // NOTE: Tests may break if this event is renamed or moved. | 1119 // NOTE: Tests may break if this event is renamed or moved. |
| 1115 UNSHIPPED_TRACE_EVENT_INSTANT0("test_fps", "TestFrameTickGPU"); | 1120 UNSHIPPED_TRACE_EVENT_INSTANT0("test_fps", "TestFrameTickGPU"); |
| 1116 // Notify subclasses that we initiated the paint operation. | 1121 // Notify subclasses that we initiated the paint operation. |
| 1117 DidInitiatePaint(); | 1122 DidInitiatePaint(); |
| 1118 } | 1123 } |
| 1119 | 1124 |
| 1120 void RenderWidget::didCompleteSwapBuffers() { | 1125 void RenderWidget::didCompleteSwapBuffers() { |
| 1126 DidFlushPaint(); |
| 1127 |
| 1121 if (update_reply_pending_) | 1128 if (update_reply_pending_) |
| 1122 return; | 1129 return; |
| 1123 | 1130 |
| 1124 if (!next_paint_flags_ && !plugin_window_moves_.size()) | 1131 if (!next_paint_flags_ && !plugin_window_moves_.size()) |
| 1125 return; | 1132 return; |
| 1126 | 1133 |
| 1127 ViewHostMsg_UpdateRect_Params params; | 1134 ViewHostMsg_UpdateRect_Params params; |
| 1128 params.view_size = size_; | 1135 params.view_size = size_; |
| 1129 params.plugin_window_moves.swap(plugin_window_moves_); | 1136 params.plugin_window_moves.swap(plugin_window_moves_); |
| 1130 params.flags = next_paint_flags_; | 1137 params.flags = next_paint_flags_; |
| (...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1669 } | 1676 } |
| 1670 } | 1677 } |
| 1671 | 1678 |
| 1672 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { | 1679 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { |
| 1673 return false; | 1680 return false; |
| 1674 } | 1681 } |
| 1675 | 1682 |
| 1676 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { | 1683 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { |
| 1677 return false; | 1684 return false; |
| 1678 } | 1685 } |
| OLD | NEW |