diff options
author | Zach Reizner <zachr@google.com> | 2015-10-28 19:08:45 -0700 |
---|---|---|
committer | Zach Reizner <zachr@google.com> | 2015-10-29 09:59:39 -0700 |
commit | ff30b52303cdbeb9cbfb054e2a12da1135ea49c9 (patch) | |
tree | d6b9dbc08f43ae2c4814c23c653e632b4180bae1 /drmencoder.h | |
parent | 7cd2643b0de900e00e5b0cc0bd6dbbc649840b02 (diff) |
drm_hwcomposer: polish for old DRM wrapper code
- deleted private copy constructors
- replace delete with unique_ptr
- use in-class assignment
- remove default constructors/destructors when no longer needed
- remove most iterators used in for loops
- move UniqueFd to its own header so drmresources can use it
Change-Id: Ib20cc0949cf4d381a58548b8156c5cb368ca3efe
Diffstat (limited to 'drmencoder.h')
-rw-r--r-- | drmencoder.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drmencoder.h b/drmencoder.h index cf33069..ed3c21e 100644 --- a/drmencoder.h +++ b/drmencoder.h @@ -27,23 +27,21 @@ namespace android { class DrmEncoder { public: - typedef std::vector<DrmCrtc *>::const_iterator CrtcIter; - DrmEncoder(drmModeEncoderPtr e, DrmCrtc *current_crtc, const std::vector<DrmCrtc *> &possible_crtcs); - ~DrmEncoder(); + DrmEncoder(const DrmEncoder &) = delete; + DrmEncoder &operator=(const DrmEncoder &) = delete; uint32_t id() const; DrmCrtc *crtc() const; void set_crtc(DrmCrtc *crtc); - CrtcIter begin_possible_crtcs() const; - CrtcIter end_possible_crtcs() const; + const std::vector<DrmCrtc *> &possible_crtcs() const { + return possible_crtcs_; + } private: - DrmEncoder(const DrmEncoder &); - uint32_t id_; DrmCrtc *crtc_; |