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

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 owen'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..d4f3bf8d991679e3a107ffba69c11d856418f84f 100644
--- a/content/public/gpu/gpu_video_decode_accelerator_factory.cc
+++ b/content/public/gpu/gpu_video_decode_accelerator_factory.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "content/common/gpu/media/gpu_video_decode_accelerator_factory_impl.h"
+#include "content/gpu/gpu_child_thread.h"
jam 2016/04/08 16:16:25 nit: add blank line before
kcwu 2016/04/08 16:39:44 Done. Move the corresponding header of this file t
#include "content/public/gpu/gpu_video_decode_accelerator_factory.h"
namespace content {
@@ -44,8 +45,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 +55,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