OLD | NEW |
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_H_ | 5 #ifndef UI_GFX_OZONE_DRI_DRI_SURFACE_H_ |
6 #define UI_GFX_OZONE_DRI_DRI_SURFACE_H_ | 6 #define UI_GFX_OZONE_DRI_DRI_SURFACE_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "ui/gfx/geometry/size.h" | 10 #include "ui/gfx/geometry/size.h" |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 | 126 |
127 // Used to allocate all necessary buffers for this surface. If the | 127 // Used to allocate all necessary buffers for this surface. If the |
128 // initialization succeeds, the device is ready to be used for drawing | 128 // initialization succeeds, the device is ready to be used for drawing |
129 // operations. | 129 // operations. |
130 // Returns true if the initialization is successful, false otherwise. | 130 // Returns true if the initialization is successful, false otherwise. |
131 bool Initialize(); | 131 bool Initialize(); |
132 | 132 |
133 // Returns the ID of the current backbuffer. | 133 // Returns the ID of the current backbuffer. |
134 uint32_t GetFramebufferId() const; | 134 uint32_t GetFramebufferId() const; |
135 | 135 |
136 // Returns the handle for the current backbuffer. | 136 // Returns the handle for the current front buffer. |
137 uint32_t GetHandle() const; | 137 uint32_t GetFrontBufferHandle() const; |
138 | 138 |
139 // Synchronizes and swaps the back buffer with the front buffer. | 139 // Synchronizes and swaps the back buffer with the front buffer. |
140 void SwapBuffers(); | 140 void SwapBuffers(); |
141 | 141 |
142 // Get a Skia canvas for a backbuffer. | 142 // Get a Skia canvas for a backbuffer. |
143 SkCanvas* GetDrawableForWidget(); | 143 SkCanvas* GetDrawableForWidget(); |
144 | 144 |
145 const gfx::Size& size() const { return size_; } | 145 const gfx::Size& size() const { return size_; } |
146 | 146 |
147 private: | 147 private: |
(...skipping 20 matching lines...) Expand all Loading... |
168 | 168 |
169 // Surface size. | 169 // Surface size. |
170 gfx::Size size_; | 170 gfx::Size size_; |
171 | 171 |
172 DISALLOW_COPY_AND_ASSIGN(DriSurface); | 172 DISALLOW_COPY_AND_ASSIGN(DriSurface); |
173 }; | 173 }; |
174 | 174 |
175 } // namespace gfx | 175 } // namespace gfx |
176 | 176 |
177 #endif // UI_GFX_OZONE_DRI_DRI_SURFACE_H_ | 177 #endif // UI_GFX_OZONE_DRI_DRI_SURFACE_H_ |
OLD | NEW |