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

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

Issue 14779010: Don't expect ack for ViewMsg_OnResize if backing size is empty (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Keep short_circuit_size_update condition Created 7 years, 7 months 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/browser/renderer_host/render_widget_host_unittest.cc » ('j') | 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) 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/browser/renderer_host/render_widget_host_impl.h" 5 #include "content/browser/renderer_host/render_widget_host_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 was_fullscreen != is_fullscreen_ || 527 was_fullscreen != is_fullscreen_ ||
528 old_overdraw_bottom_height != overdraw_bottom_height_; 528 old_overdraw_bottom_height != overdraw_bottom_height_;
529 529
530 if (!size_changed && !side_payload_changed) 530 if (!size_changed && !side_payload_changed)
531 return; 531 return;
532 532
533 if (in_flight_size_ != gfx::Size() && new_size == in_flight_size_ && 533 if (in_flight_size_ != gfx::Size() && new_size == in_flight_size_ &&
534 !side_payload_changed) 534 !side_payload_changed)
535 return; 535 return;
536 536
537 // We don't expect to receive an ACK when the requested size is empty or when 537 // We don't expect to receive an ACK when the requested size or the physical
538 // the main viewport size didn't change. 538 // backing size is empty, or when the main viewport size didn't change.
539 if (!new_size.IsEmpty() && size_changed) 539 if (!new_size.IsEmpty() && !physical_backing_size_.IsEmpty() && size_changed)
540 resize_ack_pending_ = true; 540 resize_ack_pending_ = true;
541 541
542 if (!Send(new ViewMsg_Resize(routing_id_, new_size, physical_backing_size_, 542 if (!Send(new ViewMsg_Resize(routing_id_, new_size, physical_backing_size_,
543 overdraw_bottom_height_, 543 overdraw_bottom_height_,
544 GetRootWindowResizerRect(), is_fullscreen_))) { 544 GetRootWindowResizerRect(), is_fullscreen_))) {
545 resize_ack_pending_ = false; 545 resize_ack_pending_ = false;
546 } else { 546 } else {
547 in_flight_size_ = new_size; 547 in_flight_size_ = new_size;
548 } 548 }
549 } 549 }
(...skipping 1919 matching lines...) Expand 10 before | Expand all | Expand 10 after
2469 } 2469 }
2470 2470
2471 void RenderWidgetHostImpl::DetachDelegate() { 2471 void RenderWidgetHostImpl::DetachDelegate() {
2472 delegate_ = NULL; 2472 delegate_ = NULL;
2473 } 2473 }
2474 2474
2475 void RenderWidgetHostImpl::FrameSwapped(const cc::LatencyInfo& latency_info) { 2475 void RenderWidgetHostImpl::FrameSwapped(const cc::LatencyInfo& latency_info) {
2476 } 2476 }
2477 2477
2478 } // namespace content 2478 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698