summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/angle/src/libANGLE/AttributeMap.h
diff options
context:
space:
mode:
authorMiguel Costa <miguel.costa@qt.io>2018-06-26 16:56:45 +0200
committerAndre de la Rocha <andre.rocha@qt.io>2018-10-13 21:36:35 +0000
commit0a7aebadfbb3534284546aa3ca8612314c08f136 (patch)
treee94ee33ae3bb9b96fc3047c6455d47ac4920bfbf /src/3rdparty/angle/src/libANGLE/AttributeMap.h
parent656e89f875ad2008ca16cc673b687a22daa294c9 (diff)
Update ANGLE to chromium/3280
Change-Id: I0802c0d7486f772d361f87a544d6c5af937f4ca1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/3rdparty/angle/src/libANGLE/AttributeMap.h')
-rw-r--r--src/3rdparty/angle/src/libANGLE/AttributeMap.h22
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;
};
}