diff options
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; }; } |