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

Side by Side Diff: media/gpu/vaapi_picture.h

Issue 2911113003: Replace deprecated base::NonThreadSafe in media/gpu in favor of SequenceChecker. (Closed)
Patch Set: Created 3 years, 6 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 | « media/gpu/ipc/service/gpu_jpeg_decode_accelerator.cc ('k') | media/gpu/vaapi_picture.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 // This file contains an interface of output pictures for the Vaapi 5 // This file contains an interface of output pictures for the Vaapi
6 // video decoder. This is implemented by different window system 6 // video decoder. This is implemented by different window system
7 // (X11/Ozone) and used by VaapiVideoDecodeAccelerator to produce 7 // (X11/Ozone) and used by VaapiVideoDecodeAccelerator to produce
8 // output pictures. 8 // output pictures.
9 9
10 #ifndef MEDIA_GPU_VAAPI_PICTURE_H_ 10 #ifndef MEDIA_GPU_VAAPI_PICTURE_H_
11 #define MEDIA_GPU_VAAPI_PICTURE_H_ 11 #define MEDIA_GPU_VAAPI_PICTURE_H_
12 12
13 #include <stdint.h> 13 #include <stdint.h>
14 14
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "base/memory/linked_ptr.h" 16 #include "base/memory/linked_ptr.h"
17 #include "base/memory/ref_counted.h" 17 #include "base/memory/ref_counted.h"
18 #include "base/threading/non_thread_safe.h" 18 #include "base/sequence_checker.h"
19 #include "media/gpu/gpu_video_decode_accelerator_helpers.h" 19 #include "media/gpu/gpu_video_decode_accelerator_helpers.h"
20 #include "ui/gfx/geometry/size.h" 20 #include "ui/gfx/geometry/size.h"
21 #include "ui/gfx/gpu_memory_buffer.h" 21 #include "ui/gfx/gpu_memory_buffer.h"
22 22
23 namespace media { 23 namespace media {
24 24
25 class VASurface; 25 class VASurface;
26 class VaapiWrapper; 26 class VaapiWrapper;
27 27
28 // Picture is native pixmap abstraction (X11/Ozone). 28 // Picture is native pixmap abstraction (X11/Ozone).
29 class VaapiPicture : public base::NonThreadSafe { 29 class VaapiPicture {
30 public: 30 public:
31 // Create a VaapiPicture of |size| to be associated with |picture_buffer_id|. 31 // Create a VaapiPicture of |size| to be associated with |picture_buffer_id|.
32 // If provided, bind it to |texture_id|, as well as to |client_texture_id| 32 // If provided, bind it to |texture_id|, as well as to |client_texture_id|
33 // using |bind_image_cb|. 33 // using |bind_image_cb|.
34 static linked_ptr<VaapiPicture> CreatePicture( 34 static linked_ptr<VaapiPicture> CreatePicture(
35 const scoped_refptr<VaapiWrapper>& vaapi_wrapper, 35 const scoped_refptr<VaapiWrapper>& vaapi_wrapper,
36 const MakeGLContextCurrentCallback& make_context_current_cb, 36 const MakeGLContextCurrentCallback& make_context_current_cb,
37 const BindGLImageCallback& bind_image_cb, 37 const BindGLImageCallback& bind_image_cb,
38 int32_t picture_buffer_id, 38 int32_t picture_buffer_id,
39 const gfx::Size& size, 39 const gfx::Size& size,
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 const MakeGLContextCurrentCallback make_context_current_cb_; 80 const MakeGLContextCurrentCallback make_context_current_cb_;
81 const BindGLImageCallback bind_image_cb_; 81 const BindGLImageCallback bind_image_cb_;
82 82
83 const gfx::Size size_; 83 const gfx::Size size_;
84 const uint32_t texture_id_; 84 const uint32_t texture_id_;
85 const uint32_t client_texture_id_; 85 const uint32_t client_texture_id_;
86 86
87 private: 87 private:
88 int32_t picture_buffer_id_; 88 int32_t picture_buffer_id_;
89 89
90 SEQUENCE_CHECKER(sequence_checker_);
91
90 DISALLOW_COPY_AND_ASSIGN(VaapiPicture); 92 DISALLOW_COPY_AND_ASSIGN(VaapiPicture);
91 }; 93 };
92 94
93 } // namespace media 95 } // namespace media
94 96
95 #endif // MEDIA_GPU_VAAPI_PICTURE_H_ 97 #endif // MEDIA_GPU_VAAPI_PICTURE_H_
OLDNEW
« no previous file with comments | « media/gpu/ipc/service/gpu_jpeg_decode_accelerator.cc ('k') | media/gpu/vaapi_picture.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698