| OLD | NEW |
| 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 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 584 resize_params->physical_backing_size = view_->GetPhysicalBackingSize(); | 584 resize_params->physical_backing_size = view_->GetPhysicalBackingSize(); |
| 585 resize_params->top_controls_height = view_->GetTopControlsHeight(); | 585 resize_params->top_controls_height = view_->GetTopControlsHeight(); |
| 586 resize_params->top_controls_shrink_blink_size = | 586 resize_params->top_controls_shrink_blink_size = |
| 587 view_->DoTopControlsShrinkBlinkSize(); | 587 view_->DoTopControlsShrinkBlinkSize(); |
| 588 resize_params->visible_viewport_size = view_->GetVisibleViewportSize(); | 588 resize_params->visible_viewport_size = view_->GetVisibleViewportSize(); |
| 589 resize_params->is_fullscreen = IsFullscreen(); | 589 resize_params->is_fullscreen = IsFullscreen(); |
| 590 } | 590 } |
| 591 | 591 |
| 592 const bool size_changed = | 592 const bool size_changed = |
| 593 !old_resize_params_ || | 593 !old_resize_params_ || |
| 594 old_resize_params_->new_size != resize_params->new_size; | 594 old_resize_params_->new_size != resize_params->new_size || |
| 595 (old_resize_params_->physical_backing_size.IsEmpty() && |
| 596 !resize_params->physical_backing_size.IsEmpty()); |
| 595 bool dirty = | 597 bool dirty = |
| 596 size_changed || screen_info_out_of_date_ || | 598 size_changed || screen_info_out_of_date_ || |
| 597 old_resize_params_->physical_backing_size != | 599 old_resize_params_->physical_backing_size != |
| 598 resize_params->physical_backing_size || | 600 resize_params->physical_backing_size || |
| 599 old_resize_params_->is_fullscreen != resize_params->is_fullscreen || | 601 old_resize_params_->is_fullscreen != resize_params->is_fullscreen || |
| 600 old_resize_params_->top_controls_height != | 602 old_resize_params_->top_controls_height != |
| 601 resize_params->top_controls_height || | 603 resize_params->top_controls_height || |
| 602 old_resize_params_->top_controls_shrink_blink_size != | 604 old_resize_params_->top_controls_shrink_blink_size != |
| 603 resize_params->top_controls_shrink_blink_size || | 605 resize_params->top_controls_shrink_blink_size || |
| 604 old_resize_params_->visible_viewport_size != | 606 old_resize_params_->visible_viewport_size != |
| (...skipping 1586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2191 } | 2193 } |
| 2192 #endif | 2194 #endif |
| 2193 | 2195 |
| 2194 SkColorType RenderWidgetHostImpl::PreferredReadbackFormat() { | 2196 SkColorType RenderWidgetHostImpl::PreferredReadbackFormat() { |
| 2195 if (view_) | 2197 if (view_) |
| 2196 return view_->PreferredReadbackFormat(); | 2198 return view_->PreferredReadbackFormat(); |
| 2197 return kN32_SkColorType; | 2199 return kN32_SkColorType; |
| 2198 } | 2200 } |
| 2199 | 2201 |
| 2200 } // namespace content | 2202 } // namespace content |
| OLD | NEW |