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..de6dbb8612eb2864b74bc25fc4fc46d687a844c4 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,9 @@ 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 duplicate buffer handle " |
+ "for GPU process"; |
+ PostNotifyError(kPlatformFailureError); |
return; |
} |
params.buffer_offset = |
@@ -162,9 +159,9 @@ void GpuVideoEncodeAcceleratorHost::UseOutputBitstreamBuffer( |
base::SharedMemoryHandle handle = |
channel_->ShareToGpuProcess(buffer.handle()); |
if (!base::SharedMemory::IsHandleValid(handle)) { |
- NOTIFY_ERROR(kPlatformFailureError) |
- << "UseOutputBitstreamBuffer(): failed to duplicate buffer handle " |
- "for GPU process: buffer.id()=" << buffer.id(); |
+ DLOG(ERROR) << "UseOutputBitstreamBuffer(): failed to duplicate " |
+ "buffer handle for GPU process: buffer.id()=" << buffer.id(); |
+ PostNotifyError(kPlatformFailureError); |
return; |
} |
Send(new AcceleratedVideoEncoderMsg_UseOutputBitstreamBuffer( |
@@ -211,8 +208,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); |
mcasas
2015/09/30 15:32:07
It's unfortunate that PostNotifyError(bla) is also
msu.koo
2015/10/01 04:22:13
DLOG comes with line number and file name. If we c
mcasas
2015/10/05 16:18:48
Yeah leaving the DLOG(ERROR) sounds logical,
but
|
} |
} |