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 <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
504 gesture_event_filter_->FlingHasBeenHalted(); | 504 gesture_event_filter_->FlingHasBeenHalted(); |
505 if (!view_) | 505 if (!view_) |
506 return; | 506 return; |
507 view_->SetIsLoading(is_loading); | 507 view_->SetIsLoading(is_loading); |
508 } | 508 } |
509 | 509 |
510 void RenderWidgetHostImpl::CopyFromBackingStore( | 510 void RenderWidgetHostImpl::CopyFromBackingStore( |
511 const gfx::Rect& src_subrect, | 511 const gfx::Rect& src_subrect, |
512 const gfx::Size& accelerated_dst_size, | 512 const gfx::Size& accelerated_dst_size, |
513 const base::Callback<void(bool)>& callback, | 513 const base::Callback<void(bool)>& callback, |
514 skia::PlatformCanvas* output) { | 514 skia::PlatformBitmap* output) { |
515 if (view_ && is_accelerated_compositing_active_) { | 515 if (view_ && is_accelerated_compositing_active_) { |
516 TRACE_EVENT0("browser", | 516 TRACE_EVENT0("browser", |
517 "RenderWidgetHostImpl::CopyFromBackingStore::FromCompositingSurface"); | 517 "RenderWidgetHostImpl::CopyFromBackingStore::FromCompositingSurface"); |
518 gfx::Rect copy_rect = src_subrect.IsEmpty() ? | 518 gfx::Rect copy_rect = src_subrect.IsEmpty() ? |
519 gfx::Rect(view_->GetViewBounds().size()) : src_subrect; | 519 gfx::Rect(view_->GetViewBounds().size()) : src_subrect; |
520 view_->CopyFromCompositingSurface(copy_rect, | 520 view_->CopyFromCompositingSurface(copy_rect, |
521 accelerated_dst_size, | 521 accelerated_dst_size, |
522 callback, | 522 callback, |
523 output); | 523 output); |
524 return; | 524 return; |
(...skipping 1596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2121 return; | 2121 return; |
2122 | 2122 |
2123 OnRenderAutoResized(new_size); | 2123 OnRenderAutoResized(new_size); |
2124 } | 2124 } |
2125 | 2125 |
2126 void RenderWidgetHostImpl::DetachDelegate() { | 2126 void RenderWidgetHostImpl::DetachDelegate() { |
2127 delegate_ = NULL; | 2127 delegate_ = NULL; |
2128 } | 2128 } |
2129 | 2129 |
2130 } // namespace content | 2130 } // namespace content |
OLD | NEW |