| OLD | NEW |
| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 pp::ImageData buffer_; | 51 pp::ImageData buffer_; |
| 52 }; | 52 }; |
| 53 | 53 |
| 54 } // namespace | 54 } // namespace |
| 55 | 55 |
| 56 PepperVideoRenderer2D::PepperVideoRenderer2D() | 56 PepperVideoRenderer2D::PepperVideoRenderer2D() |
| 57 : software_video_renderer_(this), | 57 : software_video_renderer_(this), |
| 58 callback_factory_(this), | 58 callback_factory_(this), |
| 59 weak_factory_(this) {} | 59 weak_factory_(this) {} |
| 60 | 60 |
| 61 PepperVideoRenderer2D::~PepperVideoRenderer2D() {} | 61 PepperVideoRenderer2D::~PepperVideoRenderer2D() { |
| 62 DCHECK(thread_checker_.CalledOnValidThread()); |
| 63 } |
| 62 | 64 |
| 63 void PepperVideoRenderer2D::SetPepperContext( | 65 void PepperVideoRenderer2D::SetPepperContext( |
| 64 pp::Instance* instance, | 66 pp::Instance* instance, |
| 65 EventHandler* event_handler) { | 67 EventHandler* event_handler) { |
| 66 DCHECK(thread_checker_.CalledOnValidThread()); | 68 DCHECK(thread_checker_.CalledOnValidThread()); |
| 67 DCHECK(!instance_); | 69 DCHECK(!instance_); |
| 68 DCHECK(!event_handler_); | 70 DCHECK(!event_handler_); |
| 69 DCHECK(instance); | 71 DCHECK(instance); |
| 70 DCHECK(event_handler); | 72 DCHECK(event_handler); |
| 71 | 73 |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 flush_pending_ = false; | 218 flush_pending_ = false; |
| 217 | 219 |
| 218 // Call all callbacks for the frames we've just flushed. | 220 // Call all callbacks for the frames we've just flushed. |
| 219 flushing_frames_done_callbacks_.clear(); | 221 flushing_frames_done_callbacks_.clear(); |
| 220 | 222 |
| 221 // Flush again if necessary. | 223 // Flush again if necessary. |
| 222 Flush(); | 224 Flush(); |
| 223 } | 225 } |
| 224 | 226 |
| 225 } // namespace remoting | 227 } // namespace remoting |
| OLD | NEW |