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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 DISALLOW_COPY_AND_ASSIGN(DisplayConfiguratorObserver); | 95 DISALLOW_COPY_AND_ASSIGN(DisplayConfiguratorObserver); |
96 }; | 96 }; |
97 | 97 |
98 class RenderingHelper::StubOzoneDelegate : public ui::PlatformWindowDelegate { | 98 class RenderingHelper::StubOzoneDelegate : public ui::PlatformWindowDelegate { |
99 public: | 99 public: |
100 StubOzoneDelegate() : accelerated_widget_(gfx::kNullAcceleratedWidget) { | 100 StubOzoneDelegate() : accelerated_widget_(gfx::kNullAcceleratedWidget) { |
101 ui_thread_gpu_.Initialize(); | 101 ui_thread_gpu_.Initialize(); |
102 platform_window_ = ui::OzonePlatform::GetInstance()->CreatePlatformWindow( | 102 platform_window_ = ui::OzonePlatform::GetInstance()->CreatePlatformWindow( |
103 this, gfx::Rect()); | 103 this, gfx::Rect()); |
104 } | 104 } |
105 virtual ~StubOzoneDelegate() {} | 105 ~StubOzoneDelegate() override {} |
106 | 106 |
107 void OnBoundsChanged(const gfx::Rect& new_bounds) override {} | 107 void OnBoundsChanged(const gfx::Rect& new_bounds) override {} |
108 | 108 |
109 void OnDamageRect(const gfx::Rect& damaged_region) override {} | 109 void OnDamageRect(const gfx::Rect& damaged_region) override {} |
110 | 110 |
111 void DispatchEvent(ui::Event* event) override {} | 111 void DispatchEvent(ui::Event* event) override {} |
112 | 112 |
113 void OnCloseRequest() override {} | 113 void OnCloseRequest() override {} |
114 void OnClosed() override {} | 114 void OnClosed() override {} |
115 | 115 |
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
833 // When the rendering falls behind, drops frames. | 833 // When the rendering falls behind, drops frames. |
834 while (scheduled_render_time_ < target) { | 834 while (scheduled_render_time_ < target) { |
835 scheduled_render_time_ += frame_duration_; | 835 scheduled_render_time_ += frame_duration_; |
836 DropOneFrameForAllVideos(); | 836 DropOneFrameForAllVideos(); |
837 } | 837 } |
838 | 838 |
839 message_loop_->PostDelayedTask( | 839 message_loop_->PostDelayedTask( |
840 FROM_HERE, render_task_.callback(), target - now); | 840 FROM_HERE, render_task_.callback(), target - now); |
841 } | 841 } |
842 } // namespace content | 842 } // namespace content |
OLD | NEW |