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

Unified Diff: content/public/browser/render_widget_host.h

Issue 12881005: Allow CopyFromBackingStore to fallback to copying from the renderer side if the accelerated surface… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: unused include Created 7 years, 9 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/public/browser/render_widget_host.h
diff --git a/content/public/browser/render_widget_host.h b/content/public/browser/render_widget_host.h
index 113477a4a2cf000f57e63292b1ccac7c476dea85..2340d7c0be915c7c0db6fea787c5bc247a6bd9c6 100644
--- a/content/public/browser/render_widget_host.h
+++ b/content/public/browser/render_widget_host.h
@@ -284,6 +284,16 @@ class CONTENT_EXPORT RenderWidgetHost : public IPC::Sender {
// Get the screen info corresponding to this render widget.
virtual void GetWebScreenInfo(WebKit::WebScreenInfo* result) = 0;
+ // Grabs snapshot from renderer side and returns the bitmap to a callback.
+ // If |src_rect| is empty, the whole contents is copied. This is an expensive
+ // operation due to the IPC, but it can be used as a fallback method when
+ // CopyFromBackingStore fails due to the backing store not being available or,
+ // in composited mode, when the accelerated surface is not available to the
+ // browser side.
+ virtual void GetSnapshotFromRenderer(
+ const gfx::Rect& src_subrect,
+ const base::Callback<void(bool, const SkBitmap&)>& callback) = 0;
+
protected:
friend class RenderWidgetHostImpl;

Powered by Google App Engine
This is Rietveld 408576698