Chromium Code Reviews| 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 |
| 11 #include "base/bind.h" | 11 #include "base/bind.h" |
| 12 #include "base/callback_helpers.h" | 12 #include "base/callback_helpers.h" |
| 13 #include "base/command_line.h" | 13 #include "base/command_line.h" |
| 14 #include "base/mac/scoped_nsautorelease_pool.h" | 14 #include "base/mac/scoped_nsautorelease_pool.h" |
| 15 #include "base/message_loop/message_loop.h" | 15 #include "base/message_loop/message_loop.h" |
| 16 #include "base/run_loop.h" | |
| 16 #include "base/strings/stringize_macros.h" | 17 #include "base/strings/stringize_macros.h" |
| 17 #include "base/synchronization/waitable_event.h" | 18 #include "base/synchronization/waitable_event.h" |
| 18 #include "base/time/time.h" | 19 #include "base/time/time.h" |
| 19 #include "ui/gl/gl_context.h" | 20 #include "ui/gl/gl_context.h" |
| 20 #include "ui/gl/gl_implementation.h" | 21 #include "ui/gl/gl_implementation.h" |
| 21 #include "ui/gl/gl_surface.h" | 22 #include "ui/gl/gl_surface.h" |
| 22 | 23 |
| 23 #if defined(OS_WIN) | 24 #if defined(OS_WIN) |
| 24 #include <windows.h> | 25 #include <windows.h> |
| 25 #endif | 26 #endif |
| 26 | 27 |
| 27 #if defined(USE_X11) | 28 #if defined(USE_X11) |
| 28 #include "ui/gfx/x/x11_types.h" | 29 #include "ui/gfx/x/x11_types.h" |
| 29 #endif | 30 #endif |
| 30 | 31 |
| 31 #if defined(ARCH_CPU_X86_FAMILY) && defined(USE_X11) | 32 #if defined(ARCH_CPU_X86_FAMILY) && defined(USE_X11) |
| 32 #include "ui/gl/gl_surface_glx.h" | 33 #include "ui/gl/gl_surface_glx.h" |
| 33 #define GL_VARIANT_GLX 1 | 34 #define GL_VARIANT_GLX 1 |
| 34 #else | 35 #else |
| 35 #include "ui/gl/gl_surface_egl.h" | 36 #include "ui/gl/gl_surface_egl.h" |
| 36 #define GL_VARIANT_EGL 1 | 37 #define GL_VARIANT_EGL 1 |
| 37 #endif | 38 #endif |
| 38 | 39 |
| 39 #if defined(USE_OZONE) | 40 #if defined(USE_OZONE) |
| 40 #if defined(OS_CHROMEOS) | 41 #if defined(OS_CHROMEOS) |
| 41 #include "ui/display/chromeos/display_configurator.h" | 42 #include "ui/display/chromeos/display_configurator.h" |
| 43 #include "ui/display/types/display_constants.h" | |
| 42 #endif // defined(OS_CHROMEOS) | 44 #endif // defined(OS_CHROMEOS) |
| 43 #include "ui/ozone/public/ozone_platform.h" | 45 #include "ui/ozone/public/ozone_platform.h" |
| 44 #include "ui/ozone/public/ui_thread_gpu.h" | 46 #include "ui/ozone/public/ui_thread_gpu.h" |
| 45 #include "ui/platform_window/platform_window.h" | 47 #include "ui/platform_window/platform_window.h" |
| 46 #include "ui/platform_window/platform_window_delegate.h" | 48 #include "ui/platform_window/platform_window_delegate.h" |
| 47 #endif // defined(USE_OZONE) | 49 #endif // defined(USE_OZONE) |
| 48 | 50 |
| 49 // Helper for Shader creation. | 51 // Helper for Shader creation. |
| 50 static void CreateShader(GLuint program, | 52 static void CreateShader(GLuint program, |
| 51 GLenum type, | 53 GLenum type, |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 63 } | 65 } |
| 64 glAttachShader(program, shader); | 66 glAttachShader(program, shader); |
| 65 glDeleteShader(shader); | 67 glDeleteShader(shader); |
| 66 CHECK_EQ(static_cast<int>(glGetError()), GL_NO_ERROR); | 68 CHECK_EQ(static_cast<int>(glGetError()), GL_NO_ERROR); |
| 67 } | 69 } |
| 68 | 70 |
| 69 namespace content { | 71 namespace content { |
| 70 | 72 |
| 71 #if defined(USE_OZONE) | 73 #if defined(USE_OZONE) |
| 72 | 74 |
| 75 class DisplayConfiguratorObserver : public ui::DisplayConfigurator::Observer { | |
| 76 public: | |
| 77 DisplayConfiguratorObserver(base::RunLoop* loop) : loop_(loop) {} | |
| 78 ~DisplayConfiguratorObserver() override {} | |
| 79 | |
| 80 private: | |
| 81 // ui::DisplayConfigurator::Observer overrides: | |
| 82 void OnDisplayModeChanged( | |
| 83 const ui::DisplayConfigurator::DisplayStateList& outputs) override { | |
| 84 if (!loop_) | |
| 85 return; | |
| 86 loop_->Quit(); | |
| 87 loop_ = nullptr; | |
| 88 } | |
| 89 void OnDisplayModeChangeFailed( | |
| 90 ui::MultipleDisplayState failed_new_state) override { | |
| 91 LOG(FATAL) << "Could not configure display"; | |
| 92 } | |
| 93 | |
| 94 base::RunLoop* loop_; | |
| 95 | |
| 96 DISALLOW_COPY_AND_ASSIGN(DisplayConfiguratorObserver); | |
| 97 }; | |
| 98 | |
| 73 class RenderingHelper::StubOzoneDelegate : public ui::PlatformWindowDelegate { | 99 class RenderingHelper::StubOzoneDelegate : public ui::PlatformWindowDelegate { |
| 74 public: | 100 public: |
| 75 StubOzoneDelegate() : accelerated_widget_(gfx::kNullAcceleratedWidget) { | 101 StubOzoneDelegate(base::RunLoop* loop) |
| 102 : accelerated_widget_(gfx::kNullAcceleratedWidget), loop_(loop) { | |
| 76 ui_thread_gpu_.Initialize(); | 103 ui_thread_gpu_.Initialize(); |
| 77 platform_window_ = ui::OzonePlatform::GetInstance()->CreatePlatformWindow( | 104 platform_window_ = ui::OzonePlatform::GetInstance()->CreatePlatformWindow( |
| 78 this, gfx::Rect()); | 105 this, gfx::Rect()); |
| 79 } | 106 } |
| 80 virtual ~StubOzoneDelegate() {} | 107 virtual ~StubOzoneDelegate() {} |
| 81 | 108 |
| 82 void OnBoundsChanged(const gfx::Rect& new_bounds) override {} | 109 void OnBoundsChanged(const gfx::Rect& new_bounds) override { |
| 110 if (!loop_) | |
| 111 return; | |
| 112 loop_->Quit(); | |
| 113 loop_ = nullptr; | |
| 114 } | |
| 83 | 115 |
| 84 void OnDamageRect(const gfx::Rect& damaged_region) override {} | 116 void OnDamageRect(const gfx::Rect& damaged_region) override {} |
| 85 | 117 |
| 86 void DispatchEvent(ui::Event* event) override {} | 118 void DispatchEvent(ui::Event* event) override {} |
| 87 | 119 |
| 88 void OnCloseRequest() override {} | 120 void OnCloseRequest() override {} |
| 89 void OnClosed() override {} | 121 void OnClosed() override {} |
| 90 | 122 |
| 91 void OnWindowStateChanged(ui::PlatformWindowState new_state) override {} | 123 void OnWindowStateChanged(ui::PlatformWindowState new_state) override {} |
| 92 | 124 |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 103 } | 135 } |
| 104 | 136 |
| 105 gfx::Size GetSize() { return platform_window_->GetBounds().size(); } | 137 gfx::Size GetSize() { return platform_window_->GetBounds().size(); } |
| 106 | 138 |
| 107 ui::PlatformWindow* platform_window() const { return platform_window_.get(); } | 139 ui::PlatformWindow* platform_window() const { return platform_window_.get(); } |
| 108 | 140 |
| 109 private: | 141 private: |
| 110 ui::UiThreadGpu ui_thread_gpu_; | 142 ui::UiThreadGpu ui_thread_gpu_; |
| 111 scoped_ptr<ui::PlatformWindow> platform_window_; | 143 scoped_ptr<ui::PlatformWindow> platform_window_; |
| 112 gfx::AcceleratedWidget accelerated_widget_; | 144 gfx::AcceleratedWidget accelerated_widget_; |
| 145 base::RunLoop* loop_; | |
| 113 | 146 |
| 114 DISALLOW_COPY_AND_ASSIGN(StubOzoneDelegate); | 147 DISALLOW_COPY_AND_ASSIGN(StubOzoneDelegate); |
| 115 }; | 148 }; |
| 116 | 149 |
| 117 #endif // defined(USE_OZONE) | 150 #endif // defined(USE_OZONE) |
| 118 | 151 |
| 119 RenderingHelperParams::RenderingHelperParams() | 152 RenderingHelperParams::RenderingHelperParams() |
| 120 : rendering_fps(0), warm_up_iterations(0), render_as_thumbnails(false) { | 153 : rendering_fps(0), warm_up_iterations(0), render_as_thumbnails(false) { |
| 121 } | 154 } |
| 122 | 155 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 160 RenderingHelper::RenderingHelper() { | 193 RenderingHelper::RenderingHelper() { |
| 161 window_ = gfx::kNullAcceleratedWidget; | 194 window_ = gfx::kNullAcceleratedWidget; |
| 162 Clear(); | 195 Clear(); |
| 163 } | 196 } |
| 164 | 197 |
| 165 RenderingHelper::~RenderingHelper() { | 198 RenderingHelper::~RenderingHelper() { |
| 166 CHECK_EQ(videos_.size(), 0U) << "Must call UnInitialize before dtor."; | 199 CHECK_EQ(videos_.size(), 0U) << "Must call UnInitialize before dtor."; |
| 167 Clear(); | 200 Clear(); |
| 168 } | 201 } |
| 169 | 202 |
| 170 void RenderingHelper::Initialize(const RenderingHelperParams& params, | 203 void RenderingHelper::Setup() { |
| 171 base::WaitableEvent* done) { | |
| 172 // Use videos_.size() != 0 as a proxy for the class having already been | |
| 173 // Initialize()'d, and UnInitialize() before continuing. | |
| 174 if (videos_.size()) { | |
| 175 base::WaitableEvent done(false, false); | |
| 176 UnInitialize(&done); | |
| 177 done.Wait(); | |
| 178 } | |
| 179 | |
| 180 render_task_.Reset( | |
| 181 base::Bind(&RenderingHelper::RenderContent, base::Unretained(this))); | |
| 182 | |
| 183 frame_duration_ = params.rendering_fps > 0 | |
| 184 ? base::TimeDelta::FromSeconds(1) / params.rendering_fps | |
| 185 : base::TimeDelta(); | |
| 186 | |
| 187 render_as_thumbnails_ = params.render_as_thumbnails; | |
| 188 message_loop_ = base::MessageLoop::current(); | |
| 189 | |
| 190 #if defined(OS_WIN) | 204 #if defined(OS_WIN) |
| 191 window_ = CreateWindowEx(0, | 205 window_ = CreateWindowEx(0, |
| 192 L"Static", | 206 L"Static", |
| 193 L"VideoDecodeAcceleratorTest", | 207 L"VideoDecodeAcceleratorTest", |
| 194 WS_OVERLAPPEDWINDOW | WS_VISIBLE, | 208 WS_OVERLAPPEDWINDOW | WS_VISIBLE, |
| 195 0, | 209 0, |
| 196 0, | 210 0, |
| 197 GetSystemMetrics(SM_CXSCREEN), | 211 GetSystemMetrics(SM_CXSCREEN), |
| 198 GetSystemMetrics(SM_CYSCREEN), | 212 GetSystemMetrics(SM_CYSCREEN), |
| 199 NULL, | 213 NULL, |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 222 0 /* border width */, | 236 0 /* border width */, |
| 223 depth, | 237 depth, |
| 224 CopyFromParent /* class */, | 238 CopyFromParent /* class */, |
| 225 CopyFromParent /* visual */, | 239 CopyFromParent /* visual */, |
| 226 (CWBackPixel | CWOverrideRedirect), | 240 (CWBackPixel | CWOverrideRedirect), |
| 227 &window_attributes); | 241 &window_attributes); |
| 228 XStoreName(display, window_, "VideoDecodeAcceleratorTest"); | 242 XStoreName(display, window_, "VideoDecodeAcceleratorTest"); |
| 229 XSelectInput(display, window_, ExposureMask); | 243 XSelectInput(display, window_, ExposureMask); |
| 230 XMapWindow(display, window_); | 244 XMapWindow(display, window_); |
| 231 #elif defined(USE_OZONE) | 245 #elif defined(USE_OZONE) |
| 232 platform_window_delegate_.reset(new RenderingHelper::StubOzoneDelegate()); | 246 base::MessageLoop::ScopedNestableTaskAllower nest_loop( |
| 247 base::MessageLoop::current()); | |
| 248 base::RunLoop wait_window_resize; | |
| 249 | |
| 250 platform_window_delegate_.reset( | |
| 251 new RenderingHelper::StubOzoneDelegate(&wait_window_resize)); | |
| 233 window_ = platform_window_delegate_->accelerated_widget(); | 252 window_ = platform_window_delegate_->accelerated_widget(); |
| 234 #if defined(OS_CHROMEOS) | 253 #if defined(OS_CHROMEOS) |
| 254 // We hold onto the main loop here to wait for the DisplayController | |
| 255 // to give us the size of the display so we can create a window of | |
| 256 // the same size. | |
| 257 base::RunLoop wait_display_setup; | |
| 258 DisplayConfiguratorObserver observer(&wait_display_setup); | |
| 235 display_configurator_.reset(new ui::DisplayConfigurator()); | 259 display_configurator_.reset(new ui::DisplayConfigurator()); |
| 260 display_configurator_->AddObserver(&observer); | |
| 236 display_configurator_->Init(true); | 261 display_configurator_->Init(true); |
| 237 display_configurator_->ForceInitialConfigure(0); | 262 display_configurator_->ForceInitialConfigure(0); |
| 263 // Make sure all the display configuration is applied. | |
| 264 wait_display_setup.Run(); | |
| 265 display_configurator_->RemoveObserver(&observer); | |
| 238 platform_window_delegate_->platform_window()->SetBounds( | 266 platform_window_delegate_->platform_window()->SetBounds( |
| 239 gfx::Rect(display_configurator_->framebuffer_size())); | 267 gfx::Rect(display_configurator_->framebuffer_size())); |
| 240 #else | 268 #else |
| 241 platform_window_delegate_->platform_window()->SetBounds(gfx::Rect(800, 600)); | 269 platform_window_delegate_->platform_window()->SetBounds(gfx::Rect(800, 600)); |
| 242 #endif | 270 #endif |
| 271 wait_window_resize.Run(); | |
|
dnicoara
2015/01/22 19:23:17
I'm not fine with adding more complexity to platfo
Owen Lin
2015/01/23 08:57:38
I think you're talking the other CL (859943004). B
dnicoara
2015/01/23 15:10:13
The current approach is correct. Platforms have 2
Owen Lin
2015/01/26 07:25:28
Thanks for the explanation. I am kind of understan
| |
| 243 #else | 272 #else |
| 244 #error unknown platform | 273 #error unknown platform |
| 245 #endif | 274 #endif |
| 246 CHECK(window_ != gfx::kNullAcceleratedWidget); | 275 CHECK(window_ != gfx::kNullAcceleratedWidget); |
| 276 } | |
| 277 | |
| 278 void RenderingHelper::TearDown() { | |
| 279 #if defined(OS_WIN) | |
| 280 if (window_) | |
| 281 DestroyWindow(window_); | |
| 282 #elif defined(USE_X11) | |
| 283 // Destroy resources acquired in Initialize, in reverse-acquisition order. | |
| 284 if (window_) { | |
| 285 CHECK(XUnmapWindow(gfx::GetXDisplay(), window_)); | |
| 286 CHECK(XDestroyWindow(gfx::GetXDisplay(), window_)); | |
| 287 } | |
| 288 #elif defined(USE_OZONE) | |
| 289 platform_window_delegate_.reset(); | |
| 290 #if defined(OS_CHROMEOS) | |
| 291 display_configurator_->PrepareForExit(); | |
| 292 display_configurator_.reset(); | |
| 293 #endif | |
| 294 #endif | |
| 295 window_ = gfx::kNullAcceleratedWidget; | |
| 296 } | |
| 297 | |
| 298 void RenderingHelper::Initialize(const RenderingHelperParams& params, | |
| 299 base::WaitableEvent* done) { | |
| 300 // Use videos_.size() != 0 as a proxy for the class having already been | |
| 301 // Initialize()'d, and UnInitialize() before continuing. | |
| 302 if (videos_.size()) { | |
| 303 base::WaitableEvent done(false, false); | |
| 304 UnInitialize(&done); | |
| 305 done.Wait(); | |
| 306 } | |
| 307 | |
| 308 render_task_.Reset( | |
| 309 base::Bind(&RenderingHelper::RenderContent, base::Unretained(this))); | |
| 310 | |
| 311 frame_duration_ = params.rendering_fps > 0 | |
| 312 ? base::TimeDelta::FromSeconds(1) / params.rendering_fps | |
| 313 : base::TimeDelta(); | |
| 314 | |
| 315 render_as_thumbnails_ = params.render_as_thumbnails; | |
| 316 message_loop_ = base::MessageLoop::current(); | |
| 247 | 317 |
| 248 gl_surface_ = gfx::GLSurface::CreateViewGLSurface(window_); | 318 gl_surface_ = gfx::GLSurface::CreateViewGLSurface(window_); |
|
dnicoara
2015/01/22 19:23:17
While reading more of this code I realized this is
| |
| 249 screen_size_ = gl_surface_->GetSize(); | 319 screen_size_ = gl_surface_->GetSize(); |
| 250 | 320 |
| 251 gl_context_ = gfx::GLContext::CreateGLContext( | 321 gl_context_ = gfx::GLContext::CreateGLContext( |
| 252 NULL, gl_surface_.get(), gfx::PreferIntegratedGpu); | 322 NULL, gl_surface_.get(), gfx::PreferIntegratedGpu); |
| 253 CHECK(gl_context_->MakeCurrent(gl_surface_.get())); | 323 CHECK(gl_context_->MakeCurrent(gl_surface_.get())); |
| 254 | 324 |
| 255 CHECK_GT(params.window_sizes.size(), 0U); | 325 CHECK_GT(params.window_sizes.size(), 0U); |
| 256 videos_.resize(params.window_sizes.size()); | 326 videos_.resize(params.window_sizes.size()); |
| 257 LayoutRenderingAreas(params.window_sizes); | 327 LayoutRenderingAreas(params.window_sizes); |
| 258 | 328 |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 422 for (int i = 0; i < warm_up_iterations; ++i) { | 492 for (int i = 0; i < warm_up_iterations; ++i) { |
| 423 RenderTexture(GL_TEXTURE_2D, texture_id); | 493 RenderTexture(GL_TEXTURE_2D, texture_id); |
| 424 gl_surface_->SwapBuffers(); | 494 gl_surface_->SwapBuffers(); |
| 425 } | 495 } |
| 426 glDeleteTextures(1, &texture_id); | 496 glDeleteTextures(1, &texture_id); |
| 427 } | 497 } |
| 428 | 498 |
| 429 void RenderingHelper::UnInitialize(base::WaitableEvent* done) { | 499 void RenderingHelper::UnInitialize(base::WaitableEvent* done) { |
| 430 CHECK_EQ(base::MessageLoop::current(), message_loop_); | 500 CHECK_EQ(base::MessageLoop::current(), message_loop_); |
| 431 | 501 |
| 432 #if defined(USE_OZONE) && defined(OS_CHROMEOS) | |
| 433 display_configurator_->PrepareForExit(); | |
| 434 display_configurator_.reset(); | |
| 435 #endif | |
| 436 | |
| 437 render_task_.Cancel(); | 502 render_task_.Cancel(); |
| 438 | 503 |
| 439 if (render_as_thumbnails_) { | 504 if (render_as_thumbnails_) { |
| 440 glDeleteTextures(1, &thumbnails_texture_id_); | 505 glDeleteTextures(1, &thumbnails_texture_id_); |
| 441 glDeleteFramebuffersEXT(1, &thumbnails_fbo_id_); | 506 glDeleteFramebuffersEXT(1, &thumbnails_fbo_id_); |
| 442 } | 507 } |
| 443 | 508 |
| 444 gl_context_->ReleaseCurrent(gl_surface_.get()); | 509 gl_context_->ReleaseCurrent(gl_surface_.get()); |
| 445 gl_context_ = NULL; | 510 gl_context_ = NULL; |
| 446 gl_surface_ = NULL; | 511 gl_surface_ = NULL; |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 571 void RenderingHelper::Clear() { | 636 void RenderingHelper::Clear() { |
| 572 videos_.clear(); | 637 videos_.clear(); |
| 573 message_loop_ = NULL; | 638 message_loop_ = NULL; |
| 574 gl_context_ = NULL; | 639 gl_context_ = NULL; |
| 575 gl_surface_ = NULL; | 640 gl_surface_ = NULL; |
| 576 | 641 |
| 577 render_as_thumbnails_ = false; | 642 render_as_thumbnails_ = false; |
| 578 frame_count_ = 0; | 643 frame_count_ = 0; |
| 579 thumbnails_fbo_id_ = 0; | 644 thumbnails_fbo_id_ = 0; |
| 580 thumbnails_texture_id_ = 0; | 645 thumbnails_texture_id_ = 0; |
| 581 | |
| 582 #if defined(OS_WIN) | |
| 583 if (window_) | |
| 584 DestroyWindow(window_); | |
| 585 #elif defined(USE_X11) | |
| 586 // Destroy resources acquired in Initialize, in reverse-acquisition order. | |
| 587 if (window_) { | |
| 588 CHECK(XUnmapWindow(gfx::GetXDisplay(), window_)); | |
| 589 CHECK(XDestroyWindow(gfx::GetXDisplay(), window_)); | |
| 590 } | |
| 591 #elif defined(USE_OZONE) | |
| 592 platform_window_delegate_.reset(); | |
| 593 #endif | |
| 594 window_ = gfx::kNullAcceleratedWidget; | |
| 595 } | 646 } |
| 596 | 647 |
| 597 void RenderingHelper::GetThumbnailsAsRGB(std::vector<unsigned char>* rgb, | 648 void RenderingHelper::GetThumbnailsAsRGB(std::vector<unsigned char>* rgb, |
| 598 bool* alpha_solid, | 649 bool* alpha_solid, |
| 599 base::WaitableEvent* done) { | 650 base::WaitableEvent* done) { |
| 600 CHECK(render_as_thumbnails_); | 651 CHECK(render_as_thumbnails_); |
| 601 | 652 |
| 602 const size_t num_pixels = thumbnails_fbo_size_.GetArea(); | 653 const size_t num_pixels = thumbnails_fbo_size_.GetArea(); |
| 603 std::vector<unsigned char> rgba; | 654 std::vector<unsigned char> rgba; |
| 604 rgba.resize(num_pixels * 4); | 655 rgba.resize(num_pixels * 4); |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 782 // When the rendering falls behind, drops frames. | 833 // When the rendering falls behind, drops frames. |
| 783 while (scheduled_render_time_ < target) { | 834 while (scheduled_render_time_ < target) { |
| 784 scheduled_render_time_ += frame_duration_; | 835 scheduled_render_time_ += frame_duration_; |
| 785 DropOneFrameForAllVideos(); | 836 DropOneFrameForAllVideos(); |
| 786 } | 837 } |
| 787 | 838 |
| 788 message_loop_->PostDelayedTask( | 839 message_loop_->PostDelayedTask( |
| 789 FROM_HERE, render_task_.callback(), target - now); | 840 FROM_HERE, render_task_.callback(), target - now); |
| 790 } | 841 } |
| 791 } // namespace content | 842 } // namespace content |
| OLD | NEW |