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

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

Issue 371813004: ozone: gbm: Add overlay support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix test code Created 6 years, 5 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
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_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/scoped_ptr.h"
10 #include "ui/gfx/geometry/size.h" 10 #include "ui/gfx/geometry/size.h"
(...skipping 14 matching lines...) Expand all
25 class GbmSurface : public ScanoutSurface { 25 class GbmSurface : public ScanoutSurface {
26 public: 26 public:
27 GbmSurface(gbm_device* device, DriWrapper* dri, const gfx::Size& size); 27 GbmSurface(gbm_device* device, DriWrapper* dri, const gfx::Size& size);
28 virtual ~GbmSurface(); 28 virtual ~GbmSurface();
29 29
30 // ScanoutSurface: 30 // ScanoutSurface:
31 virtual bool Initialize() OVERRIDE; 31 virtual bool Initialize() OVERRIDE;
32 virtual uint32_t GetFramebufferId() const OVERRIDE; 32 virtual uint32_t GetFramebufferId() const OVERRIDE;
33 virtual uint32_t GetHandle() const OVERRIDE; 33 virtual uint32_t GetHandle() const OVERRIDE;
34 virtual gfx::Size Size() const OVERRIDE; 34 virtual gfx::Size Size() const OVERRIDE;
35 virtual void PreSwapBuffers() OVERRIDE;
35 virtual void SwapBuffers() OVERRIDE; 36 virtual void SwapBuffers() OVERRIDE;
36 37
37 // Before scheduling the backbuffer to be scanned out we need to "lock" it. 38 // Before scheduling the backbuffer to be scanned out we need to "lock" it.
38 // When we lock it, GBM will give a pointer to a buffer representing the 39 // When we lock it, GBM will give a pointer to a buffer representing the
39 // backbuffer. It will also update its information on which buffers can not be 40 // backbuffer. It will also update its information on which buffers can not be
40 // used for drawing. The buffer will be released when the page flip event 41 // used for drawing. The buffer will be released when the page flip event
41 // occurs (see SwapBuffers). This is called from GbmSurfaceFactory before 42 // occurs (see SwapBuffers). This is called from GbmSurfaceFactory before
42 // scheduling a page flip. 43 // scheduling a page flip.
43 void LockCurrentDrawable(); 44 void LockCurrentDrawable();
44 45
(...skipping 21 matching lines...) Expand all
66 // before an actual window is created and draws. So, we create a dumb buffer 67 // before an actual window is created and draws. So, we create a dumb buffer
67 // for this purpose. 68 // for this purpose.
68 scoped_ptr<DriBuffer> dumb_buffer_; 69 scoped_ptr<DriBuffer> dumb_buffer_;
69 70
70 DISALLOW_COPY_AND_ASSIGN(GbmSurface); 71 DISALLOW_COPY_AND_ASSIGN(GbmSurface);
71 }; 72 };
72 73
73 } // namespace ui 74 } // namespace ui
74 75
75 #endif // UI_OZONE_PLATFORM_DRI_GBM_SURFACE_H_ 76 #endif // UI_OZONE_PLATFORM_DRI_GBM_SURFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698