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

Unified Diff: content/common/gpu/media/rendering_helper.cc

Issue 1057013002: Make sure RenderingHelper doesn't allocate a window of size 0x0 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix-vda-tests
Patch Set: . Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/media/rendering_helper.cc
diff --git a/content/common/gpu/media/rendering_helper.cc b/content/common/gpu/media/rendering_helper.cc
index 5a499ff02a878e9da27fb4e7f522e94411bed142..26d91244a6e53e8aed72c71b62abccd14445681b 100644
--- a/content/common/gpu/media/rendering_helper.cc
+++ b/content/common/gpu/media/rendering_helper.cc
@@ -240,6 +240,7 @@ void RenderingHelper::Setup() {
platform_window_delegate_.reset(new RenderingHelper::StubOzoneDelegate());
window_ = platform_window_delegate_->accelerated_widget();
+ gfx::Size window_size(800, 600);
#if defined(OS_CHROMEOS)
// We hold onto the main loop here to wait for the DisplayController
// to give us the size of the display so we can create a window of
@@ -255,11 +256,12 @@ void RenderingHelper::Setup() {
wait_display_setup.Run();
display_configurator_->RemoveObserver(&display_setup_observer);
- platform_window_delegate_->platform_window()->SetBounds(
- gfx::Rect(display_configurator_->framebuffer_size()));
-#else
- platform_window_delegate_->platform_window()->SetBounds(gfx::Rect(800, 600));
+ gfx::Size framebuffer_size = display_configurator_->framebuffer_size();
+ if (!framebuffer_size.IsEmpty())
+ window_size = framebuffer_size;
#endif
+ platform_window_delegate_->platform_window()->SetBounds(
+ gfx::Rect(window_size));
// On Ozone/DRI, platform windows are associated with the physical
// outputs. Association is achieved by matching the bounds of the
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698