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

Side by Side Diff: media/gpu/ipc/client/gpu_jpeg_decode_accelerator_host.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 | « no previous file | media/gpu/ipc/client/gpu_jpeg_decode_accelerator_host.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 MEDIA_GPU_IPC_CLIENT_GPU_JPEG_DECODE_ACCELERATOR_HOST_H_ 5 #ifndef MEDIA_GPU_IPC_CLIENT_GPU_JPEG_DECODE_ACCELERATOR_HOST_H_
6 #define MEDIA_GPU_IPC_CLIENT_GPU_JPEG_DECODE_ACCELERATOR_HOST_H_ 6 #define MEDIA_GPU_IPC_CLIENT_GPU_JPEG_DECODE_ACCELERATOR_HOST_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "base/threading/non_thread_safe.h" 14 #include "base/sequence_checker.h"
15 #include "media/video/jpeg_decode_accelerator.h" 15 #include "media/video/jpeg_decode_accelerator.h"
16 16
17 namespace base { 17 namespace base {
18 class SingleThreadTaskRunner; 18 class SingleThreadTaskRunner;
19 } 19 }
20 20
21 namespace gpu { 21 namespace gpu {
22 class GpuChannelHost; 22 class GpuChannelHost;
23 } 23 }
24 24
25 namespace IPC { 25 namespace IPC {
26 class Listener; 26 class Listener;
27 class Message; 27 class Message;
28 } 28 }
29 29
30 namespace media { 30 namespace media {
31 31
32 // This class is used to talk to JpegDecodeAccelerator in the GPU process 32 // This class is used to talk to JpegDecodeAccelerator in the GPU process
33 // through IPC messages. 33 // through IPC messages.
34 class GpuJpegDecodeAcceleratorHost : public JpegDecodeAccelerator, 34 class GpuJpegDecodeAcceleratorHost : public JpegDecodeAccelerator {
35 public base::NonThreadSafe {
36 public: 35 public:
37 GpuJpegDecodeAcceleratorHost( 36 GpuJpegDecodeAcceleratorHost(
38 scoped_refptr<gpu::GpuChannelHost> channel, 37 scoped_refptr<gpu::GpuChannelHost> channel,
39 int32_t route_id, 38 int32_t route_id,
40 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner); 39 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner);
41 ~GpuJpegDecodeAcceleratorHost() override; 40 ~GpuJpegDecodeAcceleratorHost() override;
42 41
43 // JpegDecodeAccelerator implementation. 42 // JpegDecodeAccelerator implementation.
44 // |client| is called on the IO thread, but is never called into after the 43 // |client| is called on the IO thread, but is never called into after the
45 // GpuJpegDecodeAcceleratorHost is destroyed. 44 // GpuJpegDecodeAcceleratorHost is destroyed.
(...skipping 12 matching lines...) Expand all
58 scoped_refptr<gpu::GpuChannelHost> channel_; 57 scoped_refptr<gpu::GpuChannelHost> channel_;
59 58
60 // Route ID for the associated decoder in the GPU process. 59 // Route ID for the associated decoder in the GPU process.
61 int32_t decoder_route_id_; 60 int32_t decoder_route_id_;
62 61
63 // GPU IO task runner. 62 // GPU IO task runner.
64 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; 63 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
65 64
66 std::unique_ptr<Receiver> receiver_; 65 std::unique_ptr<Receiver> receiver_;
67 66
67 SEQUENCE_CHECKER(sequence_checker_);
68
68 DISALLOW_COPY_AND_ASSIGN(GpuJpegDecodeAcceleratorHost); 69 DISALLOW_COPY_AND_ASSIGN(GpuJpegDecodeAcceleratorHost);
69 }; 70 };
70 71
71 } // namespace media 72 } // namespace media
72 73
73 #endif // MEDIA_GPU_IPC_CLIENT_GPU_JPEG_DECODE_ACCELERATOR_HOST_H_ 74 #endif // MEDIA_GPU_IPC_CLIENT_GPU_JPEG_DECODE_ACCELERATOR_HOST_H_
OLDNEW
« no previous file with comments | « no previous file | media/gpu/ipc/client/gpu_jpeg_decode_accelerator_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698