| Index: content/browser/renderer_host/render_widget_host_view_mac.mm
|
| diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
| index 83f76a8ac4fa5dd6cc19115037892f0e686d24de..6800dd46619e589930f429ccd383080ace96c71e 100644
|
| --- a/content/browser/renderer_host/render_widget_host_view_mac.mm
|
| +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
| @@ -7,6 +7,7 @@
|
| #include <QuartzCore/QuartzCore.h>
|
|
|
| #include "base/bind.h"
|
| +#include "base/bind_helpers.h"
|
| #include "base/debug/trace_event.h"
|
| #include "base/logging.h"
|
| #include "base/mac/closure_blocks_leopard_compat.h"
|
| @@ -789,27 +790,22 @@ BackingStore* RenderWidgetHostViewMac::AllocBackingStore(
|
| return new BackingStoreMac(render_widget_host_, size);
|
| }
|
|
|
| -bool RenderWidgetHostViewMac::CopyFromCompositingSurface(
|
| - const gfx::Size& size,
|
| - skia::PlatformCanvas* output) {
|
| +void RenderWidgetHostViewMac::CopyFromCompositingSurface(
|
| + const gfx::Size& size,
|
| + skia::PlatformCanvas* output,
|
| + base::Callback<void(bool)> callback) {
|
| + base::ScopedClosureRunner scoped_callback_runner(base::Bind(callback, false));
|
| if (!compositing_iosurface_.get() ||
|
| !compositing_iosurface_->HasIOSurface())
|
| - return false;
|
| + return;
|
|
|
| if (!output->initialize(size.width(), size.height(), true))
|
| - return false;
|
| + return;
|
|
|
| - return compositing_iosurface_->CopyTo(
|
| + const bool result = compositing_iosurface_->CopyTo(
|
| size, output->getTopDevice()->accessBitmap(true).getPixels());
|
| -}
|
| -
|
| -void RenderWidgetHostViewMac::AsyncCopyFromCompositingSurface(
|
| - const gfx::Size& size,
|
| - skia::PlatformCanvas* output,
|
| - base::Callback<void(bool)> callback) {
|
| - // TODO(mazda): Implement this.
|
| - NOTIMPLEMENTED();
|
| - callback.Run(false);
|
| + scoped_callback_runner.Release();
|
| + callback.Run(result);
|
| }
|
|
|
| // Sets whether or not to accept first responder status.
|
|
|