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

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: rebase Created 6 years, 8 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
« no previous file with comments | « ui/gfx/gfx.gyp ('k') | ui/gfx/ozone/dri/dri_surface_factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "third_party/skia/include/core/SkBitmap.h" 9 #include "third_party/skia/include/core/SkBitmap.h"
10 #include "ui/gfx/ozone/surface_factory_ozone.h" 10 #include "ui/gfx/ozone/surface_factory_ozone.h"
11 #include "ui/gfx/ozone/surface_ozone.h"
11 12
12 namespace gfx { 13 namespace gfx {
13 14
14 class DriSurface; 15 class DriSurface;
15 class DriWrapper; 16 class DriWrapper;
16 class HardwareDisplayController; 17 class HardwareDisplayController;
18 class SurfaceOzone;
17 19
18 // SurfaceFactoryOzone implementation on top of DRM/KMS using dumb buffers. 20 // SurfaceFactoryOzone implementation on top of DRM/KMS using dumb buffers.
19 // This implementation is used in conjunction with the software rendering 21 // This implementation is used in conjunction with the software rendering
20 // path. 22 // path.
21 class GFX_EXPORT DriSurfaceFactory : public SurfaceFactoryOzone { 23 class GFX_EXPORT DriSurfaceFactory : public SurfaceFactoryOzone {
22 public: 24 public:
23 DriSurfaceFactory(); 25 DriSurfaceFactory();
24 virtual ~DriSurfaceFactory(); 26 virtual ~DriSurfaceFactory();
25 27
26 virtual HardwareState InitializeHardware() OVERRIDE; 28 virtual HardwareState InitializeHardware() OVERRIDE;
27 virtual void ShutdownHardware() OVERRIDE; 29 virtual void ShutdownHardware() OVERRIDE;
28 30
29 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; 31 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE;
30 virtual gfx::AcceleratedWidget RealizeAcceleratedWidget( 32
33 virtual scoped_ptr<SurfaceOzone> CreateSurfaceForWidget(
31 gfx::AcceleratedWidget w) OVERRIDE; 34 gfx::AcceleratedWidget w) OVERRIDE;
32 35
33 virtual bool LoadEGLGLES2Bindings( 36 virtual bool LoadEGLGLES2Bindings(
34 AddGLLibraryCallback add_gl_library, 37 AddGLLibraryCallback add_gl_library,
35 SetGLGetProcAddressProcCallback set_gl_get_proc_address) OVERRIDE; 38 SetGLGetProcAddressProcCallback set_gl_get_proc_address) OVERRIDE;
36 39
37 virtual bool AttemptToResizeAcceleratedWidget( 40 virtual bool SchedulePageFlip(gfx::AcceleratedWidget w);
38 gfx::AcceleratedWidget w,
39 const gfx::Rect& bounds) OVERRIDE;
40 41
41 virtual bool SchedulePageFlip(gfx::AcceleratedWidget w) OVERRIDE; 42 virtual SkCanvas* GetCanvasForWidget(gfx::AcceleratedWidget w);
42
43 virtual SkCanvas* GetCanvasForWidget(gfx::AcceleratedWidget w) OVERRIDE;
44 43
45 virtual scoped_ptr<gfx::VSyncProvider> CreateVSyncProvider( 44 virtual scoped_ptr<gfx::VSyncProvider> CreateVSyncProvider(
46 gfx::AcceleratedWidget w) OVERRIDE; 45 gfx::AcceleratedWidget w);
47 46
48 void SetHardwareCursor(AcceleratedWidget window, 47 void SetHardwareCursor(AcceleratedWidget window,
49 const SkBitmap& image, 48 const SkBitmap& image,
50 const gfx::Point& location); 49 const gfx::Point& location);
51 50
52 void MoveHardwareCursor(AcceleratedWidget window, const gfx::Point& location); 51 void MoveHardwareCursor(AcceleratedWidget window, const gfx::Point& location);
53 52
54 void UnsetHardwareCursor(AcceleratedWidget window); 53 void UnsetHardwareCursor(AcceleratedWidget window);
55 54
56 private: 55 private:
(...skipping 25 matching lines...) Expand all
82 81
83 SkBitmap cursor_bitmap_; 82 SkBitmap cursor_bitmap_;
84 gfx::Point cursor_location_; 83 gfx::Point cursor_location_;
85 84
86 DISALLOW_COPY_AND_ASSIGN(DriSurfaceFactory); 85 DISALLOW_COPY_AND_ASSIGN(DriSurfaceFactory);
87 }; 86 };
88 87
89 } // namespace gfx 88 } // namespace gfx
90 89
91 #endif // UI_GFX_OZONE_DRI_DRI_SURFACE_FACTORY_H_ 90 #endif // UI_GFX_OZONE_DRI_DRI_SURFACE_FACTORY_H_
OLDNEW
« no previous file with comments | « ui/gfx/gfx.gyp ('k') | ui/gfx/ozone/dri/dri_surface_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698