OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 950 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
961 TRACE_EVENT0("gpu", "RenderWidget::didDeactivateCompositor"); | 961 TRACE_EVENT0("gpu", "RenderWidget::didDeactivateCompositor"); |
962 | 962 |
963 is_accelerated_compositing_active_ = false; | 963 is_accelerated_compositing_active_ = false; |
964 Send(new ViewHostMsg_DidActivateAcceleratedCompositing( | 964 Send(new ViewHostMsg_DidActivateAcceleratedCompositing( |
965 routing_id_, is_accelerated_compositing_active_)); | 965 routing_id_, is_accelerated_compositing_active_)); |
966 | 966 |
967 if (using_asynchronous_swapbuffers_) | 967 if (using_asynchronous_swapbuffers_) |
968 using_asynchronous_swapbuffers_ = false; | 968 using_asynchronous_swapbuffers_ = false; |
969 } | 969 } |
970 | 970 |
971 void RenderWidget::didCommitAndDrawCompositorFrame() | |
972 { | |
973 } | |
974 | |
975 void RenderWidget::didCompleteSwapbuffers() | |
nduca
2011/11/12 03:22:06
Should this be conditional on compositor thread mo
enne (OOO)
2011/11/12 19:29:19
This function is robust to being called multiple t
| |
976 { | |
977 if (!next_paint_flags_ && !plugin_window_moves_.size()) | |
978 return; | |
979 | |
980 ViewHostMsg_UpdateRect_Params params; | |
981 params.view_size = size_; | |
982 params.resizer_rect = resizer_rect_; | |
983 params.plugin_window_moves.swap(plugin_window_moves_); | |
984 params.flags = next_paint_flags_; | |
985 params.scroll_offset = GetScrollOffset(); | |
986 update_reply_pending_ = true; | |
987 | |
988 Send(new ViewHostMsg_UpdateRect(routing_id_, params)); | |
989 next_paint_flags_ = 0; | |
990 } | |
991 | |
971 void RenderWidget::scheduleComposite() { | 992 void RenderWidget::scheduleComposite() { |
972 if (WebWidgetHandlesCompositorScheduling()) | 993 if (WebWidgetHandlesCompositorScheduling()) |
973 webwidget_->composite(false); | 994 webwidget_->composite(false); |
974 else { | 995 else { |
975 // TODO(nduca): replace with something a little less hacky. The reason this | 996 // TODO(nduca): replace with something a little less hacky. The reason this |
976 // hack is still used is because the Invalidate-DoDeferredUpdate loop | 997 // hack is still used is because the Invalidate-DoDeferredUpdate loop |
977 // contains a lot of host-renderer synchronization logic that is still | 998 // contains a lot of host-renderer synchronization logic that is still |
978 // important for the accelerated compositing case. The option of simply | 999 // important for the accelerated compositing case. The option of simply |
979 // duplicating all that code is less desirable than "faking out" the | 1000 // duplicating all that code is less desirable than "faking out" the |
980 // invalidation path using a magical damage rect. | 1001 // invalidation path using a magical damage rect. |
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1475 } | 1496 } |
1476 } | 1497 } |
1477 | 1498 |
1478 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { | 1499 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { |
1479 return false; | 1500 return false; |
1480 } | 1501 } |
1481 | 1502 |
1482 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { | 1503 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { |
1483 return false; | 1504 return false; |
1484 } | 1505 } |
OLD | NEW |