Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / content / common / gpu / client / gpu_video_encode_accelerator_host.cc
index fafa7eb..c33e270 100644 (file)
@@ -39,12 +39,6 @@ GpuVideoEncodeAcceleratorHost::~GpuVideoEncodeAcceleratorHost() {
     impl_->RemoveDeletionObserver(this);
 }
 
-// static
-std::vector<media::VideoEncodeAccelerator::SupportedProfile>
-GpuVideoEncodeAcceleratorHost::GetSupportedProfiles() {
-  return GpuVideoEncodeAccelerator::GetSupportedProfiles();
-}
-
 bool GpuVideoEncodeAcceleratorHost::OnMessageReceived(
     const IPC::Message& message) {
   bool handled = true;
@@ -75,6 +69,14 @@ void GpuVideoEncodeAcceleratorHost::OnChannelError() {
   NOTIFY_ERROR(kPlatformFailureError) << "OnChannelError()";
 }
 
+std::vector<media::VideoEncodeAccelerator::SupportedProfile>
+GpuVideoEncodeAcceleratorHost::GetSupportedProfiles() {
+  DCHECK(CalledOnValidThread());
+  if (!channel_)
+    return std::vector<media::VideoEncodeAccelerator::SupportedProfile>();
+  return channel_->gpu_info().video_encode_accelerator_supported_profiles;
+}
+
 bool GpuVideoEncodeAcceleratorHost::Initialize(
     media::VideoFrame::Format input_format,
     const gfx::Size& input_visible_size,