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

Side by Side Diff: content/test/test_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/test/test_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 TestNativePixmapManagerTrait
13 : public DefaultSingletonTraits<TestNativePixmapManager> {
14 static TestNativePixmapManager* New() {
15 TestNativePixmapManager* manager = new TestNativePixmapManager();
16 manager->Initialize(base::FileDescriptor());
17 return manager;
18 }
19 };
20
21 // static
22 TestNativePixmapManager* TestNativePixmapManager::GetInstance() {
23 return Singleton<TestNativePixmapManager,
24 TestNativePixmapManagerTrait>::get();
25 }
26
27 TestNativePixmapManager::TestNativePixmapManager() {}
28
29 TestNativePixmapManager::~TestNativePixmapManager() {}
30
31 void TestNativePixmapManager::Initialize(
32 const base::FileDescriptor& device_fd) {
33 pixmap_manager_ = ui::NativePixmapManager::Create(device_fd);
34 }
35
36 std::vector<ui::NativePixmapManager::Configuration>
37 TestNativePixmapManager::GetSupportedNativePixmapConfigurations() const {
38 return pixmap_manager_->GetSupportedNativePixmapConfigurations();
39 }
40
41 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698