OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/common/gpu/media/rendering_helper.h" | 5 #include "content/common/gpu/media/rendering_helper.h" |
6 | 6 |
7 #include <string.h> | 7 #include <string.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <memory> |
10 #include <numeric> | 11 #include <numeric> |
11 #include <vector> | 12 #include <vector> |
12 | 13 |
13 #include "base/bind.h" | 14 #include "base/bind.h" |
14 #include "base/callback_helpers.h" | 15 #include "base/callback_helpers.h" |
15 #include "base/command_line.h" | 16 #include "base/command_line.h" |
16 #include "base/mac/scoped_nsautorelease_pool.h" | 17 #include "base/mac/scoped_nsautorelease_pool.h" |
17 #include "base/macros.h" | 18 #include "base/macros.h" |
18 #include "base/message_loop/message_loop.h" | 19 #include "base/message_loop/message_loop.h" |
19 #include "base/run_loop.h" | 20 #include "base/run_loop.h" |
(...skipping 874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
894 // When the rendering falls behind, drops frames. | 895 // When the rendering falls behind, drops frames. |
895 while (scheduled_render_time_ < target) { | 896 while (scheduled_render_time_ < target) { |
896 scheduled_render_time_ += frame_duration_; | 897 scheduled_render_time_ += frame_duration_; |
897 DropOneFrameForAllVideos(); | 898 DropOneFrameForAllVideos(); |
898 } | 899 } |
899 | 900 |
900 message_loop_->PostDelayedTask( | 901 message_loop_->PostDelayedTask( |
901 FROM_HERE, render_task_.callback(), target - now); | 902 FROM_HERE, render_task_.callback(), target - now); |
902 } | 903 } |
903 } // namespace content | 904 } // namespace content |
OLD | NEW |