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

Side by Side Diff: content/public/gpu/gpu_video_decode_accelerator_factory.h

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 unified diff | Download patch
« no previous file with comments | « content/public/gpu/DEPS ('k') | content/public/gpu/gpu_video_decode_accelerator_factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #ifndef CONTENT_PUBLIC_GPU_GPU_VIDEO_DECODE_ACCELERATOR_FACTORY_H_ 5 #ifndef CONTENT_PUBLIC_GPU_GPU_VIDEO_DECODE_ACCELERATOR_FACTORY_H_
6 #define CONTENT_PUBLIC_GPU_GPU_VIDEO_DECODE_ACCELERATOR_FACTORY_H_ 6 #define CONTENT_PUBLIC_GPU_GPU_VIDEO_DECODE_ACCELERATOR_FACTORY_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
11 #include "gpu/command_buffer/service/gpu_preferences.h"
12 #include "gpu/config/gpu_info.h" 11 #include "gpu/config/gpu_info.h"
13 #include "media/video/video_decode_accelerator.h" 12 #include "media/video/video_decode_accelerator.h"
14 13
15 namespace gfx { 14 namespace gfx {
16 class GLContext; 15 class GLContext;
17 } 16 }
18 17
19 namespace gl { 18 namespace gl {
20 class GLImage; 19 class GLImage;
21 } 20 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 const MakeGLContextCurrentCallback& make_context_current_cb, 63 const MakeGLContextCurrentCallback& make_context_current_cb,
65 const BindGLImageCallback& bind_image_cb); 64 const BindGLImageCallback& bind_image_cb);
66 65
67 static scoped_ptr<GpuVideoDecodeAcceleratorFactory> CreateWithGLES2Decoder( 66 static scoped_ptr<GpuVideoDecodeAcceleratorFactory> CreateWithGLES2Decoder(
68 const GetGLContextCallback& get_gl_context_cb, 67 const GetGLContextCallback& get_gl_context_cb,
69 const MakeGLContextCurrentCallback& make_context_current_cb, 68 const MakeGLContextCurrentCallback& make_context_current_cb,
70 const BindGLImageCallback& bind_image_cb, 69 const BindGLImageCallback& bind_image_cb,
71 const GetGLES2DecoderCallback& get_gles2_decoder_cb); 70 const GetGLES2DecoderCallback& get_gles2_decoder_cb);
72 71
73 // Return decoder capabilities supported on the current platform. 72 // Return decoder capabilities supported on the current platform.
74 static gpu::VideoDecodeAcceleratorCapabilities GetDecoderCapabilities( 73 static gpu::VideoDecodeAcceleratorCapabilities GetDecoderCapabilities();
75 const gpu::GpuPreferences& gpu_preferences);
76 74
77 // Create a VDA for the current platform for |client| with the given |config| 75 // Create a VDA for the current platform for |client| with the given |config|
78 // and for given |gpu_preferences|. Return nullptr on failure. 76 // and for given |gpu_preferences|. Return nullptr on failure.
79 virtual scoped_ptr<media::VideoDecodeAccelerator> CreateVDA( 77 virtual scoped_ptr<media::VideoDecodeAccelerator> CreateVDA(
80 media::VideoDecodeAccelerator::Client* client, 78 media::VideoDecodeAccelerator::Client* client,
81 const media::VideoDecodeAccelerator::Config& config, 79 const media::VideoDecodeAccelerator::Config& config);
82 const gpu::GpuPreferences& gpu_preferences);
83 80
84 private: 81 private:
85 // TODO(posciak): This is temporary and will not be needed once 82 // TODO(posciak): This is temporary and will not be needed once
86 // GpuVideoDecodeAcceleratorFactoryImpl implements 83 // GpuVideoDecodeAcceleratorFactoryImpl implements
87 // GpuVideoDecodeAcceleratorFactory, see crbug.com/597150 and related. 84 // GpuVideoDecodeAcceleratorFactory, see crbug.com/597150 and related.
88 GpuVideoDecodeAcceleratorFactory( 85 GpuVideoDecodeAcceleratorFactory(
89 scoped_ptr<GpuVideoDecodeAcceleratorFactoryImpl> gvdafactory_impl); 86 scoped_ptr<GpuVideoDecodeAcceleratorFactoryImpl> gvdafactory_impl);
90 87
91 scoped_ptr<GpuVideoDecodeAcceleratorFactoryImpl> gvdafactory_impl_; 88 scoped_ptr<GpuVideoDecodeAcceleratorFactoryImpl> gvdafactory_impl_;
92 }; 89 };
93 90
94 } // namespace content 91 } // namespace content
95 92
96 #endif // CONTENT_PUBLIC_GPU_GPU_VIDEO_DECODE_ACCELERATOR_FACTORY_H_ 93 #endif // CONTENT_PUBLIC_GPU_GPU_VIDEO_DECODE_ACCELERATOR_FACTORY_H_
OLDNEW
« no previous file with comments | « content/public/gpu/DEPS ('k') | content/public/gpu/gpu_video_decode_accelerator_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698