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

Side by Side Diff: ui/ozone/platform/drm/gpu/gbm_surface_factory.h

Issue 1285183008: Ozone integration. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: add missing license header Created 5 years, 4 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 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.
4
5 #ifndef UI_OZONE_PLATFORM_DRM_GPU_GBM_SURFACE_FACTORY_H_
6 #define UI_OZONE_PLATFORM_DRM_GPU_GBM_SURFACE_FACTORY_H_
7
8 #include "ui/ozone/platform/drm/gpu/drm_surface_factory.h"
9
10 namespace ui {
11
12 class DrmDeviceManager;
13 class DrmWindow;
14 class GbmDevice;
15 class ScreenManager;
16
17 class GbmSurfaceFactory : public DrmSurfaceFactory {
18 public:
19 GbmSurfaceFactory(bool allow_surfaceless);
20 ~GbmSurfaceFactory() override;
21
22 void InitializeGpu(DrmDeviceManager* drm_device_manager,
23 ScreenManager* screen_manager);
24
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;
44
45 private:
46 scoped_refptr<GbmDevice> GetGbmDevice(gfx::AcceleratedWidget widget);
47
48 bool allow_surfaceless_;
49
50 DrmDeviceManager* drm_device_manager_; // Not owned.
51
52 DISALLOW_COPY_AND_ASSIGN(GbmSurfaceFactory);
53 };
54
55 } // namespace ui
56
57 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_SURFACE_FACTORY_H_
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/gpu/gbm_surface.cc ('k') | ui/ozone/platform/drm/gpu/gbm_surface_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698