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

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

Issue 1530713002: make alpha read back of bgra/rgba work (Closed) Base URL: https://skia.googlesource.com/skia.git@align
Patch Set: cleanup Created 5 years 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/gpu/GrProgramDesc.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 026ae23fb7af08271043c1fbcb4e4ac2c081178c..c92a973d7130f946a8f06cfa88565fea4cc4903b 100644
--- a/src/gpu/gl/GrGLCaps.h
+++ b/src/gpu/gl/GrGLCaps.h
@@ -235,7 +235,7 @@ public:
bool readPixelsSupported(const GrGLInterface* intf,
GrGLenum format,
GrGLenum type,
- GrGLenum currFboFormat) const;
+ GrPixelConfig currRTConfig) const;
bool isCoreProfile() const { return fIsCoreProfile; }
@@ -378,14 +378,22 @@ private:
bool fExternalTextureSupport : 1;
struct ReadPixelsSupportedFormat {
- GrGLenum fFormat;
- GrGLenum fType;
- GrGLenum fFboFormat;
+ ReadPixelsSupportedFormat() { memset(this, 0, sizeof(ReadPixelsSupportedFormat)); }
+ ReadPixelsSupportedFormat(GrGLenum format, GrGLenum type, GrPixelConfig rtConfig) {
+ memset(this, 0, sizeof(ReadPixelsSupportedFormat));
+ fFormat = format;
+ fType = type;
+ fRTConfig = rtConfig;
+ }
+
+ GrGLenum fFormat;
+ GrGLenum fType;
+ GrPixelConfig fRTConfig;
bool operator==(const ReadPixelsSupportedFormat& rhs) const {
return fFormat == rhs.fFormat
&& fType == rhs.fType
- && fFboFormat == rhs.fFboFormat;
+ && fRTConfig == rhs.fRTConfig;
}
};
mutable SkTHashMap<ReadPixelsSupportedFormat, bool> fReadPixelsSupportedCache;
« no previous file with comments | « src/gpu/GrProgramDesc.h ('k') | src/gpu/gl/GrGLCaps.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698