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 #ifndef UI_OZONE_PUBLIC_NATIVE_PIXMAP_MANAGER_H_ | |
6 #define UI_OZONE_PUBLIC_NATIVE_PIXMAP_MANAGER_H_ | |
7 | |
8 #include <vector> | |
9 | |
10 #include "ui/ozone/ozone_export.h" | |
11 #include "ui/ozone/public/surface_factory_ozone.h" | |
12 | |
13 namespace base { | |
14 | |
15 struct FileDescriptor; | |
16 | |
17 } // namespace base | |
18 | |
19 namespace ui { | |
20 | |
21 // The Ozone interface allows external implementations to hook into Chromium to | |
22 // provide the handle of a system specific surface implementation for Browser | |
23 // and Render process. | |
reveman
2015/07/22 16:59:55
system specific surface implementation?
dshwang
2015/07/23 14:02:28
s/system specific surface implementation/native su
| |
24 class OZONE_EXPORT NativePixmapManager { | |
25 public: | |
26 static NativePixmapManager* GetInstance(); | |
27 static void SetInstance(NativePixmapManager* instance); | |
28 | |
29 static scoped_ptr<NativePixmapManager> Create( | |
30 const base::FileDescriptor& device_fd); | |
31 | |
32 virtual ~NativePixmapManager(); | |
33 | |
34 struct Configuration { | |
35 SurfaceFactoryOzone::BufferFormat format; | |
36 SurfaceFactoryOzone::BufferUsage usage; | |
37 }; | |
38 | |
39 // Gets supported format/usage configurations. | |
40 virtual std::vector<Configuration> GetSupportedNativePixmapConfigurations() | |
41 const = 0; | |
42 | |
43 protected: | |
44 NativePixmapManager(); | |
45 | |
46 virtual void Initialize(const base::FileDescriptor& device_fd) = 0; | |
reveman
2015/07/22 16:59:55
do you really need this when you have the static f
dshwang
2015/07/23 14:02:28
It's needed for next CL. I move this to next CL.
| |
47 | |
48 private: | |
49 DISALLOW_COPY_AND_ASSIGN(NativePixmapManager); | |
50 }; | |
51 | |
52 // Platforms which don't need to share native pixmap use this. | |
53 NativePixmapManager* CreateStubNativePixmapManager(); | |
reveman
2015/07/22 16:59:55
Does this deserve it's own file? Who owns the poin
dshwang
2015/07/23 14:02:28
Make sense. I move it to ui/ozone/common/stub_nati
| |
54 | |
55 } // namespace ui | |
56 | |
57 #endif // UI_OZONE_PUBLIC_NATIVE_PIXMAP_MANAGER_H_ | |
OLD | NEW |