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

Side by Side Diff: ui/ozone/platform/drm/ozone_client_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: Introduce OzoneClient Created 5 years, 7 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/ozone_client_gbm.h"
6
7 #include "ui/ozone/platform/drm/gbm_surface_client_factory.h"
8 #include "ui/ozone/public/ozone_client.h"
9
10 namespace ui {
11
12 namespace {
13
14 class OzoneClientGbm : public OzoneClient {
15 public:
16 OzoneClientGbm() {}
17 ~OzoneClientGbm() override {}
18
19 // OzoneClient:
20 SurfaceClientFactoryOzone* GetSurfaceClientFactoryOzone() override {
21 return surface_client_.get();
22 }
23
24 void InitializeUI() override {
25 if (!surface_client_)
26 surface_client_.reset(new GbmSurfaceClientFactory);
27 }
28
29 void InitializeRenderer() override {
30 if (!surface_client_)
31 surface_client_.reset(new GbmSurfaceClientFactory);
32 }
33
34 private:
35 scoped_ptr<GbmSurfaceClientFactory> surface_client_;
36
37 DISALLOW_COPY_AND_ASSIGN(OzoneClientGbm);
38 };
39
40 } // namespace
41
42 OzoneClient* CreateOzoneClientGbm() {
43 return new OzoneClientGbm;
44 }
45
46 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698