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 1142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1153 // OnSwapBuffersComplete. So send a dummy message that will unblock the | 1153 // OnSwapBuffersComplete. So send a dummy message that will unblock the |
1154 // browser's UI thread. This is not necessary on Mac, because SwapBuffers | 1154 // browser's UI thread. This is not necessary on Mac, because SwapBuffers |
1155 // now unblocks GetBackingStore on Mac. | 1155 // now unblocks GetBackingStore on Mac. |
1156 Send(new ViewHostMsg_UpdateIsDelayed(routing_id_)); | 1156 Send(new ViewHostMsg_UpdateIsDelayed(routing_id_)); |
1157 } | 1157 } |
1158 #endif | 1158 #endif |
1159 | 1159 |
1160 is_accelerated_compositing_active_ = true; | 1160 is_accelerated_compositing_active_ = true; |
1161 Send(new ViewHostMsg_DidActivateAcceleratedCompositing( | 1161 Send(new ViewHostMsg_DidActivateAcceleratedCompositing( |
1162 routing_id_, is_accelerated_compositing_active_)); | 1162 routing_id_, is_accelerated_compositing_active_)); |
| 1163 |
| 1164 // Ignore any swapbuffer complete callbacks corresponding |
| 1165 // to swapbuffer calls made before the compositor was activated. |
| 1166 num_swapbuffers_complete_pending_ = 0; |
1163 } | 1167 } |
1164 | 1168 |
1165 void RenderWidget::didDeactivateCompositor() { | 1169 void RenderWidget::didDeactivateCompositor() { |
1166 TRACE_EVENT0("gpu", "RenderWidget::didDeactivateCompositor"); | 1170 TRACE_EVENT0("gpu", "RenderWidget::didDeactivateCompositor"); |
1167 | 1171 |
1168 is_accelerated_compositing_active_ = false; | 1172 is_accelerated_compositing_active_ = false; |
1169 Send(new ViewHostMsg_DidActivateAcceleratedCompositing( | 1173 Send(new ViewHostMsg_DidActivateAcceleratedCompositing( |
1170 routing_id_, is_accelerated_compositing_active_)); | 1174 routing_id_, is_accelerated_compositing_active_)); |
1171 | 1175 |
1172 if (using_asynchronous_swapbuffers_) | 1176 if (using_asynchronous_swapbuffers_) |
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1884 pending_smooth_scroll_gestures_.insert(std::make_pair(id, callback)); | 1888 pending_smooth_scroll_gestures_.insert(std::make_pair(id, callback)); |
1885 } | 1889 } |
1886 | 1890 |
1887 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { | 1891 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { |
1888 return false; | 1892 return false; |
1889 } | 1893 } |
1890 | 1894 |
1891 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { | 1895 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { |
1892 return false; | 1896 return false; |
1893 } | 1897 } |
OLD | NEW |