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

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

Issue 1262043002: Implement DRM Native Pixmap using prime buffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@new-master
Patch Set: remove drm header Created 4 years, 9 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/platform/x11/ozone_platform_x11.cc ('k') | ui/ozone/public/ozone_platform.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef UI_OZONE_PUBLIC_CLIENT_NATIVE_PIXMAP_FACTORY_H_ 5 #ifndef UI_OZONE_PUBLIC_CLIENT_NATIVE_PIXMAP_FACTORY_H_
6 #define UI_OZONE_PUBLIC_CLIENT_NATIVE_PIXMAP_FACTORY_H_ 6 #define UI_OZONE_PUBLIC_CLIENT_NATIVE_PIXMAP_FACTORY_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/files/scoped_file.h" 10 #include "base/files/scoped_file.h"
(...skipping 14 matching lines...) Expand all
25 // provide a client pixmap for non-GPU processes. 25 // provide a client pixmap for non-GPU processes.
26 class OZONE_EXPORT ClientNativePixmapFactory { 26 class OZONE_EXPORT ClientNativePixmapFactory {
27 public: 27 public:
28 static ClientNativePixmapFactory* GetInstance(); 28 static ClientNativePixmapFactory* GetInstance();
29 static void SetInstance(ClientNativePixmapFactory* instance); 29 static void SetInstance(ClientNativePixmapFactory* instance);
30 30
31 static scoped_ptr<ClientNativePixmapFactory> Create(); 31 static scoped_ptr<ClientNativePixmapFactory> Create();
32 32
33 virtual ~ClientNativePixmapFactory(); 33 virtual ~ClientNativePixmapFactory();
34 34
35 // Initialize with the given client native pixmap |device_fd|.
36 virtual void Initialize(base::ScopedFD device_fd) = 0;
37
38 // Returns true if format/usage configuration is supported. 35 // Returns true if format/usage configuration is supported.
39 virtual bool IsConfigurationSupported(gfx::BufferFormat format, 36 virtual bool IsConfigurationSupported(gfx::BufferFormat format,
40 gfx::BufferUsage usage) const = 0; 37 gfx::BufferUsage usage) const = 0;
41 38
42 // TODO(dshwang): implement it. crbug.com/475633 39 // TODO(dshwang): implement it. crbug.com/475633
43 // Import the native pixmap from |handle| to be used in non-GPU processes. 40 // Import the native pixmap from |handle| to be used in non-GPU processes.
44 // This function takes ownership of any file descriptors in |handle|. 41 // This function takes ownership of any file descriptors in |handle|.
45 virtual scoped_ptr<ClientNativePixmap> ImportFromHandle( 42 virtual scoped_ptr<ClientNativePixmap> ImportFromHandle(
46 const gfx::NativePixmapHandle& handle, 43 const gfx::NativePixmapHandle& handle,
47 const gfx::Size& size, 44 const gfx::Size& size,
48 gfx::BufferUsage usage) = 0; 45 gfx::BufferUsage usage) = 0;
49 46
50 protected: 47 protected:
51 ClientNativePixmapFactory(); 48 ClientNativePixmapFactory();
52 49
53 private: 50 private:
54 DISALLOW_COPY_AND_ASSIGN(ClientNativePixmapFactory); 51 DISALLOW_COPY_AND_ASSIGN(ClientNativePixmapFactory);
55 }; 52 };
56 53
57 } // namespace ui 54 } // namespace ui
58 55
59 #endif // UI_OZONE_PUBLIC_CLIENT_NATIVE_PIXMAP_FACTORY_H_ 56 #endif // UI_OZONE_PUBLIC_CLIENT_NATIVE_PIXMAP_FACTORY_H_
OLDNEW
« no previous file with comments | « ui/ozone/platform/x11/ozone_platform_x11.cc ('k') | ui/ozone/public/ozone_platform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698