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 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
716 const gfx::Rect& src_subrect, | 716 const gfx::Rect& src_subrect, |
717 const gfx::Size& accelerated_dst_size, | 717 const gfx::Size& accelerated_dst_size, |
718 const base::Callback<void(bool, const SkBitmap&)>& callback) { | 718 const base::Callback<void(bool, const SkBitmap&)>& callback) { |
719 if (view_ && is_accelerated_compositing_active_) { | 719 if (view_ && is_accelerated_compositing_active_) { |
720 TRACE_EVENT0("browser", | 720 TRACE_EVENT0("browser", |
721 "RenderWidgetHostImpl::CopyFromBackingStore::FromCompositingSurface"); | 721 "RenderWidgetHostImpl::CopyFromBackingStore::FromCompositingSurface"); |
722 gfx::Rect accelerated_copy_rect = src_subrect.IsEmpty() ? | 722 gfx::Rect accelerated_copy_rect = src_subrect.IsEmpty() ? |
723 gfx::Rect(view_->GetViewBounds().size()) : src_subrect; | 723 gfx::Rect(view_->GetViewBounds().size()) : src_subrect; |
724 view_->CopyFromCompositingSurface(accelerated_copy_rect, | 724 view_->CopyFromCompositingSurface(accelerated_copy_rect, |
725 accelerated_dst_size, | 725 accelerated_dst_size, |
726 callback, | 726 callback); |
727 false); | |
728 return; | 727 return; |
729 } | 728 } |
730 | 729 |
731 BackingStore* backing_store = GetBackingStore(false); | 730 BackingStore* backing_store = GetBackingStore(false); |
732 if (!backing_store) { | 731 if (!backing_store) { |
733 callback.Run(false, SkBitmap()); | 732 callback.Run(false, SkBitmap()); |
734 return; | 733 return; |
735 } | 734 } |
736 | 735 |
737 TRACE_EVENT0("browser", | 736 TRACE_EVENT0("browser", |
(...skipping 1769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2507 } | 2506 } |
2508 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(rwh); | 2507 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(rwh); |
2509 if (rwhi_set.insert(rwhi).second) | 2508 if (rwhi_set.insert(rwhi).second) |
2510 rwhi->FrameSwapped(latency_info[i]); | 2509 rwhi->FrameSwapped(latency_info[i]); |
2511 } | 2510 } |
2512 } | 2511 } |
2513 } | 2512 } |
2514 } | 2513 } |
2515 | 2514 |
2516 } // namespace content | 2515 } // namespace content |
OLD | NEW |