| Index: content/renderer/media/android/stream_texture_factory.cc
|
| diff --git a/content/renderer/media/android/stream_texture_factory.cc b/content/renderer/media/android/stream_texture_factory.cc
|
| index dc785addf5e33f7bdb79fbeec0806c4c946e4b9b..8064b99a6c72209d582acc68445eaeaf27f6e2a8 100644
|
| --- a/content/renderer/media/android/stream_texture_factory.cc
|
| +++ b/content/renderer/media/android/stream_texture_factory.cc
|
| @@ -5,6 +5,7 @@
|
| #include "content/renderer/media/android/stream_texture_factory.h"
|
|
|
| #include "base/macros.h"
|
| +#include "base/memory/ptr_util.h"
|
| #include "cc/output/context_provider.h"
|
| #include "content/common/gpu/client/context_provider_command_buffer.h"
|
| #include "gpu/command_buffer/client/gles2_interface.h"
|
| @@ -15,7 +16,8 @@
|
|
|
| namespace content {
|
|
|
| -StreamTextureProxy::StreamTextureProxy(StreamTextureHost* host) : host_(host) {}
|
| +StreamTextureProxy::StreamTextureProxy(std::unique_ptr<StreamTextureHost> host)
|
| + : host_(std::move(host)) {}
|
|
|
| StreamTextureProxy::~StreamTextureProxy() {}
|
|
|
| @@ -94,16 +96,16 @@ StreamTextureFactory::StreamTextureFactory(
|
|
|
| StreamTextureFactory::~StreamTextureFactory() {}
|
|
|
| -StreamTextureProxy* StreamTextureFactory::CreateProxy(
|
| +ScopedStreamTextureProxy StreamTextureFactory::CreateProxy(
|
| unsigned texture_target,
|
| unsigned* texture_id,
|
| gpu::Mailbox* texture_mailbox) {
|
| int32_t route_id =
|
| CreateStreamTexture(texture_target, texture_id, texture_mailbox);
|
| if (!route_id)
|
| - return nullptr;
|
| - StreamTextureHost* host = new StreamTextureHost(channel_, route_id);
|
| - return new StreamTextureProxy(host);
|
| + return ScopedStreamTextureProxy();
|
| + return ScopedStreamTextureProxy(new StreamTextureProxy(
|
| + base::MakeUnique<StreamTextureHost>(channel_, route_id)));
|
| }
|
|
|
| unsigned StreamTextureFactory::CreateStreamTexture(
|
|
|