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

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

Issue 299443003: Restore resize throttling on Chrome OS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, test fix Created 6 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 | Annotate | Revision Log
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 <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 } 574 }
575 575
576 void RenderWidgetHostImpl::WasResized() { 576 void RenderWidgetHostImpl::WasResized() {
577 // Skip if the |delegate_| has already been detached because 577 // Skip if the |delegate_| has already been detached because
578 // it's web contents is being deleted. 578 // it's web contents is being deleted.
579 if (resize_ack_pending_ || !process_->HasConnection() || !view_ || 579 if (resize_ack_pending_ || !process_->HasConnection() || !view_ ||
580 !renderer_initialized_ || should_auto_resize_ || !delegate_) { 580 !renderer_initialized_ || should_auto_resize_ || !delegate_) {
581 return; 581 return;
582 } 582 }
583 583
584 gfx::Rect view_bounds = view_->GetViewBounds(); 584 gfx::Size new_size(view_->GetRequestedRendererSize());
585 gfx::Size new_size(view_bounds.size());
586 585
587 gfx::Size old_physical_backing_size = physical_backing_size_; 586 gfx::Size old_physical_backing_size = physical_backing_size_;
588 physical_backing_size_ = view_->GetPhysicalBackingSize(); 587 physical_backing_size_ = view_->GetPhysicalBackingSize();
589 bool was_fullscreen = is_fullscreen_; 588 bool was_fullscreen = is_fullscreen_;
590 is_fullscreen_ = IsFullscreen(); 589 is_fullscreen_ = IsFullscreen();
591 float old_overdraw_bottom_height = overdraw_bottom_height_; 590 float old_overdraw_bottom_height = overdraw_bottom_height_;
592 overdraw_bottom_height_ = view_->GetOverdrawBottomHeight(); 591 overdraw_bottom_height_ = view_->GetOverdrawBottomHeight();
593 gfx::Size old_visible_viewport_size = visible_viewport_size_; 592 gfx::Size old_visible_viewport_size = visible_viewport_size_;
594 visible_viewport_size_ = view_->GetVisibleViewportSize(); 593 visible_viewport_size_ = view_->GetVisibleViewportSize();
595 594
(...skipping 1724 matching lines...) Expand 10 before | Expand all | Expand 10 after
2320 } 2319 }
2321 } 2320 }
2322 2321
2323 SkBitmap::Config RenderWidgetHostImpl::PreferredReadbackFormat() { 2322 SkBitmap::Config RenderWidgetHostImpl::PreferredReadbackFormat() {
2324 if (view_) 2323 if (view_)
2325 return view_->PreferredReadbackFormat(); 2324 return view_->PreferredReadbackFormat();
2326 return SkBitmap::kARGB_8888_Config; 2325 return SkBitmap::kARGB_8888_Config;
2327 } 2326 }
2328 2327
2329 } // namespace content 2328 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/compositor/delegated_frame_host.cc ('k') | content/browser/renderer_host/render_widget_host_view_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698