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 <algorithm> | 7 #include <algorithm> |
8 #include <numeric> | 8 #include <numeric> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 | 122 |
123 void OnWindowStateChanged(ui::PlatformWindowState new_state) override {} | 123 void OnWindowStateChanged(ui::PlatformWindowState new_state) override {} |
124 | 124 |
125 void OnLostCapture() override {}; | 125 void OnLostCapture() override {}; |
126 | 126 |
127 void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget, | 127 void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget, |
128 float device_pixel_ratio) override { | 128 float device_pixel_ratio) override { |
129 accelerated_widget_ = widget; | 129 accelerated_widget_ = widget; |
130 } | 130 } |
131 | 131 |
| 132 void OnAcceleratedWidgetDestroyed() override { |
| 133 NOTREACHED(); |
| 134 } |
| 135 |
132 void OnActivationChanged(bool active) override {}; | 136 void OnActivationChanged(bool active) override {}; |
133 | 137 |
134 gfx::AcceleratedWidget accelerated_widget() const { | 138 gfx::AcceleratedWidget accelerated_widget() const { |
135 return accelerated_widget_; | 139 return accelerated_widget_; |
136 } | 140 } |
137 | 141 |
138 gfx::Size GetSize() { return platform_window_->GetBounds().size(); } | 142 gfx::Size GetSize() { return platform_window_->GetBounds().size(); } |
139 | 143 |
140 ui::PlatformWindow* platform_window() const { return platform_window_.get(); } | 144 ui::PlatformWindow* platform_window() const { return platform_window_.get(); } |
141 | 145 |
(...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
877 // When the rendering falls behind, drops frames. | 881 // When the rendering falls behind, drops frames. |
878 while (scheduled_render_time_ < target) { | 882 while (scheduled_render_time_ < target) { |
879 scheduled_render_time_ += frame_duration_; | 883 scheduled_render_time_ += frame_duration_; |
880 DropOneFrameForAllVideos(); | 884 DropOneFrameForAllVideos(); |
881 } | 885 } |
882 | 886 |
883 message_loop_->PostDelayedTask( | 887 message_loop_->PostDelayedTask( |
884 FROM_HERE, render_task_.callback(), target - now); | 888 FROM_HERE, render_task_.callback(), target - now); |
885 } | 889 } |
886 } // namespace content | 890 } // namespace content |
OLD | NEW |