Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3235)

Unified Diff: src/gpu/gl/GrGLCaps.h

Issue 395203002: Revert of Reopened: Caching the result of readPixelsSupported (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkTHashCache.h ('k') | src/gpu/gl/GrGLCaps.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLCaps.h
diff --git a/src/gpu/gl/GrGLCaps.h b/src/gpu/gl/GrGLCaps.h
index 2d391b122cf08ab0b2435aa696b256fe16b6e3fe..ccf04fd7ba5a3d668ef5d2671d0defc5af6ea6b6 100644
--- a/src/gpu/gl/GrGLCaps.h
+++ b/src/gpu/gl/GrGLCaps.h
@@ -11,9 +11,8 @@
#include "GrDrawTargetCaps.h"
#include "GrGLStencilBuffer.h"
-#include "SkChecksum.h"
-#include "SkTHashCache.h"
#include "SkTArray.h"
+#include "SkTDArray.h"
class GrGLContextInfo;
@@ -254,8 +253,7 @@
/// Does ReadPixels support the provided format/type combo?
bool readPixelsSupported(const GrGLInterface* intf,
GrGLenum format,
- GrGLenum type,
- GrGLenum currFboFormat) const;
+ GrGLenum type) const;
bool isCoreProfile() const { return fIsCoreProfile; }
@@ -325,10 +323,6 @@
// This must be called after initFSAASupport().
void initConfigRenderableTable(const GrGLContextInfo&);
void initConfigTexturableTable(const GrGLContextInfo&, const GrGLInterface*);
-
- bool doReadPixelsSupported(const GrGLInterface* intf,
- GrGLenum format,
- GrGLenum type) const;
// tracks configs that have been verified to pass the FBO completeness when
// used as a color attachment
@@ -370,46 +364,6 @@
bool fFullClearIsFree : 1;
bool fDropsTileOnZeroDivide : 1;
- 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;
- }
-
- static uint32_t Hash(const Key& key) {
- return key.getHash();
- }
-
- bool value() const {
- return fValue;
- }
- private:
- Key fKey;
- bool fValue;
- };
-
- mutable SkTHashCache<ReadPixelsSupportedFormats,
- ReadPixelsSupportedFormats::Key> fReadPixelsSupportedCache;
-
typedef GrDrawTargetCaps INHERITED;
};
« no previous file with comments | « src/core/SkTHashCache.h ('k') | src/gpu/gl/GrGLCaps.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698