diff options
author | Tobias Hunger <tobias.hunger@qt.io> | 2019-04-16 16:32:08 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@qt.io> | 2019-04-16 16:32:08 +0200 |
commit | 6630937e63ae5797487b86743a7733c8ae5cc42c (patch) | |
tree | 3d53dacf6430f9099e1fb20835881205de674961 /src/3rdparty/angle/src/libANGLE/AttributeMap.h | |
parent | 37ed6dae00640f9cc980ffda05347c12a7eb5d7e (diff) | |
parent | c7af193d2e49e9f10b86262e63d8d13abf72b5cf (diff) |
Merge commit 'dev' into 'wip/cmake-merge'
Change-Id: I176c40d031be26a1dd1cf08843e448a660598783
Diffstat (limited to 'src/3rdparty/angle/src/libANGLE/AttributeMap.h')
-rw-r--r-- | src/3rdparty/angle/src/libANGLE/AttributeMap.h | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/src/3rdparty/angle/src/libANGLE/AttributeMap.h b/src/3rdparty/angle/src/libANGLE/AttributeMap.h index 56f1684415..eddc1b72d0 100644 --- a/src/3rdparty/angle/src/libANGLE/AttributeMap.h +++ b/src/3rdparty/angle/src/libANGLE/AttributeMap.h @@ -11,6 +11,7 @@ #include <EGL/egl.h> #include <map> +#include <vector> namespace egl { @@ -19,19 +20,28 @@ class AttributeMap final { public: AttributeMap(); - explicit AttributeMap(const EGLint *attributes); + AttributeMap(const AttributeMap &other); + ~AttributeMap(); - void insert(EGLint key, EGLint value); - bool contains(EGLint key) const; - EGLint get(EGLint key, EGLint defaultValue) const; + void insert(EGLAttrib key, EGLAttrib value); + bool contains(EGLAttrib key) const; + EGLAttrib get(EGLAttrib key) const; + EGLAttrib get(EGLAttrib key, EGLAttrib defaultValue) const; + EGLint getAsInt(EGLAttrib key) const; + EGLint getAsInt(EGLAttrib key, EGLint defaultValue) const; + bool isEmpty() const; + std::vector<EGLint> toIntVector() const; - typedef std::map<EGLint, EGLint>::const_iterator const_iterator; + typedef std::map<EGLAttrib, EGLAttrib>::const_iterator const_iterator; const_iterator begin() const; const_iterator end() const; + static AttributeMap CreateFromIntArray(const EGLint *attributes); + static AttributeMap CreateFromAttribArray(const EGLAttrib *attributes); + private: - std::map<EGLint, EGLint> mAttributes; + std::map<EGLAttrib, EGLAttrib> mAttributes; }; } |