Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Side by Side Diff: content/common/gpu/media/rendering_helper.cc

Issue 995103002: Fix video_decode_accelerator_unittest build on non-CrOS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: s/ChromeOS/Chrome OS/ Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/common/gpu/media/DEPS ('k') | ui/display/chromeos/display_configurator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 22 matching lines...) Expand all
33 #include "ui/gl/gl_surface_glx.h" 33 #include "ui/gl/gl_surface_glx.h"
34 #define GL_VARIANT_GLX 1 34 #define GL_VARIANT_GLX 1
35 #else 35 #else
36 #include "ui/gl/gl_surface_egl.h" 36 #include "ui/gl/gl_surface_egl.h"
37 #define GL_VARIANT_EGL 1 37 #define GL_VARIANT_EGL 1
38 #endif 38 #endif
39 39
40 #if defined(USE_OZONE) 40 #if defined(USE_OZONE)
41 #if defined(OS_CHROMEOS) 41 #if defined(OS_CHROMEOS)
42 #include "ui/display/chromeos/display_configurator.h" 42 #include "ui/display/chromeos/display_configurator.h"
43 #include "ui/display/types/native_display_delegate.h"
43 #endif // defined(OS_CHROMEOS) 44 #endif // defined(OS_CHROMEOS)
44 #include "ui/ozone/public/ozone_platform.h" 45 #include "ui/ozone/public/ozone_platform.h"
45 #include "ui/platform_window/platform_window.h" 46 #include "ui/platform_window/platform_window.h"
46 #include "ui/platform_window/platform_window_delegate.h" 47 #include "ui/platform_window/platform_window_delegate.h"
47 #endif // defined(USE_OZONE) 48 #endif // defined(USE_OZONE)
48 49
49 // Helper for Shader creation. 50 // Helper for Shader creation.
50 static void CreateShader(GLuint program, 51 static void CreateShader(GLuint program,
51 GLenum type, 52 GLenum type,
52 const char* source, 53 const char* source,
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 240
240 platform_window_delegate_.reset(new RenderingHelper::StubOzoneDelegate()); 241 platform_window_delegate_.reset(new RenderingHelper::StubOzoneDelegate());
241 window_ = platform_window_delegate_->accelerated_widget(); 242 window_ = platform_window_delegate_->accelerated_widget();
242 #if defined(OS_CHROMEOS) 243 #if defined(OS_CHROMEOS)
243 // We hold onto the main loop here to wait for the DisplayController 244 // We hold onto the main loop here to wait for the DisplayController
244 // to give us the size of the display so we can create a window of 245 // to give us the size of the display so we can create a window of
245 // the same size. 246 // the same size.
246 base::RunLoop wait_display_setup; 247 base::RunLoop wait_display_setup;
247 DisplayConfiguratorObserver display_setup_observer(&wait_display_setup); 248 DisplayConfiguratorObserver display_setup_observer(&wait_display_setup);
248 display_configurator_.reset(new ui::DisplayConfigurator()); 249 display_configurator_.reset(new ui::DisplayConfigurator());
250 display_configurator_->SetDelegateForTesting(0);
249 display_configurator_->AddObserver(&display_setup_observer); 251 display_configurator_->AddObserver(&display_setup_observer);
250 display_configurator_->Init(true); 252 display_configurator_->Init(true);
251 display_configurator_->ForceInitialConfigure(0); 253 display_configurator_->ForceInitialConfigure(0);
252 // Make sure all the display configuration is applied. 254 // Make sure all the display configuration is applied.
253 wait_display_setup.Run(); 255 wait_display_setup.Run();
254 display_configurator_->RemoveObserver(&display_setup_observer); 256 display_configurator_->RemoveObserver(&display_setup_observer);
255 257
256 platform_window_delegate_->platform_window()->SetBounds( 258 platform_window_delegate_->platform_window()->SetBounds(
257 gfx::Rect(display_configurator_->framebuffer_size())); 259 gfx::Rect(display_configurator_->framebuffer_size()));
258 #else 260 #else
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
844 // When the rendering falls behind, drops frames. 846 // When the rendering falls behind, drops frames.
845 while (scheduled_render_time_ < target) { 847 while (scheduled_render_time_ < target) {
846 scheduled_render_time_ += frame_duration_; 848 scheduled_render_time_ += frame_duration_;
847 DropOneFrameForAllVideos(); 849 DropOneFrameForAllVideos();
848 } 850 }
849 851
850 message_loop_->PostDelayedTask( 852 message_loop_->PostDelayedTask(
851 FROM_HERE, render_task_.callback(), target - now); 853 FROM_HERE, render_task_.callback(), target - now);
852 } 854 }
853 } // namespace content 855 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/media/DEPS ('k') | ui/display/chromeos/display_configurator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698