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_GBM_SURFACE_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRI_GBM_SURFACE_H_ |
6 #define UI_OZONE_PLATFORM_DRI_GBM_SURFACE_H_ | 6 #define UI_OZONE_PLATFORM_DRI_GBM_SURFACE_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "ui/gfx/geometry/size.h" | 10 #include "ui/gfx/geometry/size.h" |
11 #include "ui/ozone/platform/dri/scanout_surface.h" | 11 #include "ui/ozone/platform/dri/scanout_surface.h" |
12 | 12 |
13 struct gbm_bo; | 13 struct gbm_bo; |
14 struct gbm_device; | 14 struct gbm_device; |
15 struct gbm_surface; | 15 struct gbm_surface; |
16 | 16 |
17 namespace ui { | 17 namespace ui { |
18 | 18 |
19 class DriBuffer; | 19 class DriBuffer; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 // current backbuffer that is pending scan out. | 51 // current backbuffer that is pending scan out. |
52 gbm_bo* buffers_[2]; | 52 gbm_bo* buffers_[2]; |
53 | 53 |
54 // Index to the front buffer. | 54 // Index to the front buffer. |
55 int front_buffer_; | 55 int front_buffer_; |
56 | 56 |
57 // We can't lock (and get) an accelerated buffer from the GBM surface until | 57 // We can't lock (and get) an accelerated buffer from the GBM surface until |
58 // after something draws into it. But modesetting needs to happen earlier, | 58 // after something draws into it. But modesetting needs to happen earlier, |
59 // before an actual window is created and draws. So, we create a dumb buffer | 59 // before an actual window is created and draws. So, we create a dumb buffer |
60 // for this purpose. | 60 // for this purpose. |
61 scoped_ptr<DriBuffer> dumb_buffer_; | 61 scoped_refptr<DriBuffer> dumb_buffer_; |
62 | 62 |
63 DISALLOW_COPY_AND_ASSIGN(GbmSurface); | 63 DISALLOW_COPY_AND_ASSIGN(GbmSurface); |
64 }; | 64 }; |
65 | 65 |
66 } // namespace ui | 66 } // namespace ui |
67 | 67 |
68 #endif // UI_OZONE_PLATFORM_DRI_GBM_SURFACE_H_ | 68 #endif // UI_OZONE_PLATFORM_DRI_GBM_SURFACE_H_ |
OLD | NEW |