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

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

Issue 2702093002: Consistent CopyFromSurface() API, consolidated to RWHV (Closed)
Patch Set: REBASE Created 3 years, 10 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 0f488d8d88c866c07413ade08acdc0fc1ff70551..15b899540dc237e86f109eb9d4e65a42d230ea75 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -831,31 +831,6 @@ void RenderWidgetHostImpl::ViewDestroyed() {
SetView(NULL);
}
-void RenderWidgetHostImpl::CopyFromBackingStore(
- const gfx::Rect& src_subrect,
- const gfx::Size& accelerated_dst_size,
- const ReadbackRequestCallback& callback,
- const SkColorType preferred_color_type) {
- if (view_) {
- TRACE_EVENT0("browser",
- "RenderWidgetHostImpl::CopyFromBackingStore::FromCompositingSurface");
- gfx::Rect accelerated_copy_rect = src_subrect.IsEmpty() ?
- gfx::Rect(view_->GetViewBounds().size()) : src_subrect;
- view_->CopyFromCompositingSurface(accelerated_copy_rect,
- accelerated_dst_size, callback,
- preferred_color_type);
- return;
- }
-
- callback.Run(SkBitmap(), content::READBACK_FAILED);
-}
-
-bool RenderWidgetHostImpl::CanCopyFromBackingStore() {
- if (view_)
- return view_->IsSurfaceAvailableForCopy();
- return false;
-}
-
#if defined(OS_MACOSX)
void RenderWidgetHostImpl::PauseForPendingResizeOrRepaints() {
TRACE_EVENT0("browser",

Powered by Google App Engine
This is Rietveld 408576698