| 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/test/test_native_pixmap_manager_ozone.h" | 5 #include "content/test/test_native_pixmap_manager_ozone.h" |
| 6 | 6 |
| 7 #include "base/memory/singleton.h" | 7 #include "base/memory/singleton.h" |
| 8 #include "base/posix/eintr_wrapper.h" | 8 #include "base/posix/eintr_wrapper.h" |
| 9 #include "ui/ozone/public/ozone_platform.h" | 9 #include "ui/ozone/public/ozone_platform.h" |
| 10 | 10 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 const base::FileDescriptor& device_fd) { | 35 const base::FileDescriptor& device_fd) { |
| 36 pixmap_manager_ = ui::NativePixmapManager::Create(device_fd); | 36 pixmap_manager_ = ui::NativePixmapManager::Create(device_fd); |
| 37 device_fd_ = device_fd; | 37 device_fd_ = device_fd; |
| 38 } | 38 } |
| 39 | 39 |
| 40 std::vector<ui::NativePixmapManager::Configuration> | 40 std::vector<ui::NativePixmapManager::Configuration> |
| 41 TestNativePixmapManager::GetSupportedNativePixmapConfigurations() const { | 41 TestNativePixmapManager::GetSupportedNativePixmapConfigurations() const { |
| 42 return pixmap_manager_->GetSupportedNativePixmapConfigurations(); | 42 return pixmap_manager_->GetSupportedNativePixmapConfigurations(); |
| 43 } | 43 } |
| 44 | 44 |
| 45 scoped_refptr<ui::NativePixmap> |
| 46 TestNativePixmapManager::CreateFromFileDescriptor( |
| 47 base::FileDescriptor handle, |
| 48 gfx::Size size, |
| 49 ui::SurfaceFactoryOzone::BufferFormat format, |
| 50 ui::SurfaceFactoryOzone::BufferUsage usage) { |
| 51 return pixmap_manager_->CreateFromFileDescriptor(handle, size, format, usage); |
| 52 } |
| 53 |
| 45 } // namespace content | 54 } // namespace content |
| OLD | NEW |