| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "ui/ozone/platform/drm/gpu/gbm_surfaceless.h" | 5 #include "ui/ozone/platform/drm/gpu/gbm_surfaceless.h" |
| 6 | 6 |
| 7 #include "ui/ozone/platform/drm/gpu/drm_device.h" | 7 #include "ui/ozone/platform/drm/gpu/drm_device.h" |
| 8 #include "ui/ozone/platform/drm/gpu/drm_vsync_provider.h" | 8 #include "ui/ozone/platform/drm/gpu/drm_vsync_provider.h" |
| 9 #include "ui/ozone/platform/drm/gpu/drm_window_proxy.h" | 9 #include "ui/ozone/platform/drm/gpu/drm_window_proxy.h" |
| 10 #include "ui/ozone/platform/drm/gpu/gbm_surface_factory.h" | 10 #include "ui/ozone/platform/drm/gpu/gbm_surface_factory.h" |
| 11 #include "ui/ozone/platform/drm/gpu/scanout_buffer.h" | 11 #include "ui/ozone/platform/drm/gpu/scanout_buffer.h" |
| 12 | 12 |
| 13 namespace ui { | 13 namespace ui { |
| 14 | 14 |
| 15 GbmSurfaceless::GbmSurfaceless(scoped_ptr<DrmWindowProxy> window, | 15 GbmSurfaceless::GbmSurfaceless(scoped_ptr<DrmWindowProxy> window, |
| 16 GbmSurfaceFactory* surface_manager) | 16 GbmSurfaceFactory* surface_manager) |
| 17 : window_(window.Pass()), surface_manager_(surface_manager) { | 17 : window_(std::move(window)), surface_manager_(surface_manager) { |
| 18 surface_manager_->RegisterSurface(window_->widget(), this); | 18 surface_manager_->RegisterSurface(window_->widget(), this); |
| 19 } | 19 } |
| 20 | 20 |
| 21 GbmSurfaceless::~GbmSurfaceless() { | 21 GbmSurfaceless::~GbmSurfaceless() { |
| 22 surface_manager_->UnregisterSurface(window_->widget()); | 22 surface_manager_->UnregisterSurface(window_->widget()); |
| 23 } | 23 } |
| 24 | 24 |
| 25 void GbmSurfaceless::QueueOverlayPlane(const OverlayPlane& plane) { | 25 void GbmSurfaceless::QueueOverlayPlane(const OverlayPlane& plane) { |
| 26 planes_.push_back(plane); | 26 planes_.push_back(plane); |
| 27 } | 27 } |
| (...skipping 20 matching lines...) Expand all Loading... |
| 48 | 48 |
| 49 scoped_ptr<gfx::VSyncProvider> GbmSurfaceless::CreateVSyncProvider() { | 49 scoped_ptr<gfx::VSyncProvider> GbmSurfaceless::CreateVSyncProvider() { |
| 50 return make_scoped_ptr(new DrmVSyncProvider(window_.get())); | 50 return make_scoped_ptr(new DrmVSyncProvider(window_.get())); |
| 51 } | 51 } |
| 52 | 52 |
| 53 bool GbmSurfaceless::IsUniversalDisplayLinkDevice() { | 53 bool GbmSurfaceless::IsUniversalDisplayLinkDevice() { |
| 54 return planes_.empty() ? false : planes_[0].buffer->RequiresGlFinish(); | 54 return planes_.empty() ? false : planes_[0].buffer->RequiresGlFinish(); |
| 55 } | 55 } |
| 56 | 56 |
| 57 } // namespace ui | 57 } // namespace ui |
| OLD | NEW |