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

Side by Side Diff: ui/ozone/public/client_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: addressed nits 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
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_CLIENT_NATIVE_PIXMAP_MANAGER_H_
6 #define UI_OZONE_PUBLIC_CLIENT_NATIVE_PIXMAP_MANAGER_H_
7
8 #include <vector>
9
10 #include "base/memory/scoped_ptr.h"
11 #include "ui/gfx/geometry/size.h"
12 #include "ui/ozone/ozone_export.h"
13 #include "ui/ozone/public/client_native_pixmap.h"
14 #include "ui/ozone/public/native_pixmap_types.h"
15
16 namespace base {
17
18 struct FileDescriptor;
19
20 } // namespace base
21
22 namespace ui {
23
24 // The Ozone interface allows external implementations to hook into Chromium to
25 // provide a client pixmap for non-GPU processes.
26 class OZONE_EXPORT ClientNativePixmapManager {
spang 2015/08/01 02:14:56 I know this is a bit burdensome, but can you name
reveman 2015/08/01 03:03:13 sgtm
dshwang 2015/08/03 12:51:48 Done.
27 public:
28 static ClientNativePixmapManager* GetInstance();
29 static void SetInstance(ClientNativePixmapManager* instance);
30
31 static scoped_ptr<ClientNativePixmapManager> Create();
32
33 virtual ~ClientNativePixmapManager();
34
35 struct Configuration {
36 NativePixmapFormat format;
37 NativePixmapUsage usage;
38 };
39
40 // Gets supported format/usage configurations.
41 virtual std::vector<Configuration> GetSupportedConfigurations() const = 0;
spang 2015/08/01 02:14:56 I don't think it belongs here. The client doesn't
reveman 2015/08/01 03:03:13 +1
dshwang 2015/08/03 12:51:48 That makes sense but it requires huge change. Note
spang 2015/08/03 18:24:51 Ah, ok, I see your point about selecting native vs
42
43 // TODO(dshwang): implement it. crbug.com/475633
44 // Import the native pixmap from |handle| to be used in non-GPU processes.
45 virtual scoped_ptr<ClientNativePixmap> ImportNativePixmap(
46 const base::FileDescriptor& handle,
47 const gfx::Size& size,
48 NativePixmapFormat format,
49 NativePixmapUsage usage) = 0;
50
51 protected:
52 ClientNativePixmapManager();
53
54 private:
55 DISALLOW_COPY_AND_ASSIGN(ClientNativePixmapManager);
56 };
57
58 } // namespace ui
59
60 #endif // UI_OZONE_PUBLIC_CLIENT_NATIVE_PIXMAP_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698