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

Side by Side Diff: content/common/gpu/media/fake_video_decode_accelerator.h

Issue 1134113002: content/common: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix CrOS build. Created 5 years, 7 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 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 #ifndef CONTENT_COMMON_GPU_MEDIA_FAKE_VIDEO_DECODE_ACCELERATOR_H_ 5 #ifndef CONTENT_COMMON_GPU_MEDIA_FAKE_VIDEO_DECODE_ACCELERATOR_H_
6 #define CONTENT_COMMON_GPU_MEDIA_FAKE_VIDEO_DECODE_ACCELERATOR_H_ 6 #define CONTENT_COMMON_GPU_MEDIA_FAKE_VIDEO_DECODE_ACCELERATOR_H_
7 7
8 #include <queue> 8 #include <queue>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
12 #include "base/message_loop/message_loop_proxy.h"
13 #include "content/common/content_export.h" 12 #include "content/common/content_export.h"
14 #include "media/video/video_decode_accelerator.h" 13 #include "media/video/video_decode_accelerator.h"
15 #include "ui/gfx/geometry/size_f.h" 14 #include "ui/gfx/geometry/size_f.h"
16 #include "ui/gl/gl_context.h" 15 #include "ui/gl/gl_context.h"
17 16
18 namespace content { 17 namespace content {
19 18
20 class CONTENT_EXPORT FakeVideoDecodeAccelerator 19 class CONTENT_EXPORT FakeVideoDecodeAccelerator
21 : public media::VideoDecodeAccelerator { 20 : public media::VideoDecodeAccelerator {
22 public: 21 public:
(...skipping 13 matching lines...) Expand all
36 void Reset() override; 35 void Reset() override;
37 void Destroy() override; 36 void Destroy() override;
38 bool CanDecodeOnIOThread() override; 37 bool CanDecodeOnIOThread() override;
39 38
40 private: 39 private:
41 void DoPictureReady(); 40 void DoPictureReady();
42 41
43 // The message loop that created the class. Used for all callbacks. This 42 // The message loop that created the class. Used for all callbacks. This
44 // class expects all calls to this class to be on this message loop (not 43 // class expects all calls to this class to be on this message loop (not
45 // checked). 44 // checked).
46 const scoped_refptr<base::MessageLoopProxy> child_message_loop_proxy_; 45 const scoped_refptr<base::SingleThreadTaskRunner> child_task_runner_;
47 46
48 Client* client_; 47 Client* client_;
49 48
50 // Make our context current before running any GL entry points. 49 // Make our context current before running any GL entry points.
51 base::Callback<bool(void)> make_context_current_; 50 base::Callback<bool(void)> make_context_current_;
52 gfx::GLContext* gl_; 51 gfx::GLContext* gl_;
53 52
54 // Output picture size. 53 // Output picture size.
55 gfx::Size frame_buffer_size_; 54 gfx::Size frame_buffer_size_;
56 55
57 // Picture buffer ids that are available for putting fake frames in. 56 // Picture buffer ids that are available for putting fake frames in.
58 std::queue<int> free_output_buffers_; 57 std::queue<int> free_output_buffers_;
59 // BitstreamBuffer ids for buffers that contain new data to decode. 58 // BitstreamBuffer ids for buffers that contain new data to decode.
60 std::queue<int> queued_bitstream_ids_; 59 std::queue<int> queued_bitstream_ids_;
61 60
62 bool flushing_; 61 bool flushing_;
63 62
64 // The WeakPtrFactory for |weak_this_|. 63 // The WeakPtrFactory for |weak_this_|.
65 base::WeakPtrFactory<FakeVideoDecodeAccelerator> weak_this_factory_; 64 base::WeakPtrFactory<FakeVideoDecodeAccelerator> weak_this_factory_;
66 65
67 DISALLOW_COPY_AND_ASSIGN(FakeVideoDecodeAccelerator); 66 DISALLOW_COPY_AND_ASSIGN(FakeVideoDecodeAccelerator);
68 }; 67 };
69 68
70 } // namespace content 69 } // namespace content
71 70
72 #endif // CONTENT_COMMON_GPU_MEDIA_FAKE_VIDEO_DECODE_ACCELERATOR_H_ 71 #endif // CONTENT_COMMON_GPU_MEDIA_FAKE_VIDEO_DECODE_ACCELERATOR_H_
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_memory_manager.cc ('k') | content/common/gpu/media/fake_video_decode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698