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

Unified Diff: content/browser/renderer_host/render_widget_host_impl.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/browser/renderer_host/render_widget_host_impl.h
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
index 9485aa8828ef69db3d986761f7a237dbcc8dea42..a658d157c0b0be921d50f26bff4bcb25c2d9d531 100644
--- a/content/browser/renderer_host/render_widget_host_impl.h
+++ b/content/browser/renderer_host/render_widget_host_impl.h
@@ -10,6 +10,7 @@
#include <map>
#include <queue>
#include <string>
+#include <utility>
#include <vector>
#include "base/callback.h"
@@ -146,6 +147,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost,
virtual void AddKeyboardListener(KeyboardListener* listener) OVERRIDE;
virtual void RemoveKeyboardListener(KeyboardListener* listener) OVERRIDE;
virtual void GetWebScreenInfo(WebKit::WebScreenInfo* result) OVERRIDE;
+ virtual void GetSnapshotFromRenderer(
+ const gfx::Rect& src_subrect,
+ const base::Callback<void(bool, const SkBitmap&)>& callback) OVERRIDE;
// Notification that the screen info has changed.
void NotifyScreenInfoChanged();
@@ -602,6 +606,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost,
void OnWindowlessPluginDummyWindowDestroyed(
gfx::NativeViewId dummy_activation_window);
#endif
+ void OnSnapshot(bool success, const SkBitmap& bitmap);
// Called (either immediately or asynchronously) after we're done with our
// BackingStore and can send an ACK to the renderer so it can paint onto it
@@ -861,6 +866,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost,
std::list<HWND> dummy_windows_for_activation_;
#endif
+ // List of callbacks for pending snapshot requests to the renderer.
+ std::queue<base::Callback<void(bool, const SkBitmap&)> > pending_snapshots_;
+
DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl);
};

Powered by Google App Engine
This is Rietveld 408576698