| Index: ui/ozone/public/client_pixmap_manager.h
|
| diff --git a/ui/ozone/public/client_pixmap_manager.h b/ui/ozone/public/client_pixmap_manager.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..9712b72a6e45410e37e727713e0f4cd5c0bbb75c
|
| --- /dev/null
|
| +++ b/ui/ozone/public/client_pixmap_manager.h
|
| @@ -0,0 +1,60 @@
|
| +// 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.
|
| +
|
| +#ifndef UI_OZONE_PUBLIC_CLIENT_PIXMAP_MANAGER_H_
|
| +#define UI_OZONE_PUBLIC_CLIENT_PIXMAP_MANAGER_H_
|
| +
|
| +#include <vector>
|
| +
|
| +#include "base/memory/scoped_ptr.h"
|
| +#include "ui/gfx/geometry/size.h"
|
| +#include "ui/ozone/ozone_export.h"
|
| +#include "ui/ozone/public/client_pixmap.h"
|
| +#include "ui/ozone/public/pixmap_types.h"
|
| +
|
| +namespace base {
|
| +
|
| +struct FileDescriptor;
|
| +
|
| +} // namespace base
|
| +
|
| +namespace ui {
|
| +
|
| +// The Ozone interface allows external implementations to hook into Chromium to
|
| +// provide a client pixmap for non-GPU processes.
|
| +class OZONE_EXPORT ClientPixmapManager {
|
| + public:
|
| + static ClientPixmapManager* GetInstance();
|
| + static void SetInstance(ClientPixmapManager* instance);
|
| +
|
| + static scoped_ptr<ClientPixmapManager> Create();
|
| +
|
| + virtual ~ClientPixmapManager();
|
| +
|
| + struct Configuration {
|
| + PixmapFormat format;
|
| + PixmapUsage usage;
|
| + };
|
| +
|
| + // Gets supported format/usage configurations.
|
| + virtual std::vector<Configuration> GetSupportedConfigurations() const = 0;
|
| +
|
| + // TODO(dshwang): implement it. crbug.com/475633
|
| + // Import the native pixmap from |handle| to be used in non-GPU processes.
|
| + virtual scoped_ptr<ClientPixmap> ImportClientPixmap(
|
| + base::FileDescriptor handle,
|
| + gfx::Size size,
|
| + PixmapFormat format,
|
| + PixmapUsage usage) = 0;
|
| +
|
| + protected:
|
| + ClientPixmapManager();
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(ClientPixmapManager);
|
| +};
|
| +
|
| +} // namespace ui
|
| +
|
| +#endif // UI_OZONE_PUBLIC_CLIENT_PIXMAP_MANAGER_H_
|
|
|