Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: content/common/gpu/gpu_command_buffer_stub.cc

Issue 568413002: Add VEA supported profiles to GPUInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/bind.h" 5 #include "base/bind.h"
6 #include "base/bind_helpers.h" 6 #include "base/bind_helpers.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/hash.h" 9 #include "base/hash.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_SetLatencyInfo, OnSetLatencyInfo); 255 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_SetLatencyInfo, OnSetLatencyInfo);
256 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_Rescheduled, OnRescheduled); 256 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_Rescheduled, OnRescheduled);
257 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_RegisterTransferBuffer, 257 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_RegisterTransferBuffer,
258 OnRegisterTransferBuffer); 258 OnRegisterTransferBuffer);
259 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_DestroyTransferBuffer, 259 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_DestroyTransferBuffer,
260 OnDestroyTransferBuffer); 260 OnDestroyTransferBuffer);
261 IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_CreateVideoDecoder, 261 IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_CreateVideoDecoder,
262 OnCreateVideoDecoder) 262 OnCreateVideoDecoder)
263 IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_CreateVideoEncoder, 263 IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_CreateVideoEncoder,
264 OnCreateVideoEncoder) 264 OnCreateVideoEncoder)
265 IPC_MESSAGE_HANDLER_DELAY_REPLY(
266 GpuCommandBufferMsg_VideoEncodeAcceleratorGetSupportedProfiles,
267 OnVideoEncodeAcceleratorGetSupportedProfiles)
265 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_SetSurfaceVisible, 268 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_SetSurfaceVisible,
266 OnSetSurfaceVisible) 269 OnSetSurfaceVisible)
267 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_RetireSyncPoint, 270 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_RetireSyncPoint,
268 OnRetireSyncPoint) 271 OnRetireSyncPoint)
269 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_SignalSyncPoint, 272 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_SignalSyncPoint,
270 OnSignalSyncPoint) 273 OnSignalSyncPoint)
271 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_SignalQuery, 274 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_SignalQuery,
272 OnSignalQuery) 275 OnSignalQuery)
273 IPC_MESSAGE_HANDLER( 276 IPC_MESSAGE_HANDLER(
274 GpuCommandBufferMsg_SetClientHasMemoryAllocationChangedCallback, 277 GpuCommandBufferMsg_SetClientHasMemoryAllocationChangedCallback,
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
847 new GpuVideoEncodeAccelerator(encoder_route_id, this); 850 new GpuVideoEncodeAccelerator(encoder_route_id, this);
848 encoder->Initialize(input_format, 851 encoder->Initialize(input_format,
849 input_visible_size, 852 input_visible_size,
850 output_profile, 853 output_profile,
851 initial_bitrate, 854 initial_bitrate,
852 reply_message); 855 reply_message);
853 // encoder is registered as a DestructionObserver of this stub and will 856 // encoder is registered as a DestructionObserver of this stub and will
854 // self-delete during destruction of this stub. 857 // self-delete during destruction of this stub.
855 } 858 }
856 859
860 void GpuCommandBufferStub::OnVideoEncodeAcceleratorGetSupportedProfiles(
861 IPC::Message* reply_message) {
862 std::vector<media::VideoEncodeAccelerator::SupportedProfile> profiles =
863 GpuVideoEncodeAccelerator::GetSupportedProfiles();
864 GpuCommandBufferMsg_VideoEncodeAcceleratorGetSupportedProfiles::
865 WriteReplyParams(reply_message, profiles);
866 Send(reply_message);
867 }
868
857 void GpuCommandBufferStub::OnSetSurfaceVisible(bool visible) { 869 void GpuCommandBufferStub::OnSetSurfaceVisible(bool visible) {
858 TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnSetSurfaceVisible"); 870 TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnSetSurfaceVisible");
859 if (memory_manager_client_state_) 871 if (memory_manager_client_state_)
860 memory_manager_client_state_->SetVisible(visible); 872 memory_manager_client_state_->SetVisible(visible);
861 } 873 }
862 874
863 void GpuCommandBufferStub::AddSyncPoint(uint32 sync_point) { 875 void GpuCommandBufferStub::AddSyncPoint(uint32 sync_point) {
864 sync_points_.push_back(sync_point); 876 sync_points_.push_back(sync_point);
865 } 877 }
866 878
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
1101 if (decoder_) 1113 if (decoder_)
1102 decoder_->LoseContext(GL_UNKNOWN_CONTEXT_RESET_ARB); 1114 decoder_->LoseContext(GL_UNKNOWN_CONTEXT_RESET_ARB);
1103 command_buffer_->SetParseError(gpu::error::kLostContext); 1115 command_buffer_->SetParseError(gpu::error::kLostContext);
1104 } 1116 }
1105 1117
1106 uint64 GpuCommandBufferStub::GetMemoryUsage() const { 1118 uint64 GpuCommandBufferStub::GetMemoryUsage() const {
1107 return GetMemoryManager()->GetClientMemoryUsage(this); 1119 return GetMemoryManager()->GetClientMemoryUsage(this);
1108 } 1120 }
1109 1121
1110 } // namespace content 1122 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698