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

Unified Diff: content/browser/gpu/browser_native_pixmap_manager_ozone.h

Issue 1248713002: ozone: ClientPixmapManager passes VGEM fd from browser to renderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase to lastest crrev.com/1128113011 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 | « content/browser/browser_main_loop.cc ('k') | content/browser/gpu/browser_native_pixmap_manager_ozone.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/browser_native_pixmap_manager_ozone.h
diff --git a/content/browser/gpu/browser_native_pixmap_manager_ozone.h b/content/browser/gpu/browser_native_pixmap_manager_ozone.h
new file mode 100644
index 0000000000000000000000000000000000000000..6c082b244543e64c6671640a83614bca80b8f0f4
--- /dev/null
+++ b/content/browser/gpu/browser_native_pixmap_manager_ozone.h
@@ -0,0 +1,45 @@
+// 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 CONTENT_BROWSER_GPU_BROWSER_NATIVE_PIXMAP_MANAGER_OZONE_H_
+#define CONTENT_BROWSER_GPU_BROWSER_NATIVE_PIXMAP_MANAGER_OZONE_H_
+
+#include "base/file_descriptor_posix.h"
+#include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
+#include "ui/ozone/public/native_pixmap_manager.h"
+
+namespace content {
+class BrowserMessageFilter;
+
+class BrowserNativePixmapManager : public ui::NativePixmapManager {
+ public:
+ static BrowserNativePixmapManager* GetInstance();
+ ~BrowserNativePixmapManager() override;
+
+ // Create message filter to handle messages from child process.
+ BrowserMessageFilter* CreateMessageFilter();
+
+ typedef base::Callback<void(const base::FileDescriptor& fd)>
+ FileDescriptorCallback;
+ void GetVirtualDeviceForChildProcess(const FileDescriptorCallback& callback);
+
+ // ui::NativePixmapManager:
+ void Initialize(const base::FileDescriptor& device_fd) override;
+ std::vector<Configuration> GetSupportedNativePixmapConfigurations()
+ const override;
+
+ private:
+ friend struct BrowserNativePixmapManagerTrait;
+ BrowserNativePixmapManager();
+
+ scoped_ptr<ui::NativePixmapManager> pixmap_manager_;
+ base::FileDescriptor device_fd_;
+
+ DISALLOW_COPY_AND_ASSIGN(BrowserNativePixmapManager);
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_GPU_BROWSER_NATIVE_PIXMAP_MANAGER_OZONE_H_
« no previous file with comments | « content/browser/browser_main_loop.cc ('k') | content/browser/gpu/browser_native_pixmap_manager_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698