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

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: Rebase 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 5be7dfa25da58ea2812e982da52e3c49c72795a7..33539a179b74a485eed1af2ad8c6f97738d8f0f1 100644
--- a/content/browser/renderer_host/render_widget_host_view_win.cc
+++ b/content/browser/renderer_host/render_widget_host_view_win.cc
@@ -907,6 +907,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) {
}
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_win.h ('k') | content/browser/renderer_host/test_render_view_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698