diff options
author | Miguel Costa <miguel.costa@qt.io> | 2018-06-26 16:56:45 +0200 |
---|---|---|
committer | Andre de la Rocha <andre.rocha@qt.io> | 2018-10-13 21:36:35 +0000 |
commit | 0a7aebadfbb3534284546aa3ca8612314c08f136 (patch) | |
tree | e94ee33ae3bb9b96fc3047c6455d47ac4920bfbf /src/3rdparty/angle/src/compiler/translator/Cache.h | |
parent | 656e89f875ad2008ca16cc673b687a22daa294c9 (diff) |
Update ANGLE to chromium/3280
Change-Id: I0802c0d7486f772d361f87a544d6c5af937f4ca1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/3rdparty/angle/src/compiler/translator/Cache.h')
-rw-r--r-- | src/3rdparty/angle/src/compiler/translator/Cache.h | 36 |
1 files changed, 15 insertions, 21 deletions
diff --git a/src/3rdparty/angle/src/compiler/translator/Cache.h b/src/3rdparty/angle/src/compiler/translator/Cache.h index 1d2abb77e1..a182b07f51 100644 --- a/src/3rdparty/angle/src/compiler/translator/Cache.h +++ b/src/3rdparty/angle/src/compiler/translator/Cache.h @@ -16,33 +16,31 @@ #include "compiler/translator/Types.h" #include "compiler/translator/PoolAlloc.h" +namespace sh +{ + class TCache { public: - static void initialize(); static void destroy(); - static const TType *getType(TBasicType basicType, - TPrecision precision) + static const TType *getType(TBasicType basicType, TPrecision precision) { - return getType(basicType, precision, EvqTemporary, - 1, 1); + return getType(basicType, precision, EvqTemporary, 1, 1); } static const TType *getType(TBasicType basicType, - unsigned char primarySize = 1, + unsigned char primarySize = 1, unsigned char secondarySize = 1) { - return getType(basicType, EbpUndefined, EvqGlobal, - primarySize, secondarySize); + return getType(basicType, EbpUndefined, EvqGlobal, primarySize, secondarySize); } static const TType *getType(TBasicType basicType, TQualifier qualifier, - unsigned char primarySize = 1, + unsigned char primarySize = 1, unsigned char secondarySize = 1) { - return getType(basicType, EbpUndefined, qualifier, - primarySize, secondarySize); + return getType(basicType, EbpUndefined, qualifier, primarySize, secondarySize); } static const TType *getType(TBasicType basicType, TPrecision precision, @@ -51,12 +49,9 @@ class TCache unsigned char secondarySize); private: - TCache() - { - } + TCache(); - union TypeKey - { + union TypeKey { TypeKey(TBasicType basicType, TPrecision precision, TQualifier qualifier, @@ -74,12 +69,9 @@ class TCache } components; uint64_t value; - bool operator < (const TypeKey &other) const - { - return value < other.value; - } + bool operator<(const TypeKey &other) const { return value < other.value; } }; - typedef std::map<TypeKey, const TType*> TypeMap; + typedef std::map<TypeKey, const TType *> TypeMap; TypeMap mTypes; TPoolAllocator mAllocator; @@ -87,4 +79,6 @@ class TCache static TCache *sCache; }; +} // namespace sh + #endif // COMPILER_TRANSLATOR_CACHE_H_ |