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 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
502 gesture_event_filter_->FlingHasBeenHalted(); | 502 gesture_event_filter_->FlingHasBeenHalted(); |
503 if (!view_) | 503 if (!view_) |
504 return; | 504 return; |
505 view_->SetIsLoading(is_loading); | 505 view_->SetIsLoading(is_loading); |
506 } | 506 } |
507 | 507 |
508 void RenderWidgetHostImpl::CopyFromBackingStore( | 508 void RenderWidgetHostImpl::CopyFromBackingStore( |
509 const gfx::Rect& src_subrect, | 509 const gfx::Rect& src_subrect, |
510 const gfx::Size& accelerated_dst_size, | 510 const gfx::Size& accelerated_dst_size, |
511 const base::Callback<void(bool)>& callback, | 511 const base::Callback<void(bool)>& callback, |
512 skia::PlatformCanvas* output) { | 512 skia::PlatformBitmap* output) { |
513 if (view_ && is_accelerated_compositing_active_) { | 513 if (view_ && is_accelerated_compositing_active_) { |
514 TRACE_EVENT0("browser", | 514 TRACE_EVENT0("browser", |
515 "RenderWidgetHostImpl::CopyFromBackingStore::FromCompositingSurface"); | 515 "RenderWidgetHostImpl::CopyFromBackingStore::FromCompositingSurface"); |
516 gfx::Rect copy_rect = src_subrect.IsEmpty() ? | 516 gfx::Rect copy_rect = src_subrect.IsEmpty() ? |
517 gfx::Rect(view_->GetViewBounds().size()) : src_subrect; | 517 gfx::Rect(view_->GetViewBounds().size()) : src_subrect; |
518 view_->CopyFromCompositingSurface(copy_rect, | 518 view_->CopyFromCompositingSurface(copy_rect, |
519 accelerated_dst_size, | 519 accelerated_dst_size, |
520 callback, | 520 callback, |
521 output); | 521 output); |
522 return; | 522 return; |
(...skipping 1552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2075 return; | 2075 return; |
2076 | 2076 |
2077 OnRenderAutoResized(new_size); | 2077 OnRenderAutoResized(new_size); |
2078 } | 2078 } |
2079 | 2079 |
2080 void RenderWidgetHostImpl::DetachDelegate() { | 2080 void RenderWidgetHostImpl::DetachDelegate() { |
2081 delegate_ = NULL; | 2081 delegate_ = NULL; |
2082 } | 2082 } |
2083 | 2083 |
2084 } // namespace content | 2084 } // namespace content |
OLD | NEW |