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 "content/common/gpu/native_pixmap_manager_ozone_messages.h" | 8 #include "content/common/gpu/native_pixmap_manager_ozone_messages.h" |
9 | 9 |
10 namespace content { | 10 namespace content { |
(...skipping 25 matching lines...) Expand all Loading... |
36 void ChildNativePixmapManager::Initialize( | 36 void ChildNativePixmapManager::Initialize( |
37 const base::FileDescriptor& device_fd) { | 37 const base::FileDescriptor& device_fd) { |
38 pixmap_manager_ = ui::NativePixmapManager::Create(device_fd); | 38 pixmap_manager_ = ui::NativePixmapManager::Create(device_fd); |
39 } | 39 } |
40 | 40 |
41 std::vector<ui::NativePixmapManager::Configuration> | 41 std::vector<ui::NativePixmapManager::Configuration> |
42 ChildNativePixmapManager::GetSupportedNativePixmapConfigurations() const { | 42 ChildNativePixmapManager::GetSupportedNativePixmapConfigurations() const { |
43 return pixmap_manager_->GetSupportedNativePixmapConfigurations(); | 43 return pixmap_manager_->GetSupportedNativePixmapConfigurations(); |
44 } | 44 } |
45 | 45 |
| 46 scoped_refptr<ui::NativePixmap> |
| 47 ChildNativePixmapManager::CreateFromFileDescriptor( |
| 48 base::FileDescriptor handle, |
| 49 gfx::Size size, |
| 50 ui::SurfaceFactoryOzone::BufferFormat format, |
| 51 ui::SurfaceFactoryOzone::BufferUsage usage) { |
| 52 return pixmap_manager_->CreateFromFileDescriptor(handle, size, format, usage); |
| 53 } |
| 54 |
46 } // namespace content | 55 } // namespace content |
OLD | NEW |