Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(903)

Unified Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 10352016: Consolidate RenderWidgetHost::CopyFromBackingStore and RenderWidgetHost::AsyncCopyFromBackingStore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_widget_host_impl.cc
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 781eccbdb97758f02200565e5304122c63d33843..03be3556d2d43d03df332d8b9e0e2e7f18d01bdd 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -482,34 +482,7 @@ void RenderWidgetHostImpl::SetIsLoading(bool is_loading) {
view_->SetIsLoading(is_loading);
}
-bool RenderWidgetHostImpl::CopyFromBackingStore(
- const gfx::Rect& src_rect,
- const gfx::Size& accelerated_dest_size,
- skia::PlatformCanvas* output) {
- if (view_ && is_accelerated_compositing_active_) {
- TRACE_EVENT0("browser",
- "RenderWidgetHostImpl::CopyFromBackingStore::FromCompositingSurface");
- // TODO(mazda): Support partial copy with |src_rect|
- // (http://crbug.com/118571).
- return view_->CopyFromCompositingSurface(accelerated_dest_size, output);
- }
-
- BackingStore* backing_store = GetBackingStore(false);
- if (!backing_store)
- return false;
-
- TRACE_EVENT0("browser",
- "RenderWidgetHostImpl::CopyFromBackingStore::FromBackingStore");
- const gfx::Size backing_store_size = backing_store->size();
- gfx::Rect copy_rect = src_rect.IsEmpty() ?
- gfx::Rect(0, 0, backing_store_size.width(), backing_store_size.height()) :
- src_rect;
- // When the result size is equal to the backing store size, copy from the
- // backing store directly to the output canvas.
- return backing_store->CopyFromBackingStore(copy_rect, output);
-}
-
-void RenderWidgetHostImpl::AsyncCopyFromBackingStore(
+void RenderWidgetHostImpl::CopyFromBackingStore(
const gfx::Rect& src_rect,
const gfx::Size& accelerated_dest_size,
skia::PlatformCanvas* output,
@@ -519,9 +492,9 @@ void RenderWidgetHostImpl::AsyncCopyFromBackingStore(
"RenderWidgetHostImpl::CopyFromBackingStore::FromCompositingSurface");
// TODO(mazda): Support partial copy with |src_rect|
// (http://crbug.com/118571).
- view_->AsyncCopyFromCompositingSurface(accelerated_dest_size,
- output,
- callback);
+ view_->CopyFromCompositingSurface(accelerated_dest_size,
+ output,
+ callback);
return;
}
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.h ('k') | content/browser/renderer_host/render_widget_host_view_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698