Chromium Code Reviews| Index: content/common/gpu/client/gpu_video_encode_accelerator_host.cc |
| diff --git a/content/common/gpu/client/gpu_video_encode_accelerator_host.cc b/content/common/gpu/client/gpu_video_encode_accelerator_host.cc |
| index f61e390fcae7870f5ccfd0b44cddd606bd18ddcc..d9711685c1541fc87b29e72a5c3bea704454b911 100644 |
| --- a/content/common/gpu/client/gpu_video_encode_accelerator_host.cc |
| +++ b/content/common/gpu/client/gpu_video_encode_accelerator_host.cc |
| @@ -12,10 +12,6 @@ |
| namespace content { |
| -#define NOTIFY_ERROR(error) \ |
| - PostNotifyError(error); \ |
| - DLOG(ERROR) |
| - |
| GpuVideoEncodeAcceleratorHost::GpuVideoEncodeAcceleratorHost( |
| GpuChannelHost* channel, |
| CommandBufferProxyImpl* impl) |
| @@ -65,7 +61,8 @@ void GpuVideoEncodeAcceleratorHost::OnChannelError() { |
| channel_->RemoveRoute(encoder_route_id_); |
| channel_ = NULL; |
| } |
| - NOTIFY_ERROR(kPlatformFailureError) << "OnChannelError()"; |
| + DLOG(ERROR) << "OnChannelError()"; |
| + PostNotifyError(kPlatformFailureError); |
| } |
| media::VideoEncodeAccelerator::SupportedProfiles |
| @@ -114,9 +111,9 @@ void GpuVideoEncodeAcceleratorHost::Encode( |
| return; |
| if (!base::SharedMemory::IsHandleValid(frame->shared_memory_handle())) { |
| - NOTIFY_ERROR(kPlatformFailureError) << "EncodeSharedMemory(): cannot " |
| - "encode frame with invalid shared " |
| - "memory handle"; |
| + DLOG(ERROR) << "EncodeSharedMemory(): cannot encode frame with " |
| + "invalid shared memory handle"; |
| + PostNotifyError(kPlatformFailureError); |
| return; |
| } |
| @@ -125,9 +122,10 @@ void GpuVideoEncodeAcceleratorHost::Encode( |
| params.buffer_handle = |
| channel_->ShareToGpuProcess(frame->shared_memory_handle()); |
| if (!base::SharedMemory::IsHandleValid(params.buffer_handle)) { |
| - NOTIFY_ERROR(kPlatformFailureError) << "EncodeSharedMemory(): failed to " |
| - "duplicate buffer handle for GPU " |
| - "process"; |
| + DLOG(ERROR) << "EncodeSharedMemory(): failed to " |
|
Pawel Osciak
2015/09/30 08:22:20
Sorry, but this could also fit in 2 lines.
msu.koo
2015/09/30 08:28:48
Done.
|
| + "duplicate buffer handle for GPU " |
| + "process"; |
| + PostNotifyError(kPlatformFailureError); |
| return; |
| } |
| params.buffer_offset = |
| @@ -162,9 +160,10 @@ void GpuVideoEncodeAcceleratorHost::UseOutputBitstreamBuffer( |
| base::SharedMemoryHandle handle = |
| channel_->ShareToGpuProcess(buffer.handle()); |
| if (!base::SharedMemory::IsHandleValid(handle)) { |
| - NOTIFY_ERROR(kPlatformFailureError) |
| + DLOG(ERROR) |
| << "UseOutputBitstreamBuffer(): failed to duplicate buffer handle " |
|
Pawel Osciak
2015/09/30 08:22:20
And this as well.
msu.koo
2015/09/30 08:28:48
Done.
|
| "for GPU process: buffer.id()=" << buffer.id(); |
| + PostNotifyError(kPlatformFailureError); |
| return; |
| } |
| Send(new AcceleratedVideoEncoderMsg_UseOutputBitstreamBuffer( |
| @@ -211,8 +210,8 @@ void GpuVideoEncodeAcceleratorHost::Send(IPC::Message* message) { |
| DCHECK(CalledOnValidThread()); |
| uint32 message_type = message->type(); |
| if (!channel_->Send(message)) { |
| - NOTIFY_ERROR(kPlatformFailureError) << "Send(" << message_type |
| - << ") failed"; |
| + DLOG(ERROR) << "Send(" << message_type << ") failed"; |
| + PostNotifyError(kPlatformFailureError); |
| } |
| } |