OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_OZONE_PLATFORM_DRI_DRI_SURFACE_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRI_DRI_SURFACE_H_ |
6 #define UI_OZONE_PLATFORM_DRI_DRI_SURFACE_H_ | 6 #define UI_OZONE_PLATFORM_DRI_DRI_SURFACE_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "ui/gfx/geometry/rect.h" | 9 #include "ui/gfx/geometry/rect.h" |
10 #include "ui/gfx/geometry/size.h" | 10 #include "ui/gfx/geometry/size.h" |
11 #include "ui/gfx/skia_util.h" | 11 #include "ui/gfx/skia_util.h" |
| 12 #include "ui/ozone/ozone_export.h" |
12 #include "ui/ozone/public/surface_ozone_canvas.h" | 13 #include "ui/ozone/public/surface_ozone_canvas.h" |
13 | 14 |
14 class SkSurface; | 15 class SkSurface; |
15 | 16 |
16 namespace ui { | 17 namespace ui { |
17 | 18 |
18 class DriBuffer; | 19 class DriBuffer; |
19 class DriWindowDelegate; | 20 class DriWindowDelegate; |
20 class DriWrapper; | 21 class DriWrapper; |
21 class HardwareDisplayController; | 22 class HardwareDisplayController; |
22 | 23 |
23 class DriSurface : public SurfaceOzoneCanvas { | 24 class OZONE_EXPORT DriSurface : public SurfaceOzoneCanvas { |
24 public: | 25 public: |
25 DriSurface(DriWindowDelegate* window_delegate, DriWrapper* dri); | 26 DriSurface(DriWindowDelegate* window_delegate, DriWrapper* dri); |
26 ~DriSurface() override; | 27 ~DriSurface() override; |
27 | 28 |
28 // SurfaceOzoneCanvas: | 29 // SurfaceOzoneCanvas: |
29 skia::RefPtr<SkSurface> GetSurface() override; | 30 skia::RefPtr<SkSurface> GetSurface() override; |
30 void ResizeCanvas(const gfx::Size& viewport_size) override; | 31 void ResizeCanvas(const gfx::Size& viewport_size) override; |
31 void PresentCanvas(const gfx::Rect& damage) override; | 32 void PresentCanvas(const gfx::Rect& damage) override; |
32 scoped_ptr<gfx::VSyncProvider> CreateVSyncProvider() override; | 33 scoped_ptr<gfx::VSyncProvider> CreateVSyncProvider() override; |
33 | 34 |
(...skipping 14 matching lines...) Expand all Loading... |
48 | 49 |
49 skia::RefPtr<SkSurface> surface_; | 50 skia::RefPtr<SkSurface> surface_; |
50 gfx::Rect last_damage_; | 51 gfx::Rect last_damage_; |
51 | 52 |
52 DISALLOW_COPY_AND_ASSIGN(DriSurface); | 53 DISALLOW_COPY_AND_ASSIGN(DriSurface); |
53 }; | 54 }; |
54 | 55 |
55 } // namespace ui | 56 } // namespace ui |
56 | 57 |
57 #endif // UI_OZONE_PLATFORM_DRI_DRI_SURFACE_H_ | 58 #endif // UI_OZONE_PLATFORM_DRI_DRI_SURFACE_H_ |
OLD | NEW |