OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "ui/ozone/platform/drm/common/native_pixmap_manager_gbm.h" |
| 6 |
| 7 #include "base/file_descriptor_posix.h" |
| 8 |
| 9 namespace ui { |
| 10 |
| 11 NativePixmapManager* CreateNativePixmapManagerGbm() { |
| 12 return new NativePixmapManagerGbm(); |
| 13 } |
| 14 |
| 15 NativePixmapManagerGbm::NativePixmapManagerGbm() { |
| 16 } |
| 17 |
| 18 NativePixmapManagerGbm::~NativePixmapManagerGbm() { |
| 19 } |
| 20 |
| 21 void NativePixmapManagerGbm::Initialize(const base::FileDescriptor& device_fd) { |
| 22 DCHECK_EQ(vgem_fd_.get(), -1); |
| 23 if (device_fd.fd > 0) |
| 24 vgem_fd_.reset(device_fd.fd); |
| 25 } |
| 26 |
| 27 std::vector<NativePixmapManager::Configuration> |
| 28 NativePixmapManagerGbm::GetSupportedNativePixmapConfigurations() const { |
| 29 std::vector<Configuration> configurations = { |
| 30 {SurfaceFactoryOzone::BGRA_8888, SurfaceFactoryOzone::SCANOUT}, |
| 31 {SurfaceFactoryOzone::RGBX_8888, SurfaceFactoryOzone::SCANOUT}}; |
| 32 return configurations; |
| 33 } |
| 34 |
| 35 } // namespace ui |
OLD | NEW |