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

Unified Diff: content/public/gpu/gpu_video_decode_accelerator_factory.cc

Issue 1859403002: Avoid GpuPreferences exposed in content public gpu interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address jam's comments Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/public/gpu/gpu_video_decode_accelerator_factory.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/gpu/gpu_video_decode_accelerator_factory.cc
diff --git a/content/public/gpu/gpu_video_decode_accelerator_factory.cc b/content/public/gpu/gpu_video_decode_accelerator_factory.cc
index 57b46a86f10ae50e182fcc7dd1e7744deabe40dd..6d6e4c3497a0cb8414eb0402ff95b95492618151 100644
--- a/content/public/gpu/gpu_video_decode_accelerator_factory.cc
+++ b/content/public/gpu/gpu_video_decode_accelerator_factory.cc
@@ -2,9 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "content/common/gpu/media/gpu_video_decode_accelerator_factory_impl.h"
#include "content/public/gpu/gpu_video_decode_accelerator_factory.h"
+#include "content/common/gpu/media/gpu_video_decode_accelerator_factory_impl.h"
+#include "content/gpu/gpu_child_thread.h"
+
namespace content {
GpuVideoDecodeAcceleratorFactory::~GpuVideoDecodeAcceleratorFactory() {}
@@ -44,8 +46,9 @@ GpuVideoDecodeAcceleratorFactory::CreateWithGLES2Decoder(
// static
gpu::VideoDecodeAcceleratorCapabilities
-GpuVideoDecodeAcceleratorFactory::GetDecoderCapabilities(
- const gpu::GpuPreferences& gpu_preferences) {
+GpuVideoDecodeAcceleratorFactory::GetDecoderCapabilities() {
+ const gpu::GpuPreferences gpu_preferences =
+ GpuChildThread::current()->gpu_preferences();
return GpuVideoDecodeAcceleratorFactoryImpl::GetDecoderCapabilities(
gpu_preferences);
}
@@ -53,11 +56,12 @@ GpuVideoDecodeAcceleratorFactory::GetDecoderCapabilities(
scoped_ptr<media::VideoDecodeAccelerator>
GpuVideoDecodeAcceleratorFactory::CreateVDA(
media::VideoDecodeAccelerator::Client* client,
- const media::VideoDecodeAccelerator::Config& config,
- const gpu::GpuPreferences& gpu_preferences) {
+ const media::VideoDecodeAccelerator::Config& config) {
if (!gvdafactory_impl_)
return nullptr;
+ const gpu::GpuPreferences gpu_preferences =
+ GpuChildThread::current()->gpu_preferences();
return gvdafactory_impl_->CreateVDA(client, config, gpu_preferences);
}
« no previous file with comments | « content/public/gpu/gpu_video_decode_accelerator_factory.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698