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

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

Issue 1264003002: SRGB read and write pixels working and unit test (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 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 | « include/gpu/GrTypes.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 ac90aa1db60b1ed1b47c2ca62329327eff7837a2..0622e68edcb2409e4ff9cc6636d03487855bdc35 100644
--- a/src/gpu/gl/GrGLCaps.h
+++ b/src/gpu/gl/GrGLCaps.h
@@ -26,8 +26,6 @@ class GrGLSLCaps;
*/
class GrGLCaps : public GrCaps {
public:
-
-
typedef GrGLStencilAttachment::Format StencilFormat;
/**
@@ -254,12 +252,18 @@ public:
bool isCoreProfile() const { return fIsCoreProfile; }
-
bool fullClearIsFree() const { return fFullClearIsFree; }
bool bindFragDataLocationSupport() const { return fBindFragDataLocationSupport; }
/**
+ * Is there support for enabling/disabling sRGB writes for sRGB-capable color attachments?
+ * If false this does not mean sRGB is not supported but rather that if it is supported
+ * it cannot be turned off for configs that support it.
+ */
+ bool srgbWriteControl() const { return fSRGBWriteControl; }
+
+ /**
* Returns a string containing the caps info.
*/
SkString dump() const override;
@@ -324,8 +328,8 @@ private:
void initBlendEqationSupport(const GrGLContextInfo&);
void initStencilFormats(const GrGLContextInfo&);
// This must be called after initFSAASupport().
- void initConfigRenderableTable(const GrGLContextInfo&);
- void initConfigTexturableTable(const GrGLContextInfo&, const GrGLInterface*);
+ void initConfigRenderableTable(const GrGLContextInfo&, bool srgbSupport);
+ void initConfigTexturableTable(const GrGLContextInfo&, const GrGLInterface*, bool srgbSupport);
bool doReadPixelsSupported(const GrGLInterface* intf, GrGLenum format, GrGLenum type) const;
@@ -375,6 +379,7 @@ private:
bool fIsCoreProfile : 1;
bool fFullClearIsFree : 1;
bool fBindFragDataLocationSupport : 1;
+ bool fSRGBWriteControl : 1;
struct ReadPixelsSupportedFormat {
GrGLenum fFormat;
« no previous file with comments | « include/gpu/GrTypes.h ('k') | src/gpu/gl/GrGLCaps.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698