 Chromium Code Reviews
 Chromium Code Reviews Issue 1128113011:
  ozone: Introduce ClientPixmap and ClientPixmapFactory for non-GPU processes.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master
    
  
    Issue 1128113011:
  ozone: Introduce ClientPixmap and ClientPixmapFactory for non-GPU processes.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master| Index: ui/ozone/platform/drm/common/client_native_pixmap_manager_gbm.cc | 
| diff --git a/ui/ozone/platform/drm/common/client_native_pixmap_manager_gbm.cc b/ui/ozone/platform/drm/common/client_native_pixmap_manager_gbm.cc | 
| new file mode 100644 | 
| index 0000000000000000000000000000000000000000..af4ba25a46688134b7bd07cc44739516803fc768 | 
| --- /dev/null | 
| +++ b/ui/ozone/platform/drm/common/client_native_pixmap_manager_gbm.cc | 
| @@ -0,0 +1,45 @@ | 
| +// 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/common/client_native_pixmap_manager_gbm.h" | 
| + | 
| +#include "base/file_descriptor_posix.h" | 
| +#include "ui/ozone/public/client_native_pixmap_manager.h" | 
| + | 
| +namespace ui { | 
| + | 
| +namespace { | 
| + | 
| +class ClientNativePixmapManagerGbm : public ClientNativePixmapManager { | 
| + public: | 
| + ClientNativePixmapManagerGbm() {} | 
| + ~ClientNativePixmapManagerGbm() override {} | 
| + | 
| + // ClientNativePixmapManager: | 
| + std::vector<Configuration> GetSupportedConfigurations() const override { | 
| + std::vector<Configuration> configurations = { | 
| 
dcheng
2015/07/31 18:09:52
Braced initialization of std::vector isn't allowed
 
dshwang
2015/07/31 18:59:29
as google-styleguide, braced initializer list is a
 
dcheng
2015/07/31 19:02:39
https://chromium-cpp.appspot.com/
 
dshwang
2015/08/03 12:51:48
I see. Thx. Done.
 | 
| + {NATIVE_PIXMAP_FORMAT_BGRA_8888, NATIVE_PIXMAP_USAGE_SCANOUT}, | 
| + {NATIVE_PIXMAP_FORMAT_RGBX_8888, NATIVE_PIXMAP_USAGE_SCANOUT}}; | 
| + return configurations; | 
| + } | 
| + scoped_ptr<ClientNativePixmap> ImportNativePixmap( | 
| + const base::FileDescriptor& handle, | 
| + const gfx::Size& size, | 
| + NativePixmapFormat format, | 
| + NativePixmapUsage usage) override { | 
| + NOTIMPLEMENTED(); | 
| + return nullptr; | 
| + } | 
| + | 
| + private: | 
| + DISALLOW_COPY_AND_ASSIGN(ClientNativePixmapManagerGbm); | 
| +}; | 
| + | 
| +} // namespace | 
| + | 
| +ClientNativePixmapManager* CreateClientNativePixmapManagerGbm() { | 
| + return new ClientNativePixmapManagerGbm(); | 
| +} | 
| + | 
| +} // namespace ui |