| Index: content/renderer/pepper/pepper_video_encoder_host.h
|
| diff --git a/content/renderer/pepper/pepper_video_encoder_host.h b/content/renderer/pepper/pepper_video_encoder_host.h
|
| index d6a47d8f34c1666f69d87157b851e892a6fa02a8..9e89f94ee09342f8cf6f19dfe2a33780fe263efc 100644
|
| --- a/content/renderer/pepper/pepper_video_encoder_host.h
|
| +++ b/content/renderer/pepper/pepper_video_encoder_host.h
|
| @@ -13,6 +13,7 @@
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/memory/scoped_vector.h"
|
| #include "content/common/content_export.h"
|
| +#include "gpu/command_buffer/client/gpu_control_client.h"
|
| #include "media/video/video_encode_accelerator.h"
|
| #include "ppapi/c/pp_codecs.h"
|
| #include "ppapi/c/ppb_video_frame.h"
|
| @@ -38,7 +39,8 @@ class VideoEncoderShim;
|
| class CONTENT_EXPORT PepperVideoEncoderHost
|
| : public ppapi::host::ResourceHost,
|
| public media::VideoEncodeAccelerator::Client,
|
| - public ppapi::MediaStreamBufferManager::Delegate {
|
| + public ppapi::MediaStreamBufferManager::Delegate,
|
| + public gpu::GpuControlClient {
|
| public:
|
| PepperVideoEncoderHost(RendererPpapiHost* host,
|
| PP_Instance instance,
|
| @@ -76,6 +78,10 @@ class CONTENT_EXPORT PepperVideoEncoderHost
|
| const IPC::Message& msg,
|
| ppapi::host::HostMessageContext* context) override;
|
|
|
| + // GpuControlClient implementation.
|
| + void OnGpuControlLostContext() final;
|
| + void OnGpuControlErrorMessage(const char* msg, int id) final {}
|
| +
|
| int32_t OnHostMsgGetSupportedProfiles(
|
| ppapi::host::HostMessageContext* context);
|
| int32_t OnHostMsgInitialize(ppapi::host::HostMessageContext* context,
|
| @@ -161,6 +167,10 @@ class CONTENT_EXPORT PepperVideoEncoderHost
|
| // Format of the frames to give to the encoder.
|
| media::VideoPixelFormat media_input_format_;
|
|
|
| +#if DCHECK_IS_ON()
|
| + bool lost_context_ = false;
|
| +#endif
|
| +
|
| base::WeakPtrFactory<PepperVideoEncoderHost> weak_ptr_factory_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(PepperVideoEncoderHost);
|
|
|