| Index: content/common/gpu/gpu_command_buffer_stub.cc
|
| diff --git a/content/common/gpu/gpu_command_buffer_stub.cc b/content/common/gpu/gpu_command_buffer_stub.cc
|
| index 3a0d7994a3a78a8a9a40e7cd08c125f31dce8e89..717be8e23f85ce9a6e1670887ad848cfbba86adb 100644
|
| --- a/content/common/gpu/gpu_command_buffer_stub.cc
|
| +++ b/content/common/gpu/gpu_command_buffer_stub.cc
|
| @@ -158,7 +158,8 @@ bool GpuCommandBufferStub::OnMessageReceived(const IPC::Message& message) {
|
| if (decoder_.get() &&
|
| message.type() != GpuCommandBufferMsg_Echo::ID &&
|
| message.type() != GpuCommandBufferMsg_RetireSyncPoint::ID &&
|
| - message.type() != GpuCommandBufferMsg_WaitSyncPoint::ID) {
|
| + message.type() != GpuCommandBufferMsg_WaitSyncPoint::ID &&
|
| + message.type() != GpuCommandBufferMsg_SetLatencyInfo::ID) {
|
| if (!MakeCurrent())
|
| return false;
|
| }
|
| @@ -178,6 +179,7 @@ bool GpuCommandBufferStub::OnMessageReceived(const IPC::Message& message) {
|
| IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_GetStateFast,
|
| OnGetStateFast);
|
| IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_AsyncFlush, OnAsyncFlush);
|
| + IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_SetLatencyInfo, OnSetLatencyInfo);
|
| IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_Rescheduled, OnRescheduled);
|
| IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_RegisterTransferBuffer,
|
| OnRegisterTransferBuffer);
|
| @@ -524,6 +526,22 @@ void GpuCommandBufferStub::OnInitialize(
|
| }
|
| }
|
|
|
| +void GpuCommandBufferStub::OnSetLatencyInfo(
|
| + const cc::LatencyInfo& latency_info) {
|
| + if (!latency_info_callback_.is_null())
|
| + latency_info_callback_.Run(latency_info);
|
| +}
|
| +
|
| +void GpuCommandBufferStub::SetLatencyInfoCallback(
|
| + const LatencyInfoCallback& callback) {
|
| + latency_info_callback_ = callback;
|
| +}
|
| +
|
| +void GpuCommandBufferStub::SetLatencyInfo(
|
| + const cc::LatencyInfo& latency_info) {
|
| + Send(new GpuCommandBufferMsg_SetLatencyInfo(route_id_, latency_info));
|
| +}
|
| +
|
| void GpuCommandBufferStub::OnSetGetBuffer(int32 shm_id,
|
| IPC::Message* reply_message) {
|
| TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnSetGetBuffer");
|
|
|