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

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

Issue 9582003: Support browser side thumbnailing for GPU composited pages on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix try bot errors Created 8 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_view_win.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_win.cc b/content/browser/renderer_host/render_widget_host_view_win.cc
index 9f598b713d8a7d0f67a5ca4ff62b0467a244a20a..7346c78e3609e584109ae33cf2dccd4e87466b8f 100644
--- a/content/browser/renderer_host/render_widget_host_view_win.cc
+++ b/content/browser/renderer_host/render_widget_host_view_win.cc
@@ -908,6 +908,22 @@ void RenderWidgetHostViewWin::SetBackground(const SkBitmap& background) {
render_widget_host_->SetBackground(background);
}
+bool RenderWidgetHostViewWin::CopyFromCompositingSurface(
+ const gfx::Size& size,
+ skia::PlatformCanvas* output) {
+ if (!accelerated_surface_.get())
+ return false;
+
+ if (size.IsEmpty())
+ return false;
+
+ if (!output->initialize(size.width(), size.height(), true))
+ return false;
+
+ return accelerated_surface_->CopyTo(
+ size, output->getTopDevice()->accessBitmap(true).getPixels());
+}
+
void RenderWidgetHostViewWin::UnhandledWheelEvent(
const WebKit::WebMouseWheelEvent& event) {
}

Powered by Google App Engine
This is Rietveld 408576698