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

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

Issue 1389133002: content: Use type-parameterized tests for GpuMemoryBuffer implementations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add blankline Created 5 years, 2 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/drm/common/client_native_pixmap_factory_gbm.cc ('k') | no next file » | 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 16 matching lines...) Expand all
27 static ClientNativePixmapFactory* GetInstance(); 27 static ClientNativePixmapFactory* GetInstance();
28 static void SetInstance(ClientNativePixmapFactory* instance); 28 static void SetInstance(ClientNativePixmapFactory* instance);
29 29
30 static scoped_ptr<ClientNativePixmapFactory> Create(); 30 static scoped_ptr<ClientNativePixmapFactory> Create();
31 31
32 virtual ~ClientNativePixmapFactory(); 32 virtual ~ClientNativePixmapFactory();
33 33
34 // Initialize with the given client native pixmap |device_fd|. 34 // Initialize with the given client native pixmap |device_fd|.
35 virtual void Initialize(base::ScopedFD device_fd) = 0; 35 virtual void Initialize(base::ScopedFD device_fd) = 0;
36 36
37 struct Configuration { 37 // Returns true if format/usage configuration is supported.
38 gfx::BufferFormat format; 38 virtual bool IsConfigurationSupported(gfx::BufferFormat format,
39 gfx::BufferUsage usage; 39 gfx::BufferUsage usage) const = 0;
40 };
41
42 // Gets supported format/usage configurations.
43 virtual std::vector<Configuration> GetSupportedConfigurations() const = 0;
44 40
45 // TODO(dshwang): implement it. crbug.com/475633 41 // TODO(dshwang): implement it. crbug.com/475633
46 // Import the native pixmap from |handle| to be used in non-GPU processes. 42 // Import the native pixmap from |handle| to be used in non-GPU processes.
47 // This function takes ownership of any file descriptors in |handle|. 43 // This function takes ownership of any file descriptors in |handle|.
48 virtual scoped_ptr<ClientNativePixmap> ImportFromHandle( 44 virtual scoped_ptr<ClientNativePixmap> ImportFromHandle(
49 const gfx::NativePixmapHandle& handle, 45 const gfx::NativePixmapHandle& handle,
50 const gfx::Size& size, 46 const gfx::Size& size,
51 gfx::BufferUsage usage) = 0; 47 gfx::BufferUsage usage) = 0;
52 48
53 protected: 49 protected:
54 ClientNativePixmapFactory(); 50 ClientNativePixmapFactory();
55 51
56 private: 52 private:
57 DISALLOW_COPY_AND_ASSIGN(ClientNativePixmapFactory); 53 DISALLOW_COPY_AND_ASSIGN(ClientNativePixmapFactory);
58 }; 54 };
59 55
60 } // namespace ui 56 } // namespace ui
61 57
62 #endif // UI_OZONE_PUBLIC_CLIENT_NATIVE_PIXMAP_FACTORY_H_ 58 #endif // UI_OZONE_PUBLIC_CLIENT_NATIVE_PIXMAP_FACTORY_H_
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/common/client_native_pixmap_factory_gbm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698