Index: content/browser/renderer_host/render_widget_host_view_android.h |
diff --git a/content/browser/renderer_host/render_widget_host_view_android.h b/content/browser/renderer_host/render_widget_host_view_android.h |
index d9b0d972488e6539931163feef20e45f3f82fc88..0c6eec1c9c5c0e8e3ec1f4a35a2ed22b7e9794c9 100644 |
--- a/content/browser/renderer_host/render_widget_host_view_android.h |
+++ b/content/browser/renderer_host/render_widget_host_view_android.h |
@@ -33,6 +33,7 @@ struct GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params; |
struct GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params; |
namespace cc { |
+class CopyOutputResult; |
class DelegatedRendererLayer; |
class Layer; |
class TextureLayer; |
@@ -232,6 +233,8 @@ class RenderWidgetHostViewAndroid |
void SynchronousFrameMetadata( |
const cc::CompositorFrameMetadata& frame_metadata); |
+ bool CanCopyToBitmap() const; |
+ |
private: |
void BuffersSwapped(const gpu::Mailbox& mailbox, |
uint32_t output_surface_id, |
@@ -256,6 +259,21 @@ class RenderWidgetHostViewAndroid |
void UpdateAnimationSize(const cc::CompositorFrameMetadata& frame_metadata); |
void ScheduleAnimationIfNecessary(); |
+ // Called after async thumbnailer task completes. Scales and crops the result |
+ // of the copy. |
+ static void CopyFromCompositingSurfaceHasResult( |
+ const gfx::Size& dst_size_in_pixel, |
+ const base::Callback<void(bool, const SkBitmap&)>& callback, |
+ scoped_ptr<cc::CopyOutputResult> result); |
+ static void PrepareTextureCopyOutputResult( |
+ const gfx::Size& dst_size_in_pixel, |
+ const base::Callback<void(bool, const SkBitmap&)>& callback, |
+ scoped_ptr<cc::CopyOutputResult> result); |
+ static void PrepareBitmapCopyOutputResult( |
+ const gfx::Size& dst_size_in_pixel, |
+ const base::Callback<void(bool, const SkBitmap&)>& callback, |
+ scoped_ptr<cc::CopyOutputResult> result); |
+ |
// The model object. |
RenderWidgetHostImpl* host_; |