Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Side by Side Diff: ui/ozone/public/native_pixmap_manager.h

Issue 1128113011: ozone: Introduce ClientPixmap and ClientPixmapFactory for non-GPU processes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase to crrev.com/1258713002 Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/ozone/public/native_pixmap.h ('k') | ui/ozone/public/native_pixmap_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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/native_pixmap.h"
12 #include "ui/ozone/public/surface_factory_ozone.h"
13
14 namespace base {
15
16 struct FileDescriptor;
17
18 } // namespace base
19
20 namespace ui {
21
22 // The Ozone interface allows external implementations to hook into Chromium to
23 // provide a native pixmap for non-GPU processes.
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
31 virtual ~NativePixmapManager();
32
33 struct Configuration {
34 SurfaceFactoryOzone::BufferFormat format;
35 SurfaceFactoryOzone::BufferUsage usage;
36 };
37
38 // Gets supported format/usage configurations.
39 virtual std::vector<Configuration> GetSupportedNativePixmapConfigurations()
40 const = 0;
41
42 // TODO(dshwang): implement it. crbug.com/475633
43 // Import the native pixmap from |handle| to be used in non-GPU processes.
44 virtual scoped_refptr<NativePixmap> ImportNativePixmap(
45 base::FileDescriptor handle,
reveman 2015/07/28 18:07:57 nit: const base::FileDescriptor& handle
46 gfx::Size size,
reveman 2015/07/28 18:07:57 nit: const gfx::Size& size
47 SurfaceFactoryOzone::BufferFormat format,
48 SurfaceFactoryOzone::BufferUsage usage) = 0;
49
50 protected:
51 NativePixmapManager();
52
53 private:
54 DISALLOW_COPY_AND_ASSIGN(NativePixmapManager);
55 };
56
57 } // namespace ui
58
59 #endif // UI_OZONE_PUBLIC_NATIVE_PIXMAP_MANAGER_H_
OLDNEW
« no previous file with comments | « ui/ozone/public/native_pixmap.h ('k') | ui/ozone/public/native_pixmap_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698