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

Side by Side Diff: ui/gfx/ozone/dri/dri_wrapper.h

Issue 132543002: Not for review. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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
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_WRAPPER_H_ 5 #ifndef UI_GFX_OZONE_DRI_DRI_WRAPPER_H_
6 #define UI_GFX_OZONE_DRI_DRI_WRAPPER_H_ 6 #define UI_GFX_OZONE_DRI_DRI_WRAPPER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "ui/gfx/gfx_export.h" 11 #include "ui/gfx/gfx_export.h"
12 #include "ui/gfx/rect.h"
13 #include "ui/gfx/size.h"
12 14
13 typedef struct _drmModeCrtc drmModeCrtc; 15 typedef struct _drmModeCrtc drmModeCrtc;
14 typedef struct _drmModeModeInfo drmModeModeInfo; 16 typedef struct _drmModeModeInfo drmModeModeInfo;
15 17
16 namespace gfx { 18 namespace gfx {
17 19
18 // Wraps DRM calls into a nice interface. Used to provide different 20 // Wraps DRM calls into a nice interface. Used to provide different
19 // implementations of the DRM calls. For the actual implementation the DRM API 21 // implementations of the DRM calls. For the actual implementation the DRM API
20 // would be called. In unit tests this interface would be stubbed. 22 // would be called. In unit tests this interface would be stubbed.
21 class GFX_EXPORT DriWrapper { 23 class GFX_EXPORT DriWrapper {
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 uint32_t* framebuffer); 57 uint32_t* framebuffer);
56 58
57 // Deregister the given |framebuffer|. 59 // Deregister the given |framebuffer|.
58 virtual bool RemoveFramebuffer(uint32_t framebuffer); 60 virtual bool RemoveFramebuffer(uint32_t framebuffer);
59 61
60 // Schedules a pageflip for CRTC |crtc_id|. This function will return 62 // Schedules a pageflip for CRTC |crtc_id|. This function will return
61 // immediately. Upon completion of the pageflip event, the CRTC will be 63 // immediately. Upon completion of the pageflip event, the CRTC will be
62 // displaying the buffer with ID |framebuffer| and will have a DRM event 64 // displaying the buffer with ID |framebuffer| and will have a DRM event
63 // queued on |fd_|. |data| is a generic pointer to some information the user 65 // queued on |fd_|. |data| is a generic pointer to some information the user
64 // will receive when processing the pageflip event. 66 // will receive when processing the pageflip event.
65 virtual bool PageFlip(uint32_t crtc_id, uint32_t framebuffer, void* data); 67 virtual bool PageFlip(uint32_t crtc_id,
68 uint32_t framebuffer,
69 gfx::Rect overlay_plane_rect,
70 gfx::Size overlay_plane_size,
71 uint32_t overlay_plane_fb_id,
72 int overlay_plane,
73 void* data);
66 74
67 // Sets the value of property with ID |property_id| to |value|. The property 75 // Sets the value of property with ID |property_id| to |value|. The property
68 // is applied to the connector with ID |connector_id|. 76 // is applied to the connector with ID |connector_id|.
69 virtual bool ConnectorSetProperty(uint32_t connector_id, 77 virtual bool ConnectorSetProperty(uint32_t connector_id,
70 uint32_t property_id, 78 uint32_t property_id,
71 uint64_t value); 79 uint64_t value);
72 80
73 int get_fd() const { return fd_; } 81 int get_fd() const { return fd_; }
74 82
75 protected: 83 protected:
76 // The file descriptor associated with this wrapper. All DRM operations will 84 // The file descriptor associated with this wrapper. All DRM operations will
77 // be performed using this FD. 85 // be performed using this FD.
78 int fd_; 86 int fd_;
79 87
80 private: 88 private:
81 DISALLOW_COPY_AND_ASSIGN(DriWrapper); 89 DISALLOW_COPY_AND_ASSIGN(DriWrapper);
82 }; 90 };
83 91
84 } // namespace gfx 92 } // namespace gfx
85 93
86 #endif // UI_GFX_OZONE_DRI_DRI_WRAPPER_H_ 94 #endif // UI_GFX_OZONE_DRI_DRI_WRAPPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698