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

Side by Side Diff: ui/gfx/client_native_pixmap_factory.h

Issue 2705333006: Move client_native_pixmap_factory.h from ui/ozone/public to ui/gfx (Closed)
Patch Set: Fix trace Created 3 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/gfx/client_native_pixmap.h ('k') | ui/gfx/client_native_pixmap_factory.cc » ('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_GFX_CLIENT_NATIVE_PIXMAP_FACTORY_H_
6 #define UI_OZONE_PUBLIC_CLIENT_NATIVE_PIXMAP_FACTORY_H_ 6 #define UI_GFX_CLIENT_NATIVE_PIXMAP_FACTORY_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/files/scoped_file.h" 11 #include "base/files/scoped_file.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "ui/gfx/buffer_types.h" 13 #include "ui/gfx/buffer_types.h"
14 #include "ui/ozone/ozone_export.h" 14 #include "ui/gfx/client_native_pixmap.h"
15 #include "ui/ozone/public/client_native_pixmap.h" 15 #include "ui/gfx/gfx_export.h"
16 16
17 namespace gfx { 17 namespace gfx {
18 struct NativePixmapHandle; 18 struct NativePixmapHandle;
19 class Size; 19 class Size;
20 } 20 }
21 21
22 namespace ui { 22 namespace ui {
23 23
24 // The Ozone interface allows external implementations to hook into Chromium to 24 // The Ozone interface allows external implementations to hook into Chromium to
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 GFX_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 std::unique_ptr<ClientNativePixmapFactory> Create();
32
33 virtual ~ClientNativePixmapFactory(); 31 virtual ~ClientNativePixmapFactory();
34 32
35 // Returns true if format/usage configuration is supported. 33 // Returns true if format/usage configuration is supported.
36 virtual bool IsConfigurationSupported(gfx::BufferFormat format, 34 virtual bool IsConfigurationSupported(gfx::BufferFormat format,
37 gfx::BufferUsage usage) const = 0; 35 gfx::BufferUsage usage) const = 0;
38 36
39 // TODO(dshwang): implement it. crbug.com/475633 37 // TODO(dshwang): implement it. crbug.com/475633
40 // Import the native pixmap from |handle| to be used in non-GPU processes. 38 // Import the native pixmap from |handle| to be used in non-GPU processes.
41 // This function takes ownership of any file descriptors in |handle|. 39 // This function takes ownership of any file descriptors in |handle|.
42 virtual std::unique_ptr<ClientNativePixmap> ImportFromHandle( 40 virtual std::unique_ptr<ClientNativePixmap> ImportFromHandle(
43 const gfx::NativePixmapHandle& handle, 41 const gfx::NativePixmapHandle& handle,
44 const gfx::Size& size, 42 const gfx::Size& size,
45 gfx::BufferUsage usage) = 0; 43 gfx::BufferUsage usage) = 0;
46 44
47 protected: 45 protected:
48 ClientNativePixmapFactory(); 46 ClientNativePixmapFactory();
49 47
50 private: 48 private:
51 DISALLOW_COPY_AND_ASSIGN(ClientNativePixmapFactory); 49 DISALLOW_COPY_AND_ASSIGN(ClientNativePixmapFactory);
52 }; 50 };
53 51
54 } // namespace ui 52 } // namespace ui
55 53
56 #endif // UI_OZONE_PUBLIC_CLIENT_NATIVE_PIXMAP_FACTORY_H_ 54 #endif // UI_GFX_CLIENT_NATIVE_PIXMAP_FACTORY_H_
OLDNEW
« no previous file with comments | « ui/gfx/client_native_pixmap.h ('k') | ui/gfx/client_native_pixmap_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698