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

Side by Side Diff: remoting/client/plugin/pepper_video_renderer_2d.h

Issue 2627433003: Remove ScopedVector from remoting/. (Closed)
Patch Set: rev Created 3 years, 11 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 | remoting/client/plugin/pepper_video_renderer_2d.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 #ifndef REMOTING_CLIENT_PLUGIN_PEPPER_VIDEO_RENDERER_2D_H_ 5 #ifndef REMOTING_CLIENT_PLUGIN_PEPPER_VIDEO_RENDERER_2D_H_
6 #define REMOTING_CLIENT_PLUGIN_PEPPER_VIDEO_RENDERER_2D_H_ 6 #define REMOTING_CLIENT_PLUGIN_PEPPER_VIDEO_RENDERER_2D_H_
7 7
8 #include <list> 8 #include <list>
9 #include <memory>
10 #include <vector>
9 11
10 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
11 #include "base/macros.h" 13 #include "base/macros.h"
12 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_vector.h"
14 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
15 #include "base/threading/thread_checker.h" 16 #include "base/threading/thread_checker.h"
16 #include "ppapi/cpp/graphics_2d.h" 17 #include "ppapi/cpp/graphics_2d.h"
17 #include "ppapi/cpp/image_data.h" 18 #include "ppapi/cpp/image_data.h"
18 #include "ppapi/cpp/point.h" 19 #include "ppapi/cpp/point.h"
19 #include "ppapi/cpp/view.h" 20 #include "ppapi/cpp/view.h"
20 #include "ppapi/utility/completion_callback_factory.h" 21 #include "ppapi/utility/completion_callback_factory.h"
21 #include "remoting/client/plugin/pepper_video_renderer.h" 22 #include "remoting/client/plugin/pepper_video_renderer.h"
22 #include "remoting/client/software_video_renderer.h" 23 #include "remoting/client/software_video_renderer.h"
23 #include "remoting/protocol/frame_consumer.h" 24 #include "remoting/protocol/frame_consumer.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 78
78 SoftwareVideoRenderer software_video_renderer_; 79 SoftwareVideoRenderer software_video_renderer_;
79 80
80 // View size in output pixels. 81 // View size in output pixels.
81 webrtc::DesktopSize view_size_; 82 webrtc::DesktopSize view_size_;
82 83
83 // Size of the most recent source frame in pixels. 84 // Size of the most recent source frame in pixels.
84 webrtc::DesktopSize source_size_; 85 webrtc::DesktopSize source_size_;
85 86
86 // Done callbacks for the frames that have been painted but not flushed. 87 // Done callbacks for the frames that have been painted but not flushed.
87 ScopedVector<base::ScopedClosureRunner> pending_frames_done_callbacks_; 88 std::vector<std::unique_ptr<base::ScopedClosureRunner>>
89 pending_frames_done_callbacks_;
88 90
89 // Done callbacks for the frames that are currently being flushed. 91 // Done callbacks for the frames that are currently being flushed.
90 ScopedVector<base::ScopedClosureRunner> flushing_frames_done_callbacks_; 92 std::vector<std::unique_ptr<base::ScopedClosureRunner>>
93 flushing_frames_done_callbacks_;
91 94
92 // True if there paint operations that need to be flushed. 95 // True if there paint operations that need to be flushed.
93 bool need_flush_ = false; 96 bool need_flush_ = false;
94 97
95 // True if there is already a Flush() pending on the Graphics2D context. 98 // True if there is already a Flush() pending on the Graphics2D context.
96 bool flush_pending_ = false; 99 bool flush_pending_ = false;
97 100
98 // True after the first call to DrawFrame(). 101 // True after the first call to DrawFrame().
99 bool frame_received_ = false; 102 bool frame_received_ = false;
100 103
101 // True if dirty regions are to be sent to |event_handler_| for debugging. 104 // True if dirty regions are to be sent to |event_handler_| for debugging.
102 bool debug_dirty_region_ = false; 105 bool debug_dirty_region_ = false;
103 106
104 base::ThreadChecker thread_checker_; 107 base::ThreadChecker thread_checker_;
105 108
106 pp::CompletionCallbackFactory<PepperVideoRenderer2D> callback_factory_; 109 pp::CompletionCallbackFactory<PepperVideoRenderer2D> callback_factory_;
107 base::WeakPtrFactory<PepperVideoRenderer2D> weak_factory_; 110 base::WeakPtrFactory<PepperVideoRenderer2D> weak_factory_;
108 111
109 DISALLOW_COPY_AND_ASSIGN(PepperVideoRenderer2D); 112 DISALLOW_COPY_AND_ASSIGN(PepperVideoRenderer2D);
110 }; 113 };
111 114
112 } // namespace remoting 115 } // namespace remoting
113 116
114 #endif // REMOTING_CLIENT_PLUGIN_PEPPER_VIDEO_RENDERER_2D_H_ 117 #endif // REMOTING_CLIENT_PLUGIN_PEPPER_VIDEO_RENDERER_2D_H_
OLDNEW
« no previous file with comments | « no previous file | remoting/client/plugin/pepper_video_renderer_2d.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698