Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / ui / ozone / platform / drm / gpu / gbm_surface_factory.h
blob0bc01b3be4fb52b4bf5738f9df58f91573a40e36
1 // Copyright 2014 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.
5 #ifndef UI_OZONE_PLATFORM_DRM_GPU_GBM_SURFACE_FACTORY_H_
6 #define UI_OZONE_PLATFORM_DRM_GPU_GBM_SURFACE_FACTORY_H_
8 #include "ui/ozone/platform/drm/gpu/drm_surface_factory.h"
10 namespace ui {
12 class DrmDeviceManager;
13 class DrmWindow;
14 class GbmDevice;
15 class ScreenManager;
17 class GbmSurfaceFactory : public DrmSurfaceFactory {
18 public:
19 GbmSurfaceFactory(bool allow_surfaceless);
20 ~GbmSurfaceFactory() override;
22 void InitializeGpu(DrmDeviceManager* drm_device_manager,
23 ScreenManager* screen_manager);
25 // DrmSurfaceFactory:
26 intptr_t GetNativeDisplay() override;
27 const int32_t* GetEGLSurfaceProperties(const int32_t* desired_list) override;
28 bool LoadEGLGLES2Bindings(
29 AddGLLibraryCallback add_gl_library,
30 SetGLGetProcAddressProcCallback set_gl_get_proc_address) override;
31 scoped_ptr<SurfaceOzoneCanvas> CreateCanvasForWidget(
32 gfx::AcceleratedWidget widget) override;
33 scoped_ptr<ui::SurfaceOzoneEGL> CreateEGLSurfaceForWidget(
34 gfx::AcceleratedWidget w) override;
35 scoped_ptr<SurfaceOzoneEGL> CreateSurfacelessEGLSurfaceForWidget(
36 gfx::AcceleratedWidget widget) override;
37 scoped_refptr<ui::NativePixmap> CreateNativePixmap(
38 gfx::AcceleratedWidget widget,
39 gfx::Size size,
40 BufferFormat format,
41 BufferUsage usage) override;
42 bool CanShowPrimaryPlaneAsOverlay() override;
43 bool CanCreateNativePixmap(BufferUsage usage) override;
45 private:
46 scoped_refptr<GbmDevice> GetGbmDevice(gfx::AcceleratedWidget widget);
48 bool allow_surfaceless_;
50 DrmDeviceManager* drm_device_manager_; // Not owned.
52 DISALLOW_COPY_AND_ASSIGN(GbmSurfaceFactory);
55 } // namespace ui
57 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_SURFACE_FACTORY_H_