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

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

Issue 1874903002: Convert //content from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix indent 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
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"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 base::Callback<bool(uint32_t client_texture_id, 51 base::Callback<bool(uint32_t client_texture_id,
52 uint32_t texture_target, 52 uint32_t texture_target,
53 const scoped_refptr<gl::GLImage>& image, 53 const scoped_refptr<gl::GLImage>& image,
54 bool can_bind_to_sampler)>; 54 bool can_bind_to_sampler)>;
55 55
56 // Return a WeakPtr to a GLES2Decoder, if one is available. 56 // Return a WeakPtr to a GLES2Decoder, if one is available.
57 using GetGLES2DecoderCallback = 57 using GetGLES2DecoderCallback =
58 base::Callback<base::WeakPtr<gpu::gles2::GLES2Decoder>(void)>; 58 base::Callback<base::WeakPtr<gpu::gles2::GLES2Decoder>(void)>;
59 59
60 // Create a factory capable of producing VDA instances for current platform. 60 // Create a factory capable of producing VDA instances for current platform.
61 static scoped_ptr<GpuVideoDecodeAcceleratorFactory> Create( 61 static std::unique_ptr<GpuVideoDecodeAcceleratorFactory> Create(
62 const GetGLContextCallback& get_gl_context_cb, 62 const GetGLContextCallback& get_gl_context_cb,
63 const MakeGLContextCurrentCallback& make_context_current_cb, 63 const MakeGLContextCurrentCallback& make_context_current_cb,
64 const BindGLImageCallback& bind_image_cb); 64 const BindGLImageCallback& bind_image_cb);
65 65
66 static scoped_ptr<GpuVideoDecodeAcceleratorFactory> CreateWithGLES2Decoder( 66 static std::unique_ptr<GpuVideoDecodeAcceleratorFactory>
67 CreateWithGLES2Decoder(
67 const GetGLContextCallback& get_gl_context_cb, 68 const GetGLContextCallback& get_gl_context_cb,
68 const MakeGLContextCurrentCallback& make_context_current_cb, 69 const MakeGLContextCurrentCallback& make_context_current_cb,
69 const BindGLImageCallback& bind_image_cb, 70 const BindGLImageCallback& bind_image_cb,
70 const GetGLES2DecoderCallback& get_gles2_decoder_cb); 71 const GetGLES2DecoderCallback& get_gles2_decoder_cb);
71 72
72 // Return decoder capabilities supported on the current platform. 73 // Return decoder capabilities supported on the current platform.
73 static gpu::VideoDecodeAcceleratorCapabilities GetDecoderCapabilities(); 74 static gpu::VideoDecodeAcceleratorCapabilities GetDecoderCapabilities();
74 75
75 // Create a VDA for the current platform for |client| with the given |config| 76 // Create a VDA for the current platform for |client| with the given |config|
76 // and for given |gpu_preferences|. Return nullptr on failure. 77 // and for given |gpu_preferences|. Return nullptr on failure.
77 virtual scoped_ptr<media::VideoDecodeAccelerator> CreateVDA( 78 virtual std::unique_ptr<media::VideoDecodeAccelerator> CreateVDA(
78 media::VideoDecodeAccelerator::Client* client, 79 media::VideoDecodeAccelerator::Client* client,
79 const media::VideoDecodeAccelerator::Config& config); 80 const media::VideoDecodeAccelerator::Config& config);
80 81
81 private: 82 private:
82 // TODO(posciak): This is temporary and will not be needed once 83 // TODO(posciak): This is temporary and will not be needed once
83 // GpuVideoDecodeAcceleratorFactoryImpl implements 84 // GpuVideoDecodeAcceleratorFactoryImpl implements
84 // GpuVideoDecodeAcceleratorFactory, see crbug.com/597150 and related. 85 // GpuVideoDecodeAcceleratorFactory, see crbug.com/597150 and related.
85 GpuVideoDecodeAcceleratorFactory( 86 GpuVideoDecodeAcceleratorFactory(
86 scoped_ptr<GpuVideoDecodeAcceleratorFactoryImpl> gvdafactory_impl); 87 std::unique_ptr<GpuVideoDecodeAcceleratorFactoryImpl> gvdafactory_impl);
87 88
88 scoped_ptr<GpuVideoDecodeAcceleratorFactoryImpl> gvdafactory_impl_; 89 std::unique_ptr<GpuVideoDecodeAcceleratorFactoryImpl> gvdafactory_impl_;
89 }; 90 };
90 91
91 } // namespace content 92 } // namespace content
92 93
93 #endif // CONTENT_PUBLIC_GPU_GPU_VIDEO_DECODE_ACCELERATOR_FACTORY_H_ 94 #endif // CONTENT_PUBLIC_GPU_GPU_VIDEO_DECODE_ACCELERATOR_FACTORY_H_
OLDNEW
« no previous file with comments | « content/public/common/sandbox_init.h ('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