Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "ui/ozone/ozone_export.h" | 12 #include "ui/ozone/ozone_export.h" |
| 13 #include "ui/ozone/platform/drm/common/scoped_drm_types.h" | 13 #include "ui/ozone/platform/drm/common/scoped_drm_types.h" |
| 14 | 14 |
| 15 namespace gfx { | 15 namespace gfx { |
| 16 class Rect; | 16 class Rect; |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace ui { | 19 namespace ui { |
| 20 | 20 |
| 21 class DrmDevice; | 21 class DrmDevice; |
| 22 | 22 |
| 23 class OZONE_EXPORT HardwareDisplayPlane { | 23 class OZONE_EXPORT HardwareDisplayPlane { |
| 24 public: | 24 public: |
| 25 enum Type { Primary, Overlay, Cursor, Dummy }; | |
|
dnicoara
2015/08/20 14:22:45
As per the coding guide, please use MACRO_STYLE fo
kalyank
2015/08/20 16:36:18
Done.
| |
| 26 | |
| 25 HardwareDisplayPlane(uint32_t plane_id, uint32_t possible_crtcs); | 27 HardwareDisplayPlane(uint32_t plane_id, uint32_t possible_crtcs); |
| 26 | 28 |
| 27 virtual ~HardwareDisplayPlane(); | 29 virtual ~HardwareDisplayPlane(); |
| 28 | 30 |
| 29 virtual bool Initialize(DrmDevice* drm, const std::vector<uint32_t>& formats); | 31 virtual bool Initialize(DrmDevice* drm, |
| 32 const std::vector<uint32_t>& formats, | |
| 33 bool is_dummy); | |
| 30 | 34 |
| 31 virtual bool IsSupportedFormat(uint32_t format) const; | 35 virtual bool IsSupportedFormat(uint32_t format) const; |
| 32 | 36 |
| 33 bool CanUseForCrtc(uint32_t crtc_index); | 37 bool CanUseForCrtc(uint32_t crtc_index); |
| 34 | 38 |
| 35 bool in_use() const { return in_use_; } | 39 bool in_use() const { return in_use_; } |
| 36 void set_in_use(bool in_use) { in_use_ = in_use; } | 40 void set_in_use(bool in_use) { in_use_ = in_use; } |
| 37 | 41 |
| 38 bool is_dummy() const { return is_dummy_; } | 42 uint32_t plane_id() const { return plane_id_; } |
| 39 void set_is_dummy(bool is_dummy) { is_dummy_ = is_dummy; } | |
| 40 | 43 |
| 41 uint32_t plane_id() const { return plane_id_; } | 44 Type type() const { return type_; } |
| 42 | 45 |
| 43 void set_owning_crtc(uint32_t crtc) { owning_crtc_ = crtc; } | 46 void set_owning_crtc(uint32_t crtc) { owning_crtc_ = crtc; } |
| 44 uint32_t owning_crtc() const { return owning_crtc_; } | 47 uint32_t owning_crtc() const { return owning_crtc_; } |
| 45 | 48 |
| 46 protected: | 49 protected: |
| 47 uint32_t plane_id_ = 0; | 50 uint32_t plane_id_ = 0; |
| 48 uint32_t possible_crtcs_ = 0; | 51 uint32_t possible_crtcs_ = 0; |
| 49 uint32_t owning_crtc_ = 0; | 52 uint32_t owning_crtc_ = 0; |
| 50 bool in_use_ = false; | 53 bool in_use_ = false; |
| 51 bool is_dummy_ = false; | 54 Type type_ = Primary; |
| 52 | 55 |
| 53 DISALLOW_COPY_AND_ASSIGN(HardwareDisplayPlane); | 56 DISALLOW_COPY_AND_ASSIGN(HardwareDisplayPlane); |
| 54 }; | 57 }; |
| 55 | 58 |
| 56 } // namespace ui | 59 } // namespace ui |
| 57 | 60 |
| 58 #endif // UI_OZONE_PLATFORM_DRM_GPU_HARDWARE_DISPLAY_PLANE_H_ | 61 #endif // UI_OZONE_PLATFORM_DRM_GPU_HARDWARE_DISPLAY_PLANE_H_ |
| OLD | NEW |