OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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/child/child_native_pixmap_manager_ozone.h" | 5 #include "content/child/child_native_pixmap_manager_ozone.h" |
6 | 6 |
7 #include "base/file_descriptor_posix.h" | 7 #include "base/file_descriptor_posix.h" |
8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
9 #include "base/synchronization/lock.h" | 9 #include "base/synchronization/lock.h" |
10 #include "content/common/gpu/native_pixmap_manager_ozone_messages.h" | 10 #include "content/common/gpu/native_pixmap_manager_ozone_messages.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 void ChildNativePixmapManager::Initialize( | 48 void ChildNativePixmapManager::Initialize( |
49 const base::FileDescriptor& device_fd) { | 49 const base::FileDescriptor& device_fd) { |
50 pixmap_manager_ = ui::NativePixmapManager::Create(device_fd); | 50 pixmap_manager_ = ui::NativePixmapManager::Create(device_fd); |
51 } | 51 } |
52 | 52 |
53 std::vector<ui::NativePixmapManager::Configuration> | 53 std::vector<ui::NativePixmapManager::Configuration> |
54 ChildNativePixmapManager::GetSupportedNativePixmapConfigurations() const { | 54 ChildNativePixmapManager::GetSupportedNativePixmapConfigurations() const { |
55 return pixmap_manager_->GetSupportedNativePixmapConfigurations(); | 55 return pixmap_manager_->GetSupportedNativePixmapConfigurations(); |
56 } | 56 } |
57 | 57 |
| 58 scoped_refptr<ui::NativePixmap> |
| 59 ChildNativePixmapManager::CreateFromFileDescriptor( |
| 60 base::FileDescriptor handle, |
| 61 gfx::Size size, |
| 62 ui::SurfaceFactoryOzone::BufferFormat format, |
| 63 ui::SurfaceFactoryOzone::BufferUsage usage) { |
| 64 return pixmap_manager_->CreateFromFileDescriptor(handle, size, format, usage); |
| 65 } |
| 66 |
58 } // namespace content | 67 } // namespace content |
OLD | NEW |