| Index: src/gpu/gl/GrGLCaps.h
|
| diff --git a/src/gpu/gl/GrGLCaps.h b/src/gpu/gl/GrGLCaps.h
|
| index 527cd33ee325da4d4d340d6f2308f0296ea2c262..1b77ed0e3204099847b26decf6c6a5ddb8753904 100644
|
| --- a/src/gpu/gl/GrGLCaps.h
|
| +++ b/src/gpu/gl/GrGLCaps.h
|
| @@ -12,7 +12,7 @@
|
| #include "GrDrawTargetCaps.h"
|
| #include "GrGLStencilBuffer.h"
|
| #include "SkChecksum.h"
|
| -#include "SkTHashCache.h"
|
| +#include "SkTHash.h"
|
| #include "SkTArray.h"
|
|
|
| class GrGLContextInfo;
|
| @@ -393,45 +393,23 @@ private:
|
| const char* fFBFetchColorName;
|
| const char* fFBFetchExtensionString;
|
|
|
| - class ReadPixelsSupportedFormats {
|
| - public:
|
| - struct Key {
|
| - GrGLenum fFormat;
|
| - GrGLenum fType;
|
| - GrGLenum fFboFormat;
|
| -
|
| - bool operator==(const Key& rhs) const {
|
| - return fFormat == rhs.fFormat
|
| - && fType == rhs.fType
|
| - && fFboFormat == rhs.fFboFormat;
|
| - }
|
| -
|
| - uint32_t getHash() const {
|
| - return SkChecksum::Murmur3(reinterpret_cast<const uint32_t*>(this), sizeof(*this));
|
| - }
|
| - };
|
| -
|
| - ReadPixelsSupportedFormats(Key key, bool value) : fKey(key), fValue(value) {
|
| - }
|
| -
|
| - static const Key& GetKey(const ReadPixelsSupportedFormats& element) {
|
| - return element.fKey;
|
| - }
|
| + struct ReadPixelsSupportedFormat {
|
| + GrGLenum fFormat;
|
| + GrGLenum fType;
|
| + GrGLenum fFboFormat;
|
|
|
| - static uint32_t Hash(const Key& key) {
|
| - return key.getHash();
|
| + bool operator==(const ReadPixelsSupportedFormat& rhs) const {
|
| + return fFormat == rhs.fFormat
|
| + && fType == rhs.fType
|
| + && fFboFormat == rhs.fFboFormat;
|
| }
|
| -
|
| - bool value() const {
|
| - return fValue;
|
| + static uint32_t Hash(const ReadPixelsSupportedFormat& r) {
|
| + return SkChecksum::Murmur3(reinterpret_cast<const uint32_t*>(&r), sizeof(r));
|
| }
|
| - private:
|
| - Key fKey;
|
| - bool fValue;
|
| };
|
|
|
| - mutable SkTHashCache<ReadPixelsSupportedFormats,
|
| - ReadPixelsSupportedFormats::Key> fReadPixelsSupportedCache;
|
| + mutable SkTHashMap<ReadPixelsSupportedFormat, bool, ReadPixelsSupportedFormat::Hash>
|
| + fReadPixelsSupportedCache;
|
|
|
| typedef GrDrawTargetCaps INHERITED;
|
| };
|
|
|