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

Unified Diff: content/browser/renderer_host/render_widget_host_impl.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: Address comments 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_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 9136aebafcd00d4b228b8545425c43ffc6055f76..892702eefecc37edbea949e51688c845c3f689b7 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -32,6 +32,7 @@
#include "content/public/browser/user_metrics.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/result_codes.h"
+#include "skia/ext/platform_canvas.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderline.h"
#include "ui/base/keycodes/keyboard_codes.h"
#include "webkit/glue/webcursor.h"
@@ -498,10 +499,24 @@ bool RenderWidgetHostImpl::CopyFromBackingStore(skia::PlatformCanvas* output) {
if (!backing_store)
return false;
+ TRACE_EVENT0("browser", "RenderWidgetHostImpl::CopyFromBackingStore");
return backing_store->CopyFromBackingStore(
gfx::Rect(backing_store->size()), output);
}
+bool RenderWidgetHostImpl::CopyFromCompositingSurface(
+ const gfx::Size& size,
+ skia::PlatformCanvas* output) {
+ if (!is_accelerated_compositing_active_)
+ return false;
+
+ if (!view_)
+ return false;
+
+ TRACE_EVENT0("browser", "RenderWidgetHostImpl::CopyFromCompositingSurface");
+ return view_->CopyFromCompositingSurface(size, output);
+}
+
#if defined(TOOLKIT_GTK)
bool RenderWidgetHostImpl::CopyFromBackingStoreToGtkWindow(
const gfx::Rect& dest_rect, GdkWindow* target) {

Powered by Google App Engine
This is Rietveld 408576698