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 492b23f91f7a97916e6462b2b27f57f4d4536ab2..7e9d69a0eb84fac17a501d8a7553b8b181c3da70 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" |
@@ -492,10 +493,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) { |