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

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

Issue 1314553002: Move Format checks to HardwareDisplayPlane (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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_HARDWARE_DISPLAY_PLANE_H_ 5 #ifndef UI_OZONE_PLATFORM_DRM_GPU_HARDWARE_DISPLAY_PLANE_H_
6 #define UI_OZONE_PLATFORM_DRM_GPU_HARDWARE_DISPLAY_PLANE_H_ 6 #define UI_OZONE_PLATFORM_DRM_GPU_HARDWARE_DISPLAY_PLANE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 10 matching lines...) Expand all
21 class DrmDevice; 21 class DrmDevice;
22 22
23 class OZONE_EXPORT HardwareDisplayPlane { 23 class OZONE_EXPORT HardwareDisplayPlane {
24 public: 24 public:
25 HardwareDisplayPlane(uint32_t plane_id, uint32_t possible_crtcs); 25 HardwareDisplayPlane(uint32_t plane_id, uint32_t possible_crtcs);
26 26
27 virtual ~HardwareDisplayPlane(); 27 virtual ~HardwareDisplayPlane();
28 28
29 virtual bool Initialize(DrmDevice* drm, const std::vector<uint32_t>& formats); 29 virtual bool Initialize(DrmDevice* drm, const std::vector<uint32_t>& formats);
30 30
31 virtual bool IsSupportedFormat(uint32_t format) const; 31 bool IsSupportedFormat(uint32_t format) const;
32 32
33 bool CanUseForCrtc(uint32_t crtc_index); 33 bool CanUseForCrtc(uint32_t crtc_index);
34 34
35 bool in_use() const { return in_use_; } 35 bool in_use() const { return in_use_; }
36 void set_in_use(bool in_use) { in_use_ = in_use; } 36 void set_in_use(bool in_use) { in_use_ = in_use; }
37 37
38 bool is_dummy() const { return is_dummy_; } 38 bool is_dummy() const { return is_dummy_; }
39 void set_is_dummy(bool is_dummy) { is_dummy_ = is_dummy; } 39 void set_is_dummy(bool is_dummy) { is_dummy_ = is_dummy; }
40 40
41 uint32_t plane_id() const { return plane_id_; } 41 uint32_t plane_id() const { return plane_id_; }
42 42
43 void set_owning_crtc(uint32_t crtc) { owning_crtc_ = crtc; } 43 void set_owning_crtc(uint32_t crtc) { owning_crtc_ = crtc; }
44 uint32_t owning_crtc() const { return owning_crtc_; } 44 uint32_t owning_crtc() const { return owning_crtc_; }
45 45
46 protected: 46 protected:
47 uint32_t plane_id_ = 0; 47 uint32_t plane_id_ = 0;
48 uint32_t possible_crtcs_ = 0; 48 uint32_t possible_crtcs_ = 0;
49 uint32_t owning_crtc_ = 0; 49 uint32_t owning_crtc_ = 0;
50 bool in_use_ = false; 50 bool in_use_ = false;
51 bool is_dummy_ = false; 51 bool is_dummy_ = false;
52 52
53 DISALLOW_COPY_AND_ASSIGN(HardwareDisplayPlane); 53 DISALLOW_COPY_AND_ASSIGN(HardwareDisplayPlane);
54 }; 54 };
55 55
56 } // namespace ui 56 } // namespace ui
57 57
58 #endif // UI_OZONE_PLATFORM_DRM_GPU_HARDWARE_DISPLAY_PLANE_H_ 58 #endif // UI_OZONE_PLATFORM_DRM_GPU_HARDWARE_DISPLAY_PLANE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698