| Index: ui/ozone/platform/drm/ozone_client_gbm.cc
|
| diff --git a/ui/ozone/platform/drm/ozone_client_gbm.cc b/ui/ozone/platform/drm/ozone_client_gbm.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..d37fb44f0e8e66503bfd9842abebe3e195239a9e
|
| --- /dev/null
|
| +++ b/ui/ozone/platform/drm/ozone_client_gbm.cc
|
| @@ -0,0 +1,46 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "ui/ozone/platform/drm/ozone_client_gbm.h"
|
| +
|
| +#include "ui/ozone/platform/drm/gbm_surface_client_factory.h"
|
| +#include "ui/ozone/public/ozone_client.h"
|
| +
|
| +namespace ui {
|
| +
|
| +namespace {
|
| +
|
| +class OzoneClientGbm : public OzoneClient {
|
| + public:
|
| + OzoneClientGbm() {}
|
| + ~OzoneClientGbm() override {}
|
| +
|
| + // OzoneClient:
|
| + SurfaceClientFactoryOzone* GetSurfaceClientFactoryOzone() override {
|
| + return surface_client_.get();
|
| + }
|
| +
|
| + void InitializeUI() override {
|
| + if (!surface_client_)
|
| + surface_client_.reset(new GbmSurfaceClientFactory);
|
| + }
|
| +
|
| + void InitializeRenderer() override {
|
| + if (!surface_client_)
|
| + surface_client_.reset(new GbmSurfaceClientFactory);
|
| + }
|
| +
|
| + private:
|
| + scoped_ptr<GbmSurfaceClientFactory> surface_client_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(OzoneClientGbm);
|
| +};
|
| +
|
| +} // namespace
|
| +
|
| +OzoneClient* CreateOzoneClientGbm() {
|
| + return new OzoneClientGbm;
|
| +}
|
| +
|
| +} // namespace ui
|
|
|