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

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

Issue 1128113011: ozone: Introduce ClientPixmap and ClientPixmapFactory for non-GPU processes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: separate VGEM part to another CL 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 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_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 ChildNativePixmapManagerTrait
13 : public DefaultSingletonTraits<ChildNativePixmapManager> {
14 static ChildNativePixmapManager* New() {
15 ChildNativePixmapManager* manager = new ChildNativePixmapManager();
16 manager->Initialize(base::FileDescriptor());
17 return manager;
18 }
19 };
20
21 // static
22 ChildNativePixmapManager* ChildNativePixmapManager::GetInstance() {
23 return Singleton<ChildNativePixmapManager,
24 ChildNativePixmapManagerTrait>::get();
25 }
26
27 ChildNativePixmapManager::ChildNativePixmapManager() {}
28
29 ChildNativePixmapManager::~ChildNativePixmapManager() {}
30
31 void ChildNativePixmapManager::Initialize(
32 const base::FileDescriptor& device_fd) {
33 pixmap_manager_ = ui::NativePixmapManager::Create(device_fd);
34 }
35
36 std::vector<ui::NativePixmapManager::Configuration>
37 ChildNativePixmapManager::GetSupportedNativePixmapConfigurations() const {
38 return pixmap_manager_->GetSupportedNativePixmapConfigurations();
39 }
40
41 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698