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

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

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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "remoting/client/plugin/pepper_video_renderer_2d.h" 5 #include "remoting/client/plugin/pepper_video_renderer_2d.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 static_cast<PepperDesktopFrame*>(frame.get())->buffer(); 169 static_cast<PepperDesktopFrame*>(frame.get())->buffer();
170 for (webrtc::DesktopRegion::Iterator i(frame->updated_region()); !i.IsAtEnd(); 170 for (webrtc::DesktopRegion::Iterator i(frame->updated_region()); !i.IsAtEnd();
171 i.Advance()) { 171 i.Advance()) {
172 graphics2d_.PaintImageData(image_data, pp::Point(0, 0), 172 graphics2d_.PaintImageData(image_data, pp::Point(0, 0),
173 pp::Rect(i.rect().left(), i.rect().top(), 173 pp::Rect(i.rect().left(), i.rect().top(),
174 i.rect().width(), i.rect().height())); 174 i.rect().width(), i.rect().height()));
175 } 175 }
176 176
177 if (!done.is_null()) { 177 if (!done.is_null()) {
178 pending_frames_done_callbacks_.push_back( 178 pending_frames_done_callbacks_.push_back(
179 new base::ScopedClosureRunner(done)); 179 base::MakeUnique<base::ScopedClosureRunner>(done));
180 } 180 }
181 181
182 need_flush_ = true; 182 need_flush_ = true;
183 183
184 Flush(); 184 Flush();
185 } 185 }
186 186
187 protocol::FrameConsumer::PixelFormat PepperVideoRenderer2D::GetPixelFormat() { 187 protocol::FrameConsumer::PixelFormat PepperVideoRenderer2D::GetPixelFormat() {
188 return FORMAT_BGRA; 188 return FORMAT_BGRA;
189 } 189 }
(...skipping 26 matching lines...) Expand all
216 flush_pending_ = false; 216 flush_pending_ = false;
217 217
218 // Call all callbacks for the frames we've just flushed. 218 // Call all callbacks for the frames we've just flushed.
219 flushing_frames_done_callbacks_.clear(); 219 flushing_frames_done_callbacks_.clear();
220 220
221 // Flush again if necessary. 221 // Flush again if necessary.
222 Flush(); 222 Flush();
223 } 223 }
224 224
225 } // namespace remoting 225 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/client/plugin/pepper_video_renderer_2d.h ('k') | remoting/client/software_video_renderer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698