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

Side by Side Diff: content/browser/renderer_host/render_widget_host.cc

Issue 8528006: Fix resize issues when using threaded compositing (Closed)
Patch Set: 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 968 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 } 979 }
980 980
981 bool is_repaint_ack = 981 bool is_repaint_ack =
982 ViewHostMsg_UpdateRect_Flags::is_repaint_ack(params.flags); 982 ViewHostMsg_UpdateRect_Flags::is_repaint_ack(params.flags);
983 if (is_repaint_ack) { 983 if (is_repaint_ack) {
984 repaint_ack_pending_ = false; 984 repaint_ack_pending_ = false;
985 TimeDelta delta = TimeTicks::Now() - repaint_start_time_; 985 TimeDelta delta = TimeTicks::Now() - repaint_start_time_;
986 UMA_HISTOGRAM_TIMES("MPArch.RWH_RepaintDelta", delta); 986 UMA_HISTOGRAM_TIMES("MPArch.RWH_RepaintDelta", delta);
987 } 987 }
988 988
989 DCHECK(!params.bitmap_rect.IsEmpty());
990 DCHECK(!params.view_size.IsEmpty()); 989 DCHECK(!params.view_size.IsEmpty());
991 990
992 bool was_async = false; 991 bool was_async = false;
993 if (!is_accelerated_compositing_active_) { 992 if (!is_accelerated_compositing_active_) {
993 DCHECK(!params.bitmap_rect.IsEmpty());
994 const size_t size = params.bitmap_rect.height() * 994 const size_t size = params.bitmap_rect.height() *
995 params.bitmap_rect.width() * 4; 995 params.bitmap_rect.width() * 4;
996 TransportDIB* dib = process_->GetTransportDIB(params.bitmap); 996 TransportDIB* dib = process_->GetTransportDIB(params.bitmap);
997 997
998 // If gpu process does painting, scroll_rect and copy_rects are always empty 998 // If gpu process does painting, scroll_rect and copy_rects are always empty
999 // and backing store is never used. 999 // and backing store is never used.
1000 if (dib) { 1000 if (dib) {
1001 if (dib->size() < size) { 1001 if (dib->size() < size) {
1002 DLOG(WARNING) << "Transport DIB too small for given rectangle"; 1002 DLOG(WARNING) << "Transport DIB too small for given rectangle";
1003 UserMetrics::RecordAction( 1003 UserMetrics::RecordAction(
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
1464 pending_mouse_lock_request_ = false; 1464 pending_mouse_lock_request_ = false;
1465 if (!view_ || !view_->HasFocus()|| !view_->LockMouse()) { 1465 if (!view_ || !view_->HasFocus()|| !view_->LockMouse()) {
1466 Send(new ViewMsg_LockMouse_ACK(routing_id_, false)); 1466 Send(new ViewMsg_LockMouse_ACK(routing_id_, false));
1467 return false; 1467 return false;
1468 } else { 1468 } else {
1469 Send(new ViewMsg_LockMouse_ACK(routing_id_, true)); 1469 Send(new ViewMsg_LockMouse_ACK(routing_id_, true));
1470 return true; 1470 return true;
1471 } 1471 }
1472 } 1472 }
1473 } 1473 }
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