| 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 780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 791 *backing_store = NULL; | 791 *backing_store = NULL; |
| 792 return true; | 792 return true; |
| 793 } | 793 } |
| 794 | 794 |
| 795 // Check for a software backing store of the desired size. | 795 // Check for a software backing store of the desired size. |
| 796 *backing_store = BackingStoreManager::GetBackingStore(this, desired_size); | 796 *backing_store = BackingStoreManager::GetBackingStore(this, desired_size); |
| 797 return !!*backing_store; | 797 return !!*backing_store; |
| 798 } | 798 } |
| 799 | 799 |
| 800 BackingStore* RenderWidgetHostImpl::GetBackingStore(bool force_create) { | 800 BackingStore* RenderWidgetHostImpl::GetBackingStore(bool force_create) { |
| 801 TRACE_EVENT1("browser", "RenderWidgetHostImpl::GetBackingStore", |
| 802 "force_create", force_create); |
| 803 |
| 801 if (!view_) | 804 if (!view_) |
| 802 return NULL; | 805 return NULL; |
| 803 | 806 |
| 804 // The view_size will be current_size_ for auto-sized views and otherwise the | 807 // The view_size will be current_size_ for auto-sized views and otherwise the |
| 805 // size of the view_. (For auto-sized views, current_size_ is updated during | 808 // size of the view_. (For auto-sized views, current_size_ is updated during |
| 806 // UpdateRect messages.) | 809 // UpdateRect messages.) |
| 807 gfx::Size view_size = current_size_; | 810 gfx::Size view_size = current_size_; |
| 808 if (!should_auto_resize_) { | 811 if (!should_auto_resize_) { |
| 809 // Get the desired size from the current view bounds. | 812 // Get the desired size from the current view bounds. |
| 810 gfx::Rect view_rect = view_->GetViewBounds(); | 813 gfx::Rect view_rect = view_->GetViewBounds(); |
| (...skipping 1755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2566 } | 2569 } |
| 2567 } | 2570 } |
| 2568 | 2571 |
| 2569 // Add newly generated components into the latency info | 2572 // Add newly generated components into the latency info |
| 2570 for (lc = new_components.begin(); lc != new_components.end(); ++lc) { | 2573 for (lc = new_components.begin(); lc != new_components.end(); ++lc) { |
| 2571 latency_info->latency_components[lc->first] = lc->second; | 2574 latency_info->latency_components[lc->first] = lc->second; |
| 2572 } | 2575 } |
| 2573 } | 2576 } |
| 2574 | 2577 |
| 2575 } // namespace content | 2578 } // namespace content |
| OLD | NEW |