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

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

Issue 106633002: GBM Ozone implementation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 6 years, 10 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2013 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_GFX_DRI_GBM_SURFACE_FACTORY_H_
6 #define UI_GFX_DRI_GBM_SURFACE_FACTORY_H_
7
8 #include "base/memory/scoped_ptr.h"
9 #include "ui/gfx/ozone/dri/dri_surface_factory.h"
10
11 struct gbm_device;
12
13 namespace gfx {
14
15 class DriWrapper;
16 class HardwareDisplayController;
17 class ScanoutSurface;
18
19 class GFX_EXPORT GbmSurfaceFactory : public DriSurfaceFactory {
20 public:
21 GbmSurfaceFactory();
22 virtual ~GbmSurfaceFactory();
23
24 virtual HardwareState InitializeHardware() OVERRIDE;
25 virtual void ShutdownHardware() OVERRIDE;
26
27 virtual intptr_t GetNativeDisplay() OVERRIDE;
28 virtual const int32* GetEGLSurfaceProperties(
29 const int32* desired_list) OVERRIDE;
30
31 virtual bool LoadEGLGLES2Bindings(
32 AddGLLibraryCallback add_gl_library,
33 SetGLGetProcAddressProcCallback set_gl_get_proc_address) OVERRIDE;
34
35 virtual bool AttemptToResizeAcceleratedWidget(
36 gfx::AcceleratedWidget w, const gfx::Rect& bounds) OVERRIDE;
37
38 virtual bool SchedulePageFlip(gfx::AcceleratedWidget w) OVERRIDE;
39
40 virtual SkCanvas* GetCanvasForWidget(gfx::AcceleratedWidget w) OVERRIDE;
41
42 virtual void* GetFunctionPointerFromNativeLibrary(base::NativeLibrary library,
43 const char* name) OVERRIDE;
44
45 private:
46 virtual ScanoutSurface* CreateSurface(
47 HardwareDisplayController* controller) OVERRIDE;
48
49 virtual gfx::AcceleratedWidget GetNativeWidget(
50 ScanoutSurface* surface) OVERRIDE;
51
52 // A GBM device used to create surfaces for |drm_|.
53 gbm_device* device_;
54
55 DISALLOW_COPY_AND_ASSIGN(GbmSurfaceFactory);
56 };
57
58 } // namespace gfx
59
60 #endif // UI_GFX_DRI_GBM_SURFACE_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698