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

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

Issue 205433002: ozone: Add OzoneSurface object that is owned by compositor, GLSurface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add missing InitializeCanvas to FileSurface Created 6 years, 9 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 #include "ui/gfx/ozone/surface_ozone.h"
10 11
11 namespace gfx { 12 namespace gfx {
12 13
13 class DriSurface; 14 class DriSurface;
14 class DriWrapper; 15 class DriWrapper;
15 class HardwareDisplayController; 16 class HardwareDisplayController;
17 class SurfaceOzone;
16 18
17 // SurfaceFactoryOzone implementation on top of DRM/KMS using dumb buffers. 19 // SurfaceFactoryOzone implementation on top of DRM/KMS using dumb buffers.
18 // This implementation is used in conjunction with the software rendering 20 // This implementation is used in conjunction with the software rendering
19 // path. 21 // path.
20 class GFX_EXPORT DriSurfaceFactory : public SurfaceFactoryOzone { 22 class GFX_EXPORT DriSurfaceFactory : public SurfaceFactoryOzone {
21 public: 23 public:
22 DriSurfaceFactory(); 24 DriSurfaceFactory();
23 virtual ~DriSurfaceFactory(); 25 virtual ~DriSurfaceFactory();
24 26
25 virtual HardwareState InitializeHardware() OVERRIDE; 27 virtual HardwareState InitializeHardware() OVERRIDE;
26 virtual void ShutdownHardware() OVERRIDE; 28 virtual void ShutdownHardware() OVERRIDE;
27 29
28 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; 30 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE;
29 virtual gfx::AcceleratedWidget RealizeAcceleratedWidget( 31
32 virtual scoped_ptr<SurfaceOzone> CreateSurfaceForWidget(
30 gfx::AcceleratedWidget w) OVERRIDE; 33 gfx::AcceleratedWidget w) OVERRIDE;
31 34
32 virtual bool LoadEGLGLES2Bindings( 35 virtual bool LoadEGLGLES2Bindings(
33 AddGLLibraryCallback add_gl_library, 36 AddGLLibraryCallback add_gl_library,
34 SetGLGetProcAddressProcCallback set_gl_get_proc_address) OVERRIDE; 37 SetGLGetProcAddressProcCallback set_gl_get_proc_address) OVERRIDE;
35 38
36 virtual bool AttemptToResizeAcceleratedWidget( 39 virtual bool SchedulePageFlip(gfx::AcceleratedWidget w);
37 gfx::AcceleratedWidget w,
38 const gfx::Rect& bounds) OVERRIDE;
39 40
40 virtual bool SchedulePageFlip(gfx::AcceleratedWidget w) OVERRIDE; 41 virtual SkCanvas* GetCanvasForWidget(gfx::AcceleratedWidget w);
41
42 virtual SkCanvas* GetCanvasForWidget(gfx::AcceleratedWidget w) OVERRIDE;
43 42
44 virtual scoped_ptr<gfx::VSyncProvider> CreateVSyncProvider( 43 virtual scoped_ptr<gfx::VSyncProvider> CreateVSyncProvider(
45 gfx::AcceleratedWidget w) OVERRIDE; 44 gfx::AcceleratedWidget w);
46 45
47 void SetHardwareCursor(AcceleratedWidget window, 46 void SetHardwareCursor(AcceleratedWidget window,
48 const SkBitmap& image, 47 const SkBitmap& image,
49 const gfx::Point& location); 48 const gfx::Point& location);
50 49
51 void MoveHardwareCursor(AcceleratedWidget window, const gfx::Point& location); 50 void MoveHardwareCursor(AcceleratedWidget window, const gfx::Point& location);
52 51
53 void UnsetHardwareCursor(AcceleratedWidget window); 52 void UnsetHardwareCursor(AcceleratedWidget window);
54 53
55 private: 54 private:
(...skipping 19 matching lines...) Expand all
75 scoped_ptr<HardwareDisplayController> controller_; 74 scoped_ptr<HardwareDisplayController> controller_;
76 75
77 scoped_ptr<DriSurface> cursor_surface_; 76 scoped_ptr<DriSurface> cursor_surface_;
78 77
79 DISALLOW_COPY_AND_ASSIGN(DriSurfaceFactory); 78 DISALLOW_COPY_AND_ASSIGN(DriSurfaceFactory);
80 }; 79 };
81 80
82 } // namespace gfx 81 } // namespace gfx
83 82
84 #endif // UI_GFX_OZONE_DRI_DRI_SURFACE_FACTORY_H_ 83 #endif // UI_GFX_OZONE_DRI_DRI_SURFACE_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698