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

Side by Side Diff: ui/ozone/platform/dri/dri_surface.h

Issue 794603003: [Ozone] Fix build (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « ui/ozone/platform/caca/caca_window_manager.cc ('k') | ui/ozone/platform/dri/dri_surface.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 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/public/surface_ozone_canvas.h" 12 #include "ui/ozone/public/surface_ozone_canvas.h"
13 13
14 class SkCanvas;
15 class SkSurface; 14 class SkSurface;
16 15
17 namespace ui { 16 namespace ui {
18 17
19 class DriBuffer; 18 class DriBuffer;
20 class DriWindowDelegate; 19 class DriWindowDelegate;
21 class DriWrapper; 20 class DriWrapper;
22 class HardwareDisplayController; 21 class HardwareDisplayController;
23 22
24 class DriSurface : public SurfaceOzoneCanvas { 23 class DriSurface : public SurfaceOzoneCanvas {
25 public: 24 public:
26 DriSurface(DriWindowDelegate* window_delegate, DriWrapper* dri); 25 DriSurface(DriWindowDelegate* window_delegate, DriWrapper* dri);
27 ~DriSurface() override; 26 ~DriSurface() override;
28 27
29 // SurfaceOzoneCanvas: 28 // SurfaceOzoneCanvas:
30 skia::RefPtr<SkCanvas> GetCanvas() override; 29 skia::RefPtr<SkSurface> GetSurface() override;
31 void ResizeCanvas(const gfx::Size& viewport_size) override; 30 void ResizeCanvas(const gfx::Size& viewport_size) override;
32 void PresentCanvas(const gfx::Rect& damage) override; 31 void PresentCanvas(const gfx::Rect& damage) override;
33 scoped_ptr<gfx::VSyncProvider> CreateVSyncProvider() override; 32 scoped_ptr<gfx::VSyncProvider> CreateVSyncProvider() override;
34 33
35 private: 34 private:
36 void UpdateNativeSurface(const gfx::Rect& damage); 35 void UpdateNativeSurface(const gfx::Rect& damage);
37 36
38 DriWindowDelegate* window_delegate_; 37 DriWindowDelegate* window_delegate_;
39 38
40 // Stores the connection to the graphics card. Pointer not owned by this 39 // Stores the connection to the graphics card. Pointer not owned by this
41 // class. 40 // class.
42 DriWrapper* dri_; 41 DriWrapper* dri_;
43 42
44 // The actual buffers used for painting. 43 // The actual buffers used for painting.
45 scoped_refptr<DriBuffer> buffers_[2]; 44 scoped_refptr<DriBuffer> buffers_[2];
46 45
47 // Keeps track of which bitmap is |buffers_| is the frontbuffer. 46 // Keeps track of which bitmap is |buffers_| is the frontbuffer.
48 int front_buffer_; 47 int front_buffer_;
49 48
50 skia::RefPtr<SkSurface> surface_; 49 skia::RefPtr<SkSurface> surface_;
51 gfx::Rect last_damage_; 50 gfx::Rect last_damage_;
52 51
53 DISALLOW_COPY_AND_ASSIGN(DriSurface); 52 DISALLOW_COPY_AND_ASSIGN(DriSurface);
54 }; 53 };
55 54
56 } // namespace ui 55 } // namespace ui
57 56
58 #endif // UI_OZONE_PLATFORM_DRI_DRI_SURFACE_H_ 57 #endif // UI_OZONE_PLATFORM_DRI_DRI_SURFACE_H_
OLDNEW
« no previous file with comments | « ui/ozone/platform/caca/caca_window_manager.cc ('k') | ui/ozone/platform/dri/dri_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698