OLD | NEW |
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 #include <utility> | 5 #include <utility> |
6 | 6 |
7 #include "base/base64.h" | 7 #include "base/base64.h" |
8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 void OnFrameDecoded(std::unique_ptr<VideoPacket> packet, | 189 void OnFrameDecoded(std::unique_ptr<VideoPacket> packet, |
190 const base::Closure& done, | 190 const base::Closure& done, |
191 std::unique_ptr<webrtc::DesktopFrame> frame) { | 191 std::unique_ptr<webrtc::DesktopFrame> frame) { |
192 last_video_packet_ = std::move(packet); | 192 last_video_packet_ = std::move(packet); |
193 DrawFrame(std::move(frame), done); | 193 DrawFrame(std::move(frame), done); |
194 } | 194 } |
195 | 195 |
196 // protocol::FrameConsumer interface. | 196 // protocol::FrameConsumer interface. |
197 std::unique_ptr<webrtc::DesktopFrame> AllocateFrame( | 197 std::unique_ptr<webrtc::DesktopFrame> AllocateFrame( |
198 const webrtc::DesktopSize& size) override { | 198 const webrtc::DesktopSize& size) override { |
199 return base::WrapUnique(new webrtc::BasicDesktopFrame(size)); | 199 return base::MakeUnique<webrtc::BasicDesktopFrame>(size); |
200 } | 200 } |
201 | 201 |
202 void DrawFrame(std::unique_ptr<webrtc::DesktopFrame> frame, | 202 void DrawFrame(std::unique_ptr<webrtc::DesktopFrame> frame, |
203 const base::Closure& done) override { | 203 const base::Closure& done) override { |
204 last_video_frame_ = std::move(frame); | 204 last_video_frame_ = std::move(frame); |
205 if (!on_frame_task_.is_null()) | 205 if (!on_frame_task_.is_null()) |
206 on_frame_task_.Run(); | 206 on_frame_task_.Run(); |
207 if (!done.is_null()) | 207 if (!done.is_null()) |
208 done.Run(); | 208 done.Run(); |
209 } | 209 } |
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
692 | 692 |
693 TEST_P(ProtocolPerfTest, ScrollPerformanceIce) { | 693 TEST_P(ProtocolPerfTest, ScrollPerformanceIce) { |
694 MeasureScrollPerformance(false); | 694 MeasureScrollPerformance(false); |
695 } | 695 } |
696 | 696 |
697 TEST_P(ProtocolPerfTest, ScrollPerformanceWebrtc) { | 697 TEST_P(ProtocolPerfTest, ScrollPerformanceWebrtc) { |
698 MeasureScrollPerformance(true); | 698 MeasureScrollPerformance(true); |
699 } | 699 } |
700 | 700 |
701 } // namespace remoting | 701 } // namespace remoting |
OLD | NEW |