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

Side by Side Diff: ui/ozone/platform/drm/common/native_pixmap_manager_gbm.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: NativePixmapManager is singleton 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 "ui/ozone/platform/drm/common/native_pixmap_manager_gbm.h"
6
7 #include "base/file_descriptor_posix.h"
8
9 namespace ui {
10
11 NativePixmapManager* CreateNativePixmapManagerGbm() {
12 return new NativePixmapManagerGbm();
13 }
14
15 NativePixmapManagerGbm::NativePixmapManagerGbm() {
16 }
17
18 NativePixmapManagerGbm::~NativePixmapManagerGbm() {
19 }
20
21 void NativePixmapManagerGbm::Initialize(const base::FileDescriptor& device_fd) {
22 DCHECK_EQ(vgem_fd_.get(), -1);
23 if (device_fd.fd > 0)
24 vgem_fd_.reset(device_fd.fd);
25 }
26
27 std::vector<NativePixmapManager::Configuration>
28 NativePixmapManagerGbm::GetSupportedNativePixmapConfigurations() const {
29 std::vector<Configuration> configurations = {
30 {SurfaceFactoryOzone::BGRA_8888, SurfaceFactoryOzone::SCANOUT},
31 {SurfaceFactoryOzone::RGBX_8888, SurfaceFactoryOzone::SCANOUT}};
32 return configurations;
33 }
34
35 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698