| Index: content/browser/renderer_host/render_widget_host_view_android.cc
|
| diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc
|
| index 42e18691d18a1f02194a705d0ba4c9858007c803..ae2806e715333df1cd7df7ec65186a8de7357c39 100644
|
| --- a/content/browser/renderer_host/render_widget_host_view_android.cc
|
| +++ b/content/browser/renderer_host/render_widget_host_view_android.cc
|
| @@ -21,6 +21,7 @@
|
| #include "cc/output/compositor_frame_ack.h"
|
| #include "cc/output/copy_output_request.h"
|
| #include "cc/output/copy_output_result.h"
|
| +#include "cc/resources/single_release_callback.h"
|
| #include "cc/trees/layer_tree_host.h"
|
| #include "content/browser/accessibility/browser_accessibility_manager_android.h"
|
| #include "content/browser/android/content_view_core_impl.h"
|
| @@ -90,12 +91,12 @@ void SendImeEventAck(RenderWidgetHostImpl* host) {
|
|
|
| void CopyFromCompositingSurfaceFinished(
|
| const base::Callback<void(bool, const SkBitmap&)>& callback,
|
| - const cc::TextureMailbox::ReleaseCallback& release_callback,
|
| + scoped_ptr<cc::SingleReleaseCallback> release_callback,
|
| scoped_ptr<SkBitmap> bitmap,
|
| scoped_ptr<SkAutoLockPixels> bitmap_pixels_lock,
|
| bool result) {
|
| bitmap_pixels_lock.reset();
|
| - release_callback.Run(0, false);
|
| + release_callback->Run(0, false);
|
| callback.Run(result, *bitmap);
|
| }
|
|
|
| @@ -1199,6 +1200,7 @@ WebKit::WebGraphicsContext3D* RenderWidgetHostViewAndroid::Context3d() {
|
|
|
| bool RenderWidgetHostViewAndroid::PrepareTextureMailbox(
|
| cc::TextureMailbox* mailbox,
|
| + scoped_ptr<cc::SingleReleaseCallback>* release_callback,
|
| bool use_shared_memory) {
|
| return false;
|
| }
|
| @@ -1239,23 +1241,25 @@ void RenderWidgetHostViewAndroid::PrepareTextureCopyOutputResult(
|
| new SkAutoLockPixels(*bitmap));
|
| uint8* pixels = static_cast<uint8*>(bitmap->getPixels());
|
|
|
| - scoped_ptr<cc::TextureMailbox> texture_mailbox = result->TakeTexture();
|
| - DCHECK(texture_mailbox->IsTexture());
|
| - if (!texture_mailbox->IsTexture())
|
| + cc::TextureMailbox texture_mailbox;
|
| + scoped_ptr<cc::SingleReleaseCallback> release_callback;
|
| + result->TakeTexture(&texture_mailbox, &release_callback);
|
| + DCHECK(texture_mailbox.IsTexture());
|
| + if (!texture_mailbox.IsTexture())
|
| return;
|
|
|
| ignore_result(scoped_callback_runner.Release());
|
|
|
| gl_helper->CropScaleReadbackAndCleanMailbox(
|
| - texture_mailbox->name(),
|
| - texture_mailbox->sync_point(),
|
| + texture_mailbox.name(),
|
| + texture_mailbox.sync_point(),
|
| result->size(),
|
| gfx::Rect(result->size()),
|
| dst_size_in_pixel,
|
| pixels,
|
| base::Bind(&CopyFromCompositingSurfaceFinished,
|
| callback,
|
| - texture_mailbox->callback(),
|
| + base::Passed(&release_callback),
|
| base::Passed(&bitmap),
|
| base::Passed(&bitmap_pixels_lock)));
|
| }
|
|
|