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

Unified Diff: ui/ozone/public/native_pixmap_client.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: Introduce NativePixmapClient Created 5 years, 7 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
Index: ui/ozone/public/native_pixmap_client.h
diff --git a/ui/ozone/public/native_pixmap_client.h b/ui/ozone/public/native_pixmap_client.h
new file mode 100644
index 0000000000000000000000000000000000000000..dd1f6d97974238a9f185798529652f1ce8b82a75
--- /dev/null
+++ b/ui/ozone/public/native_pixmap_client.h
@@ -0,0 +1,44 @@
+// 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_NATIVE_PIXMAP_CLIENT_H_
+#define UI_OZONE_PUBLIC_NATIVE_PIXMAP_CLIENT_H_
+
+#include "ui/ozone/ozone_export.h"
+#include "ui/ozone/public/surface_factory_ozone.h"
+
+namespace ui {
+
+// The Ozone interface allows external implementations to hook into Chromium to
+// provide the handle of a system specific surface implementation for Browser
+// and Render process.
+class OZONE_EXPORT NativePixmapClient {
reveman 2015/06/05 20:26:07 NativePixmapClient sounds like we'd have one of th
spang 2015/06/05 22:21:23 That sounds good to me.
dshwang 2015/06/08 11:15:14 Done.
+ public:
+ NativePixmapClient();
+ virtual ~NativePixmapClient();
+
+ // Initializes the resources necessary.
+ static void InitializeIfNeeded();
+
+ static NativePixmapClient* GetInstance();
+
+ struct Configuration {
+ SurfaceFactoryOzone::BufferFormat format;
+ SurfaceFactoryOzone::BufferUsage usage;
+ };
+
+ // Gets supported format/usage configurations.
+ virtual std::vector<Configuration> GetSupportedNativePixmapConfigurations()
spang 2015/06/05 19:21:54 Is this used from the renderer? (Does it need to m
dshwang 2015/06/08 11:15:14 Currently it's used by browser process. Renderer w
+ const;
reveman 2015/06/05 20:26:07 can this be pure virtual?
dshwang 2015/06/08 11:15:14 Done.
+
+ private:
+ static void CreateInstance();
+ virtual void Initialize();
+
+ DISALLOW_COPY_AND_ASSIGN(NativePixmapClient);
+};
+
+} // namespace ui
+
+#endif // UI_OZONE_PUBLIC_NATIVE_PIXMAP_CLIENT_H_

Powered by Google App Engine
This is Rietveld 408576698