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

Side by Side Diff: content/child/child_client_native_pixmap_manager_ozone.cc

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 latest crrev.com/1128113011 Created 5 years, 4 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "content/child/child_client_native_pixmap_manager_ozone.h"
6
7 #include "base/file_descriptor_posix.h"
8 #include "base/memory/singleton.h"
9
10 namespace content {
11
12 struct ChildClientNativePixmapManagerTrait
13 : public DefaultSingletonTraits<ChildClientNativePixmapManager> {
14 static ChildClientNativePixmapManager* New() {
15 ChildClientNativePixmapManager* manager =
16 new ChildClientNativePixmapManager();
17 return manager;
18 }
19 };
20
21 // static
22 ChildClientNativePixmapManager* ChildClientNativePixmapManager::GetInstance() {
23 return Singleton<ChildClientNativePixmapManager,
24 ChildClientNativePixmapManagerTrait>::get();
25 }
26
27 ChildClientNativePixmapManager::ChildClientNativePixmapManager() {}
28
29 ChildClientNativePixmapManager::~ChildClientNativePixmapManager() {}
30
31 void ChildClientNativePixmapManager::Initialize(
32 const base::FileDescriptor& virtual_device) {
33 pixmap_manager_ = ui::ClientNativePixmapManager::Create(virtual_device);
34 }
35
36 std::vector<ui::ClientNativePixmapManager::Configuration>
37 ChildClientNativePixmapManager::GetSupportedConfigurations() const {
38 return pixmap_manager_->GetSupportedConfigurations();
39 }
40
41 scoped_ptr<ui::ClientNativePixmap>
42 ChildClientNativePixmapManager::ImportClientNativePixmap(
43 base::FileDescriptor handle,
44 gfx::Size size,
45 ui::NativePixmapFormat format,
46 ui::NativePixmapUsage usage) {
47 return pixmap_manager_->ImportClientNativePixmap(handle, size, format, usage);
48 }
49
50 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698