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

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

Issue 402773002: [Ozone-DRI] Removing MockDriSurface implementation (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
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_DRI_WRAPPER_H_ 5 #ifndef UI_OZONE_PLATFORM_DRI_DRI_WRAPPER_H_
6 #define UI_OZONE_PLATFORM_DRI_DRI_WRAPPER_H_ 6 #define UI_OZONE_PLATFORM_DRI_DRI_WRAPPER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "ui/gfx/overlay_transform.h" 11 #include "ui/gfx/overlay_transform.h"
12 #include "ui/gfx/rect.h" 12 #include "ui/gfx/rect.h"
13 #include "ui/gfx/rect_f.h" 13 #include "ui/gfx/rect_f.h"
14 #include "ui/ozone/platform/dri/scoped_drm_types.h" 14 #include "ui/ozone/platform/dri/scoped_drm_types.h"
15 15
16 typedef struct _drmEventContext drmEventContext; 16 typedef struct _drmEventContext drmEventContext;
17 typedef struct _drmModeModeInfo drmModeModeInfo; 17 typedef struct _drmModeModeInfo drmModeModeInfo;
18 18
19 struct SkImageInfo;
20
19 namespace ui { 21 namespace ui {
20 22
21 // Wraps DRM calls into a nice interface. Used to provide different 23 // Wraps DRM calls into a nice interface. Used to provide different
22 // implementations of the DRM calls. For the actual implementation the DRM API 24 // implementations of the DRM calls. For the actual implementation the DRM API
23 // would be called. In unit tests this interface would be stubbed. 25 // would be called. In unit tests this interface would be stubbed.
24 class DriWrapper { 26 class DriWrapper {
25 public: 27 public:
26 DriWrapper(const char* device_path); 28 DriWrapper(const char* device_path);
27 virtual ~DriWrapper(); 29 virtual ~DriWrapper();
28 30
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 uint32_t handle, 106 uint32_t handle,
105 uint32_t width, 107 uint32_t width,
106 uint32_t height); 108 uint32_t height);
107 109
108 110
109 // Move the cursor on CRTC |crtc_id| to (x, y); 111 // Move the cursor on CRTC |crtc_id| to (x, y);
110 virtual bool MoveCursor(uint32_t crtc_id, int x, int y); 112 virtual bool MoveCursor(uint32_t crtc_id, int x, int y);
111 113
112 virtual void HandleEvent(drmEventContext& event); 114 virtual void HandleEvent(drmEventContext& event);
113 115
116 virtual bool CreateDumbBuffer(const SkImageInfo& info,
117 uint32_t* handle,
118 uint32_t* stride,
119 void** pixels);
120
121 virtual void DestroyDumbBuffer(const SkImageInfo& info,
122 uint32_t handle,
123 uint32_t stride,
124 void* pixels);
125
114 int get_fd() const { return fd_; } 126 int get_fd() const { return fd_; }
115 127
116 protected: 128 protected:
117 // The file descriptor associated with this wrapper. All DRM operations will 129 // The file descriptor associated with this wrapper. All DRM operations will
118 // be performed using this FD. 130 // be performed using this FD.
119 int fd_; 131 int fd_;
120 132
121 private: 133 private:
122 DISALLOW_COPY_AND_ASSIGN(DriWrapper); 134 DISALLOW_COPY_AND_ASSIGN(DriWrapper);
123 }; 135 };
124 136
125 } // namespace ui 137 } // namespace ui
126 138
127 #endif // UI_OZONE_PLATFORM_DRI_DRI_WRAPPER_H_ 139 #endif // UI_OZONE_PLATFORM_DRI_DRI_WRAPPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698