Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(506)

Side by Side Diff: content/renderer/render_widget.cc

Issue 8528006: Fix resize issues when using threaded compositing (Closed)
Patch Set: Rename to match WebKit patch, also early out if update reply already pending Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/renderer/render_widget.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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()
jam 2011/11/17 22:56:12 nit: here and below, brace bracket on the previous
972 {
973 }
974
975 void RenderWidget::didCompleteSwapBuffers()
976 {
977 if (update_reply_pending())
978 return;
979
980 if (!next_paint_flags_ && !plugin_window_moves_.size())
jbates 2012/04/16 23:41:35 This will blow up if someone adds new flags to Vie
981 return;
982
983 ViewHostMsg_UpdateRect_Params params;
984 params.view_size = size_;
985 params.resizer_rect = resizer_rect_;
986 params.plugin_window_moves.swap(plugin_window_moves_);
987 params.flags = next_paint_flags_;
988 params.scroll_offset = GetScrollOffset();
989 update_reply_pending_ = true;
990
991 Send(new ViewHostMsg_UpdateRect(routing_id_, params));
992 next_paint_flags_ = 0;
993 }
994
971 void RenderWidget::scheduleComposite() { 995 void RenderWidget::scheduleComposite() {
972 if (WebWidgetHandlesCompositorScheduling()) 996 if (WebWidgetHandlesCompositorScheduling())
973 webwidget_->composite(false); 997 webwidget_->composite(false);
974 else { 998 else {
975 // TODO(nduca): replace with something a little less hacky. The reason this 999 // TODO(nduca): replace with something a little less hacky. The reason this
976 // hack is still used is because the Invalidate-DoDeferredUpdate loop 1000 // hack is still used is because the Invalidate-DoDeferredUpdate loop
977 // contains a lot of host-renderer synchronization logic that is still 1001 // contains a lot of host-renderer synchronization logic that is still
978 // important for the accelerated compositing case. The option of simply 1002 // important for the accelerated compositing case. The option of simply
979 // duplicating all that code is less desirable than "faking out" the 1003 // duplicating all that code is less desirable than "faking out" the
980 // invalidation path using a magical damage rect. 1004 // invalidation path using a magical damage rect.
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
1475 } 1499 }
1476 } 1500 }
1477 1501
1478 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { 1502 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) {
1479 return false; 1503 return false;
1480 } 1504 }
1481 1505
1482 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { 1506 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const {
1483 return false; 1507 return false;
1484 } 1508 }
OLDNEW
« no previous file with comments | « content/renderer/render_widget.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698