| 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 29 matching lines...) Expand all  Loading... | 
|   40 #if defined(ARCH_CPU_X86_FAMILY) && defined(USE_X11) |   40 #if defined(ARCH_CPU_X86_FAMILY) && defined(USE_X11) | 
|   41 #include "ui/gl/gl_surface_glx.h" |   41 #include "ui/gl/gl_surface_glx.h" | 
|   42 #define GL_VARIANT_GLX 1 |   42 #define GL_VARIANT_GLX 1 | 
|   43 #else |   43 #else | 
|   44 #include "ui/gl/gl_surface_egl.h" |   44 #include "ui/gl/gl_surface_egl.h" | 
|   45 #define GL_VARIANT_EGL 1 |   45 #define GL_VARIANT_EGL 1 | 
|   46 #endif |   46 #endif | 
|   47  |   47  | 
|   48 #if defined(USE_OZONE) |   48 #if defined(USE_OZONE) | 
|   49 #if defined(OS_CHROMEOS) |   49 #if defined(OS_CHROMEOS) | 
|   50 #include "ui/display/chromeos/display_configurator.h" |   50 #include "ui/display/manager/chromeos/display_configurator.h" | 
|   51 #include "ui/display/types/native_display_delegate.h" |   51 #include "ui/display/types/native_display_delegate.h" | 
|   52 #endif  // defined(OS_CHROMEOS) |   52 #endif  // defined(OS_CHROMEOS) | 
|   53 #include "ui/ozone/public/ozone_platform.h" |   53 #include "ui/ozone/public/ozone_platform.h" | 
|   54 #include "ui/platform_window/platform_window.h" |   54 #include "ui/platform_window/platform_window.h" | 
|   55 #include "ui/platform_window/platform_window_delegate.h" |   55 #include "ui/platform_window/platform_window_delegate.h" | 
|   56 #endif  // defined(USE_OZONE) |   56 #endif  // defined(USE_OZONE) | 
|   57  |   57  | 
|   58 // Helper for Shader creation. |   58 // Helper for Shader creation. | 
|   59 static void CreateShader(GLuint program, |   59 static void CreateShader(GLuint program, | 
|   60                          GLenum type, |   60                          GLenum type, | 
| (...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  888   // When the rendering falls behind, drops frames. |  888   // When the rendering falls behind, drops frames. | 
|  889   while (scheduled_render_time_ < target) { |  889   while (scheduled_render_time_ < target) { | 
|  890     scheduled_render_time_ += frame_duration_; |  890     scheduled_render_time_ += frame_duration_; | 
|  891     DropOneFrameForAllVideos(); |  891     DropOneFrameForAllVideos(); | 
|  892   } |  892   } | 
|  893  |  893  | 
|  894   task_runner_->PostDelayedTask(FROM_HERE, render_task_.callback(), |  894   task_runner_->PostDelayedTask(FROM_HERE, render_task_.callback(), | 
|  895                                 target - now); |  895                                 target - now); | 
|  896 } |  896 } | 
|  897 }  // namespace media |  897 }  // namespace media | 
| OLD | NEW |