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

Side by Side Diff: content/browser/renderer_host/render_widget_host.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 | « no previous file | content/renderer/render_widget.h » ('j') | content/renderer/render_widget.cc » ('J')
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/browser/renderer_host/render_widget_host.h" 5 #include "content/browser/renderer_host/render_widget_host.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 975 matching lines...) Expand 10 before | Expand all | Expand 10 after
986 } 986 }
987 987
988 bool is_repaint_ack = 988 bool is_repaint_ack =
989 ViewHostMsg_UpdateRect_Flags::is_repaint_ack(params.flags); 989 ViewHostMsg_UpdateRect_Flags::is_repaint_ack(params.flags);
990 if (is_repaint_ack) { 990 if (is_repaint_ack) {
991 repaint_ack_pending_ = false; 991 repaint_ack_pending_ = false;
992 TimeDelta delta = TimeTicks::Now() - repaint_start_time_; 992 TimeDelta delta = TimeTicks::Now() - repaint_start_time_;
993 UMA_HISTOGRAM_TIMES("MPArch.RWH_RepaintDelta", delta); 993 UMA_HISTOGRAM_TIMES("MPArch.RWH_RepaintDelta", delta);
994 } 994 }
995 995
996 DCHECK(!params.bitmap_rect.IsEmpty());
997 DCHECK(!params.view_size.IsEmpty()); 996 DCHECK(!params.view_size.IsEmpty());
998 997
999 bool was_async = false; 998 bool was_async = false;
1000 if (!is_accelerated_compositing_active_) { 999 if (!is_accelerated_compositing_active_) {
1000 DCHECK(!params.bitmap_rect.IsEmpty());
1001 const size_t size = params.bitmap_rect.height() * 1001 const size_t size = params.bitmap_rect.height() *
1002 params.bitmap_rect.width() * 4; 1002 params.bitmap_rect.width() * 4;
1003 TransportDIB* dib = process_->GetTransportDIB(params.bitmap); 1003 TransportDIB* dib = process_->GetTransportDIB(params.bitmap);
1004 1004
1005 // If gpu process does painting, scroll_rect and copy_rects are always empty 1005 // If gpu process does painting, scroll_rect and copy_rects are always empty
1006 // and backing store is never used. 1006 // and backing store is never used.
1007 if (dib) { 1007 if (dib) {
1008 if (dib->size() < size) { 1008 if (dib->size() < size) {
1009 DLOG(WARNING) << "Transport DIB too small for given rectangle"; 1009 DLOG(WARNING) << "Transport DIB too small for given rectangle";
1010 UserMetrics::RecordAction( 1010 UserMetrics::RecordAction(
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
1469 pending_mouse_lock_request_ = false; 1469 pending_mouse_lock_request_ = false;
1470 if (!view_ || !view_->HasFocus()|| !view_->LockMouse()) { 1470 if (!view_ || !view_->HasFocus()|| !view_->LockMouse()) {
1471 Send(new ViewMsg_LockMouse_ACK(routing_id_, false)); 1471 Send(new ViewMsg_LockMouse_ACK(routing_id_, false));
1472 return false; 1472 return false;
1473 } else { 1473 } else {
1474 Send(new ViewMsg_LockMouse_ACK(routing_id_, true)); 1474 Send(new ViewMsg_LockMouse_ACK(routing_id_, true));
1475 return true; 1475 return true;
1476 } 1476 }
1477 } 1477 }
1478 } 1478 }
OLDNEW
« no previous file with comments | « no previous file | content/renderer/render_widget.h » ('j') | content/renderer/render_widget.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698