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

Side by Side Diff: ui/gfx/ozone/impl/software_surface_factory_ozone.h

Issue 26849004: [Ozone] Adding a software rendering implementation of SurfaceFactoryOzone (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated SSO unittest Created 7 years, 2 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 (c) 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_OZONE_IMPL_SOFTWARE_SURFACE_FACTORY_OZONE_H_
6 #define UI_GFX_OZONE_IMPL_SOFTWARE_SURFACE_FACTORY_OZONE_H_
7
8 #include "base/memory/scoped_ptr.h"
9 #include "ui/gfx/ozone/surface_factory_ozone.h"
10
11 namespace gfx {
12
13 class DrmWrapperOzone;
14 class HardwareDisplayControllerOzone;
15 class SoftwareSurfaceOzone;
16
17 // SurfaceFactoryOzone implementation on top of DRM/KMS using dumb buffers.
18 // This implementation is used in conjunction with the software rendering
19 // path.
20 class SoftwareSurfaceFactoryOzone : public SurfaceFactoryOzone {
21 public:
22 SoftwareSurfaceFactoryOzone();
23 virtual ~SoftwareSurfaceFactoryOzone();
24
25 virtual HardwareState InitializeHardware() OVERRIDE;
26 virtual void ShutdownHardware() OVERRIDE;
27
28 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE;
29 virtual gfx::AcceleratedWidget RealizeAcceleratedWidget(
30 gfx::AcceleratedWidget w) OVERRIDE;
31
32 virtual bool LoadEGLGLES2Bindings() OVERRIDE;
33
34 virtual bool AttemptToResizeAcceleratedWidget(
35 gfx::AcceleratedWidget w,
36 const gfx::Rect& bounds) OVERRIDE;
37
38 virtual bool SchedulePageFlip(gfx::AcceleratedWidget w) OVERRIDE;
39
40 virtual gfx::VSyncProvider* GetVSyncProvider(
41 gfx::AcceleratedWidget w) OVERRIDE;
42
43 private:
44 virtual SoftwareSurfaceOzone* CreateSurface(
45 HardwareDisplayControllerOzone* controller);
46
47 virtual DrmWrapperOzone* CreateWrapper();
48
49 virtual bool InitializeControllerForPrimaryDisplay(
50 DrmWrapperOzone* drm,
51 HardwareDisplayControllerOzone* controller);
52
53 // Blocks until a DRM event is read.
54 // TODO(dnicoara) Remove once we can safely move DRM event processing in the
55 // message loop while correctly signaling when we're done displaying the
56 // pending frame.
57 virtual void WaitForPageFlipEvent(int fd);
58
59 scoped_ptr<DrmWrapperOzone> drm_;
60
61 HardwareState state_;
62
63 // Active output.
64 scoped_ptr<HardwareDisplayControllerOzone> controller_;
65
66
67 DISALLOW_COPY_AND_ASSIGN(SoftwareSurfaceFactoryOzone);
68 };
69
70 } // namespace gfx
71
72 #endif // UI_GFX_OZONE_IMPL_SOFTWARE_SURFACE_FACTORY_OZONE_H_
OLDNEW
« no previous file with comments | « ui/gfx/ozone/impl/hardware_display_controller_ozone_unittest.cc ('k') | ui/gfx/ozone/impl/software_surface_factory_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698