| 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 "media/gpu/rendering_helper.h" | 5 #include "media/gpu/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 <memory> |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 #include "ui/gl/gl_context.h" | 25 #include "ui/gl/gl_context.h" |
| 26 #include "ui/gl/gl_implementation.h" | 26 #include "ui/gl/gl_implementation.h" |
| 27 #include "ui/gl/gl_surface.h" | 27 #include "ui/gl/gl_surface.h" |
| 28 #include "ui/gl/init/gl_factory.h" | 28 #include "ui/gl/init/gl_factory.h" |
| 29 | 29 |
| 30 #if defined(OS_WIN) | 30 #if defined(OS_WIN) |
| 31 #include <windows.h> | 31 #include <windows.h> |
| 32 #endif | 32 #endif |
| 33 | 33 |
| 34 #if defined(USE_X11) | 34 #if defined(USE_X11) |
| 35 #include "ui/gfx/x/x11_types.h" | 35 #include "ui/gfx/x/x11_types.h" // nogncheck |
| 36 #endif | 36 #endif |
| 37 | 37 |
| 38 #if defined(ARCH_CPU_X86_FAMILY) && defined(USE_X11) | 38 #if defined(ARCH_CPU_X86_FAMILY) && defined(USE_X11) |
| 39 #include "ui/gl/gl_surface_glx.h" | 39 #include "ui/gl/gl_surface_glx.h" |
| 40 #define GL_VARIANT_GLX 1 | 40 #define GL_VARIANT_GLX 1 |
| 41 #else | 41 #else |
| 42 #include "ui/gl/gl_surface_egl.h" | 42 #include "ui/gl/gl_surface_egl.h" |
| 43 #define GL_VARIANT_EGL 1 | 43 #define GL_VARIANT_EGL 1 |
| 44 #endif | 44 #endif |
| 45 | 45 |
| (...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 872 // When the rendering falls behind, drops frames. | 872 // When the rendering falls behind, drops frames. |
| 873 while (scheduled_render_time_ < target) { | 873 while (scheduled_render_time_ < target) { |
| 874 scheduled_render_time_ += frame_duration_; | 874 scheduled_render_time_ += frame_duration_; |
| 875 DropOneFrameForAllVideos(); | 875 DropOneFrameForAllVideos(); |
| 876 } | 876 } |
| 877 | 877 |
| 878 message_loop_->PostDelayedTask(FROM_HERE, render_task_.callback(), | 878 message_loop_->PostDelayedTask(FROM_HERE, render_task_.callback(), |
| 879 target - now); | 879 target - now); |
| 880 } | 880 } |
| 881 } // namespace media | 881 } // namespace media |
| OLD | NEW |