aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2015-07-30 15:34:56 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-07-30 15:34:56 -0700
commit16921ec30a81976129d507b1148c93a322e61a4f (patch)
tree5eb7ceafe1b43b2a168de7f46d4ebdde3bc1d7cc /include/gpu
parent381b26f03bdccac1e3d9055fb4f7855792cfefb0 (diff)
SRGB read and write pixels working and unit test
Diffstat (limited to 'include/gpu')
-rw-r--r--include/gpu/GrCaps.h2
-rw-r--r--include/gpu/GrTypes.h11
2 files changed, 11 insertions, 2 deletions
diff --git a/include/gpu/GrCaps.h b/include/gpu/GrCaps.h
index 6b24ecd6bf..5452eb329f 100644
--- a/include/gpu/GrCaps.h
+++ b/include/gpu/GrCaps.h
@@ -106,8 +106,6 @@ private:
*/
class GrCaps : public SkRefCnt {
public:
-
-
GrCaps(const GrContextOptions&);
virtual SkString dump() const;
diff --git a/include/gpu/GrTypes.h b/include/gpu/GrTypes.h
index 1f83b64d9d..082cdf1dc4 100644
--- a/include/gpu/GrTypes.h
+++ b/include/gpu/GrTypes.h
@@ -313,6 +313,17 @@ static inline bool GrPixelConfigIs8888(GrPixelConfig config) {
}
}
+// Returns true if the color (non-alpha) components represent sRGB values. It does NOT indicate that
+// all three color components are present in the config or anything about their order.
+static inline bool GrPixelConfigIsSRGB(GrPixelConfig config) {
+ switch (config) {
+ case kSRGBA_8888_GrPixelConfig:
+ return true;
+ default:
+ return false;
+ }
+}
+
// Takes a config and returns the equivalent config with the R and B order
// swapped if such a config exists. Otherwise, kUnknown_GrPixelConfig
static inline GrPixelConfig GrPixelConfigSwapRAndB(GrPixelConfig config) {