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 "ui/ozone/public/native_pixmap_manager.h" | 5 #include "ui/ozone/public/native_pixmap_manager.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/trace_event/trace_event.h" | 9 #include "base/trace_event/trace_event.h" |
10 #include "ui/ozone/platform_object.h" | 10 #include "ui/ozone/platform_object.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 StubNativePixmapManager() {} | 21 StubNativePixmapManager() {} |
22 ~StubNativePixmapManager() override {} | 22 ~StubNativePixmapManager() override {} |
23 | 23 |
24 void Initialize(const base::FileDescriptor& device_fd) override {} | 24 void Initialize(const base::FileDescriptor& device_fd) override {} |
25 | 25 |
26 std::vector<Configuration> GetSupportedNativePixmapConfigurations() | 26 std::vector<Configuration> GetSupportedNativePixmapConfigurations() |
27 const override { | 27 const override { |
28 return std::vector<Configuration>(); | 28 return std::vector<Configuration>(); |
29 } | 29 } |
30 | 30 |
| 31 scoped_refptr<NativePixmap> CreateFromFileDescriptor( |
| 32 base::FileDescriptor handle, |
| 33 gfx::Size size, |
| 34 SurfaceFactoryOzone::BufferFormat format, |
| 35 SurfaceFactoryOzone::BufferUsage usage) override { |
| 36 return nullptr; |
| 37 } |
| 38 |
31 private: | 39 private: |
32 DISALLOW_COPY_AND_ASSIGN(StubNativePixmapManager); | 40 DISALLOW_COPY_AND_ASSIGN(StubNativePixmapManager); |
33 }; | 41 }; |
34 | 42 |
35 } // namespace | 43 } // namespace |
36 | 44 |
37 // static | 45 // static |
38 scoped_ptr<NativePixmapManager> NativePixmapManager::Create( | 46 scoped_ptr<NativePixmapManager> NativePixmapManager::Create( |
39 const base::FileDescriptor& device_fd) { | 47 const base::FileDescriptor& device_fd) { |
40 TRACE_EVENT1("ozone", "NativePixmapManager::Create", "platform", | 48 TRACE_EVENT1("ozone", "NativePixmapManager::Create", "platform", |
41 GetOzonePlatformName()); | 49 GetOzonePlatformName()); |
42 scoped_ptr<NativePixmapManager> manager = | 50 scoped_ptr<NativePixmapManager> manager = |
43 PlatformObject<NativePixmapManager>::Create(); | 51 PlatformObject<NativePixmapManager>::Create(); |
44 manager->Initialize(device_fd); | 52 manager->Initialize(device_fd); |
45 return manager.Pass(); | 53 return manager.Pass(); |
46 } | 54 } |
47 | 55 |
48 NativePixmapManager::NativePixmapManager() { | 56 NativePixmapManager::NativePixmapManager() { |
49 } | 57 } |
50 | 58 |
51 NativePixmapManager::~NativePixmapManager() { | 59 NativePixmapManager::~NativePixmapManager() { |
52 } | 60 } |
53 | 61 |
54 NativePixmapManager* CreateStubNativePixmapManager() { | 62 NativePixmapManager* CreateStubNativePixmapManager() { |
55 return new StubNativePixmapManager; | 63 return new StubNativePixmapManager; |
56 } | 64 } |
57 | 65 |
58 } // namespace ui | 66 } // namespace ui |
OLD | NEW |