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

Side by Side Diff: ui/ozone/platform/dri/gbm_surface_factory.h

Issue 883783002: [Ozone-DRI] Assume window IPC arrives before surface IPC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_OZONE_PLATFORM_DRI_GBM_SURFACE_FACTORY_H_ 5 #ifndef UI_OZONE_PLATFORM_DRI_GBM_SURFACE_FACTORY_H_
6 #define UI_OZONE_PLATFORM_DRI_GBM_SURFACE_FACTORY_H_ 6 #define UI_OZONE_PLATFORM_DRI_GBM_SURFACE_FACTORY_H_
7 7
8 #include "ui/ozone/platform/dri/dri_surface_factory.h" 8 #include "ui/ozone/platform/dri/dri_surface_factory.h"
9 9
10 namespace ui { 10 namespace ui {
11 11
12 class DriWindowDelegate; 12 class DriWindowDelegate;
13 class DriWindowDelegateManager; 13 class DriWindowDelegateManager;
14 class GbmWrapper; 14 class GbmWrapper;
15 class ScreenManager;
16 15
17 class GbmSurfaceFactory : public DriSurfaceFactory { 16 class GbmSurfaceFactory : public DriSurfaceFactory {
18 public: 17 public:
19 GbmSurfaceFactory(bool allow_surfaceless); 18 GbmSurfaceFactory(bool allow_surfaceless);
20 ~GbmSurfaceFactory() override; 19 ~GbmSurfaceFactory() override;
21 20
22 void InitializeGpu(GbmWrapper* gbm, 21 void InitializeGpu(GbmWrapper* gbm,
23 ScreenManager* screen_manager,
24 DriWindowDelegateManager* window_manager); 22 DriWindowDelegateManager* window_manager);
25 23
26 // DriSurfaceFactory: 24 // DriSurfaceFactory:
27 intptr_t GetNativeDisplay() override; 25 intptr_t GetNativeDisplay() override;
28 int GetDrmFd() override; 26 int GetDrmFd() override;
29 const int32_t* GetEGLSurfaceProperties(const int32_t* desired_list) override; 27 const int32_t* GetEGLSurfaceProperties(const int32_t* desired_list) override;
30 bool LoadEGLGLES2Bindings( 28 bool LoadEGLGLES2Bindings(
31 AddGLLibraryCallback add_gl_library, 29 AddGLLibraryCallback add_gl_library,
32 SetGLGetProcAddressProcCallback set_gl_get_proc_address) override; 30 SetGLGetProcAddressProcCallback set_gl_get_proc_address) override;
33 scoped_ptr<ui::SurfaceOzoneEGL> CreateEGLSurfaceForWidget( 31 scoped_ptr<ui::SurfaceOzoneEGL> CreateEGLSurfaceForWidget(
(...skipping 10 matching lines...) Expand all
44 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, 42 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget,
45 int plane_z_order, 43 int plane_z_order,
46 gfx::OverlayTransform plane_transform, 44 gfx::OverlayTransform plane_transform,
47 scoped_refptr<NativePixmap> buffer, 45 scoped_refptr<NativePixmap> buffer,
48 const gfx::Rect& display_bounds, 46 const gfx::Rect& display_bounds,
49 const gfx::RectF& crop_rect) override; 47 const gfx::RectF& crop_rect) override;
50 bool CanShowPrimaryPlaneAsOverlay() override; 48 bool CanShowPrimaryPlaneAsOverlay() override;
51 bool CanCreateNativePixmap(BufferUsage usage) override; 49 bool CanCreateNativePixmap(BufferUsage usage) override;
52 50
53 private: 51 private:
54 DriWindowDelegate* GetOrCreateWindowDelegate(gfx::AcceleratedWidget widget);
55
56 GbmWrapper* gbm_; // Not owned. 52 GbmWrapper* gbm_; // Not owned.
57 ScreenManager* screen_manager_; // Not owned.
58 bool allow_surfaceless_; 53 bool allow_surfaceless_;
59 54
60 DISALLOW_COPY_AND_ASSIGN(GbmSurfaceFactory); 55 DISALLOW_COPY_AND_ASSIGN(GbmSurfaceFactory);
61 }; 56 };
62 57
63 } // namespace ui 58 } // namespace ui
64 59
65 #endif // UI_OZONE_PLATFORM_DRI_GBM_SURFACE_FACTORY_H_ 60 #endif // UI_OZONE_PLATFORM_DRI_GBM_SURFACE_FACTORY_H_
OLDNEW
« no previous file with comments | « ui/ozone/platform/dri/dri_window_delegate_manager.cc ('k') | ui/ozone/platform/dri/gbm_surface_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698