| Index: ui/gfx/ozone/dri/dri_surface_factory.cc
|
| diff --git a/ui/gfx/ozone/dri/dri_surface_factory.cc b/ui/gfx/ozone/dri/dri_surface_factory.cc
|
| index 911d341634a728e8de1186fc2b93a3b5c274c7be..7854f1cdafeec4c5aecb21f37bb132689ee497f7 100644
|
| --- a/ui/gfx/ozone/dri/dri_surface_factory.cc
|
| +++ b/ui/gfx/ozone/dri/dri_surface_factory.cc
|
| @@ -26,7 +26,8 @@ namespace {
|
| const char kDefaultGraphicsCardPath[] = "/dev/dri/card0";
|
| const char kDPMSProperty[] = "DPMS";
|
|
|
| -const gfx::AcceleratedWidget kDefaultWidgetHandle = 1;
|
| +const gfx::AcceleratedWidget kDefaultWidgetHandle =
|
| + kDefaultAcceleratedWidgetForSingleWindow;
|
|
|
| // TODO(dnicoara) Read the cursor plane size from the hardware.
|
| const gfx::Size kCursorSize(64, 64);
|
| @@ -178,6 +179,12 @@ DriSurfaceFactory::InitializeHardware() {
|
| return state_;
|
| }
|
|
|
| + // TODO(dnicoara) When there's more information on which display we want,
|
| + // then we can return the widget associated with the display.
|
| + // For now just assume we have 1 display device and return it.
|
| + if (!controller_.get())
|
| + controller_.reset(new HardwareDisplayController());
|
| +
|
| state_ = INITIALIZED;
|
| return state_;
|
| }
|
| @@ -194,12 +201,6 @@ void DriSurfaceFactory::ShutdownHardware() {
|
| gfx::AcceleratedWidget DriSurfaceFactory::GetAcceleratedWidget() {
|
| CHECK(state_ != FAILED);
|
|
|
| - // TODO(dnicoara) When there's more information on which display we want,
|
| - // then we can return the widget associated with the display.
|
| - // For now just assume we have 1 display device and return it.
|
| - if (!controller_.get())
|
| - controller_.reset(new HardwareDisplayController());
|
| -
|
| // TODO(dnicoara) We only have 1 display for now, so only 1 AcceleratedWidget.
|
| // When we'll support multiple displays this needs to be changed to return a
|
| // different handle for every display.
|
|
|