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

Side by Side Diff: ui/ozone/platform/drm/gpu/drm_device.h

Issue 1028563003: Load and apply a vcgt table from an ICC file to the internal display (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor fixes Created 5 years, 7 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_DRM_GPU_DRM_DEVICE_H_ 5 #ifndef UI_OZONE_PLATFORM_DRM_GPU_DRM_DEVICE_H_
6 #define UI_OZONE_PLATFORM_DRM_GPU_DRM_DEVICE_H_ 6 #define UI_OZONE_PLATFORM_DRM_GPU_DRM_DEVICE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 16 matching lines...) Expand all
27 27
28 struct SkImageInfo; 28 struct SkImageInfo;
29 29
30 namespace base { 30 namespace base {
31 class SingleThreadTaskRunner; 31 class SingleThreadTaskRunner;
32 } // namespace base 32 } // namespace base
33 33
34 namespace ui { 34 namespace ui {
35 35
36 class HardwareDisplayPlaneManager; 36 class HardwareDisplayPlaneManager;
37 struct GammaRampRGBEntry;
37 38
38 // Wraps DRM calls into a nice interface. Used to provide different 39 // Wraps DRM calls into a nice interface. Used to provide different
39 // implementations of the DRM calls. For the actual implementation the DRM API 40 // implementations of the DRM calls. For the actual implementation the DRM API
40 // would be called. In unit tests this interface would be stubbed. 41 // would be called. In unit tests this interface would be stubbed.
41 class OZONE_EXPORT DrmDevice : public base::RefCountedThreadSafe<DrmDevice> { 42 class OZONE_EXPORT DrmDevice : public base::RefCountedThreadSafe<DrmDevice> {
42 public: 43 public:
43 typedef base::Callback<void(unsigned int /* frame */, 44 typedef base::Callback<void(unsigned int /* frame */,
44 unsigned int /* seconds */, 45 unsigned int /* seconds */,
45 unsigned int /* useconds */)> PageFlipCallback; 46 unsigned int /* useconds */)> PageFlipCallback;
46 47
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 152
152 virtual void DestroyDumbBuffer(const SkImageInfo& info, 153 virtual void DestroyDumbBuffer(const SkImageInfo& info,
153 uint32_t handle, 154 uint32_t handle,
154 uint32_t stride, 155 uint32_t stride,
155 void* pixels); 156 void* pixels);
156 157
157 virtual bool CommitProperties(drmModePropertySet* properties, 158 virtual bool CommitProperties(drmModePropertySet* properties,
158 uint32_t flags, 159 uint32_t flags,
159 const PageFlipCallback& callback); 160 const PageFlipCallback& callback);
160 161
162 // Set the gamma ramp for |crtc_id| to reflect the ramps in |lut|.
163 virtual bool SetGammaRamp(uint32_t crtc_id,
164 const std::vector<GammaRampRGBEntry>& lut);
165
161 // Drm master related 166 // Drm master related
162 virtual bool SetMaster(); 167 virtual bool SetMaster();
163 virtual bool DropMaster(); 168 virtual bool DropMaster();
164 169
165 int get_fd() const { return file_.GetPlatformFile(); } 170 int get_fd() const { return file_.GetPlatformFile(); }
166 171
167 base::FilePath device_path() const { return device_path_; } 172 base::FilePath device_path() const { return device_path_; }
168 173
169 HardwareDisplayPlaneManager* plane_manager() { return plane_manager_.get(); } 174 HardwareDisplayPlaneManager* plane_manager() { return plane_manager_.get(); }
170 175
(...skipping 18 matching lines...) Expand all
189 194
190 // Watcher for |fd_| listening for page flip events. 195 // Watcher for |fd_| listening for page flip events.
191 scoped_refptr<IOWatcher> watcher_; 196 scoped_refptr<IOWatcher> watcher_;
192 197
193 DISALLOW_COPY_AND_ASSIGN(DrmDevice); 198 DISALLOW_COPY_AND_ASSIGN(DrmDevice);
194 }; 199 };
195 200
196 } // namespace ui 201 } // namespace ui
197 202
198 #endif // UI_OZONE_PLATFORM_DRM_GPU_DRM_DEVICE_H_ 203 #endif // UI_OZONE_PLATFORM_DRM_GPU_DRM_DEVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698