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

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

Issue 106633002: GBM Ozone implementation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 6 years, 6 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef UI_OZONE_PLATFORM_DRI_SCANOUT_SURFACE_H_
6 #define UI_OZONE_PLATFORM_DRI_SCANOUT_SURFACE_H_
7
8 #include <stdint.h>
9
10 namespace gfx {
11 class Size;
12 }
13
14 namespace ui {
15
16 // Initializes and stores state associated with the drawing surface.
rjkroege 2014/05/27 15:33:42 I'd appreciate a bit more explanation here.
dnicoara 2014/05/27 17:20:52 Done. Moved the generic part from DriSurface here.
17 class ScanoutSurface {
18 public:
19 virtual ~ScanoutSurface() {}
20
21 // Used to allocate all necessary buffers for this surface. If the
22 // initialization succeeds, the device is ready to be used for drawing
23 // operations.
24 // Returns true if the initialization is successful, false otherwise.
25 virtual bool Initialize() = 0;
26
27 // Swaps the back buffer with the front buffer.
28 virtual void SwapBuffers() = 0;
29
30 // Returns the ID of the current backbuffer.
31 virtual uint32_t GetFramebufferId() const = 0;
32
33 // Returns the handle of the current backbuffer.
34 virtual uint32_t GetHandle() const = 0;
35
36 // Returns the surface size.
37 virtual gfx::Size Size() const = 0;
38 };
39
40 class ScanoutSurfaceGenerator {
41 public:
42 virtual ~ScanoutSurfaceGenerator() {}
43
44 virtual ScanoutSurface* Create(const gfx::Size& size) = 0;
45 };
46
47 } // namespace ui
48
49 #endif // UI_OZONE_PLATFORM_DRI_SCANOUT_SURFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698