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

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

Issue 393233005: [Ozone-DRI] Convert HardwareDisplayController to use scanout buffers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . 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 | Annotate | Revision Log
« no previous file with comments | « ui/ozone/platform/dri/gbm_buffer.cc ('k') | ui/ozone/platform/dri/gbm_surface_factory.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_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/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "ui/gfx/geometry/size.h" 10 #include "ui/gfx/geometry/size.h"
(...skipping 10 matching lines...) Expand all
21 class GbmBufferBase; 21 class GbmBufferBase;
22 22
23 // Implement the ScanoutSurface interface on top of GBM (Generic Buffer 23 // Implement the ScanoutSurface interface on top of GBM (Generic Buffer
24 // Manager). GBM provides generic access to hardware accelerated surfaces which 24 // Manager). GBM provides generic access to hardware accelerated surfaces which
25 // can be used in association with EGL to provide accelerated drawing. 25 // can be used in association with EGL to provide accelerated drawing.
26 class GbmSurface : public ScanoutSurface { 26 class GbmSurface : public ScanoutSurface {
27 public: 27 public:
28 GbmSurface(gbm_device* device, DriWrapper* dri, const gfx::Size& size); 28 GbmSurface(gbm_device* device, DriWrapper* dri, const gfx::Size& size);
29 virtual ~GbmSurface(); 29 virtual ~GbmSurface();
30 30
31 scoped_refptr<GbmBufferBase> backbuffer() const {
32 return buffers_[front_buffer_ ^ 1];
33 }
34
31 // ScanoutSurface: 35 // ScanoutSurface:
32 virtual bool Initialize() OVERRIDE; 36 virtual bool Initialize() OVERRIDE;
33 virtual uint32_t GetFramebufferId() const OVERRIDE; 37 virtual uint32_t GetFramebufferId() const OVERRIDE;
34 virtual uint32_t GetHandle() const OVERRIDE; 38 virtual uint32_t GetHandle() const OVERRIDE;
35 virtual gfx::Size Size() const OVERRIDE; 39 virtual gfx::Size Size() const OVERRIDE;
36 virtual void PreSwapBuffers() OVERRIDE; 40 virtual void PreSwapBuffers() OVERRIDE;
37 virtual void SwapBuffers() OVERRIDE; 41 virtual void SwapBuffers() OVERRIDE;
38 42
39 gbm_surface* native_surface() { return native_surface_; }; 43 gbm_surface* native_surface() { return native_surface_; };
40 44
(...skipping 19 matching lines...) Expand all
60 // before an actual window is created and draws. So, we create a dumb buffer 64 // before an actual window is created and draws. So, we create a dumb buffer
61 // for this purpose. 65 // for this purpose.
62 scoped_refptr<DriBuffer> dumb_buffer_; 66 scoped_refptr<DriBuffer> dumb_buffer_;
63 67
64 DISALLOW_COPY_AND_ASSIGN(GbmSurface); 68 DISALLOW_COPY_AND_ASSIGN(GbmSurface);
65 }; 69 };
66 70
67 } // namespace ui 71 } // namespace ui
68 72
69 #endif // UI_OZONE_PLATFORM_DRI_GBM_SURFACE_H_ 73 #endif // UI_OZONE_PLATFORM_DRI_GBM_SURFACE_H_
OLDNEW
« no previous file with comments | « ui/ozone/platform/dri/gbm_buffer.cc ('k') | ui/ozone/platform/dri/gbm_surface_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698