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

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

Issue 132543002: Not for review. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 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_GFX_OZONE_DRI_DRI_SURFACE_FACTORY_H_ 5 #ifndef UI_GFX_OZONE_DRI_DRI_SURFACE_FACTORY_H_
6 #define UI_GFX_OZONE_DRI_DRI_SURFACE_FACTORY_H_ 6 #define UI_GFX_OZONE_DRI_DRI_SURFACE_FACTORY_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "ui/gfx/ozone/surface_factory_ozone.h" 9 #include "ui/gfx/ozone/surface_factory_ozone.h"
10 10
11 namespace gfx { 11 namespace gfx {
12 12
13 class DriSurface; 13 class DriSurface;
14 class DriWrapper; 14 class DriWrapper;
15 class HardwareDisplayController; 15 class HardwareDisplayController;
16 class ScanoutSurface;
16 17
17 // SurfaceFactoryOzone implementation on top of DRM/KMS using dumb buffers. 18 // SurfaceFactoryOzone implementation on top of DRM/KMS using dumb buffers.
18 // This implementation is used in conjunction with the software rendering 19 // This implementation is used in conjunction with the software rendering
19 // path. 20 // path.
20 class GFX_EXPORT DriSurfaceFactory : public SurfaceFactoryOzone { 21 class GFX_EXPORT DriSurfaceFactory : public SurfaceFactoryOzone {
21 public: 22 public:
22 DriSurfaceFactory(); 23 DriSurfaceFactory();
23 virtual ~DriSurfaceFactory(); 24 virtual ~DriSurfaceFactory();
24 25
25 virtual HardwareState InitializeHardware() OVERRIDE; 26 virtual HardwareState InitializeHardware() OVERRIDE;
(...skipping 11 matching lines...) Expand all
37 gfx::AcceleratedWidget w, 38 gfx::AcceleratedWidget w,
38 const gfx::Rect& bounds) OVERRIDE; 39 const gfx::Rect& bounds) OVERRIDE;
39 40
40 virtual bool SchedulePageFlip(gfx::AcceleratedWidget w) OVERRIDE; 41 virtual bool SchedulePageFlip(gfx::AcceleratedWidget w) OVERRIDE;
41 42
42 virtual SkCanvas* GetCanvasForWidget(gfx::AcceleratedWidget w) OVERRIDE; 43 virtual SkCanvas* GetCanvasForWidget(gfx::AcceleratedWidget w) OVERRIDE;
43 44
44 virtual gfx::VSyncProvider* GetVSyncProvider( 45 virtual gfx::VSyncProvider* GetVSyncProvider(
45 gfx::AcceleratedWidget w) OVERRIDE; 46 gfx::AcceleratedWidget w) OVERRIDE;
46 47
48 protected:
49 scoped_ptr<DriWrapper> drm_;
50
51 HardwareState state_;
52
53 // Active output.
54 scoped_ptr<HardwareDisplayController> controller_;
55
47 private: 56 private:
48 virtual DriSurface* CreateSurface( 57 virtual ScanoutSurface* CreateSurface(
49 HardwareDisplayController* controller); 58 HardwareDisplayController* controller);
50 59
51 virtual DriWrapper* CreateWrapper(); 60 virtual DriWrapper* CreateWrapper();
52 61
62 virtual gfx::AcceleratedWidget GetNativeWidget(ScanoutSurface* surface);
63
53 virtual bool InitializeControllerForPrimaryDisplay( 64 virtual bool InitializeControllerForPrimaryDisplay(
54 DriWrapper* drm, 65 DriWrapper* drm,
55 HardwareDisplayController* controller); 66 HardwareDisplayController* controller);
56 67
57 // Blocks until a DRM event is read. 68 // Blocks until a DRM event is read.
58 // TODO(dnicoara) Remove once we can safely move DRM event processing in the 69 // TODO(dnicoara) Remove once we can safely move DRM event processing in the
59 // message loop while correctly signaling when we're done displaying the 70 // message loop while correctly signaling when we're done displaying the
60 // pending frame. 71 // pending frame.
61 virtual void WaitForPageFlipEvent(int fd); 72 virtual void WaitForPageFlipEvent(int fd);
62 73
63 scoped_ptr<DriWrapper> drm_;
64
65 HardwareState state_;
66
67 // Active output.
68 scoped_ptr<HardwareDisplayController> controller_;
69
70 DISALLOW_COPY_AND_ASSIGN(DriSurfaceFactory); 74 DISALLOW_COPY_AND_ASSIGN(DriSurfaceFactory);
71 }; 75 };
72 76
73 } // namespace gfx 77 } // namespace gfx
74 78
75 #endif // UI_GFX_OZONE_DRI_DRI_SURFACE_FACTORY_H_ 79 #endif // UI_GFX_OZONE_DRI_DRI_SURFACE_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698