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

Unified 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: rename to ClientNativePixmap Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/ozone/public/client_native_pixmap.h ('k') | ui/ozone/public/client_native_pixmap_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/public/client_native_pixmap_manager.h
diff --git a/ui/ozone/public/client_native_pixmap_manager.h b/ui/ozone/public/client_native_pixmap_manager.h
new file mode 100644
index 0000000000000000000000000000000000000000..ba77745bf2035a5123b381d6ced983148595eefd
--- /dev/null
+++ b/ui/ozone/public/client_native_pixmap_manager.h
@@ -0,0 +1,60 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_OZONE_PUBLIC_CLIENT_NATIVE_PIXMAP_MANAGER_H_
+#define UI_OZONE_PUBLIC_CLIENT_NATIVE_PIXMAP_MANAGER_H_
+
+#include <vector>
+
+#include "base/memory/scoped_ptr.h"
+#include "ui/gfx/geometry/size.h"
+#include "ui/ozone/ozone_export.h"
+#include "ui/ozone/public/client_native_pixmap.h"
+#include "ui/ozone/public/native_pixmap_types.h"
+
+namespace base {
+
+struct FileDescriptor;
+
+} // namespace base
+
+namespace ui {
+
+// The Ozone interface allows external implementations to hook into Chromium to
+// provide a client pixmap for non-GPU processes.
+class OZONE_EXPORT ClientNativePixmapManager {
+ public:
+ static ClientNativePixmapManager* GetInstance();
+ static void SetInstance(ClientNativePixmapManager* instance);
+
+ static scoped_ptr<ClientNativePixmapManager> Create();
+
+ virtual ~ClientNativePixmapManager();
+
+ struct Configuration {
+ NativePixmapFormat format;
+ NativePixmapUsage usage;
+ };
+
+ // Gets supported format/usage configurations.
+ virtual std::vector<Configuration> GetSupportedConfigurations() const = 0;
+
+ // TODO(dshwang): implement it. crbug.com/475633
+ // Import the native pixmap from |handle| to be used in non-GPU processes.
+ virtual scoped_ptr<ClientNativePixmap> ImportClientNativePixmap(
reveman 2015/07/31 15:50:15 nit: maybe ImportNativePixmap (we're importing a n
dshwang 2015/07/31 16:11:45 Done. choose ImportNativePixmap
+ base::FileDescriptor handle,
reveman 2015/07/31 15:50:15 const base::FileDescriptor& handle This is necess
dshwang 2015/07/31 16:11:45 I missed your last comment. Done. BTW, type for ar
+ gfx::Size size,
reveman 2015/07/31 15:50:14 nit: const gfx::Size& size
dshwang 2015/07/31 16:11:45 Done.
+ NativePixmapFormat format,
+ NativePixmapUsage usage) = 0;
+
+ protected:
+ ClientNativePixmapManager();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ClientNativePixmapManager);
+};
+
+} // namespace ui
+
+#endif // UI_OZONE_PUBLIC_CLIENT_NATIVE_PIXMAP_MANAGER_H_
« no previous file with comments | « ui/ozone/public/client_native_pixmap.h ('k') | ui/ozone/public/client_native_pixmap_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698