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

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

Issue 1567733005: Add a class representing texture swizzle. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add .a for color table FP texture reads. Created 4 years, 11 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/gpu/GrTextureAccess.cpp ('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 a650348a13ba9d629616d3032ac5d512492638e1..db60ad273a3c98c396e92138f8cc6d165904066e 100644
--- a/src/gpu/gl/GrGLCaps.h
+++ b/src/gpu/gl/GrGLCaps.h
@@ -9,9 +9,10 @@
#ifndef GrGLCaps_DEFINED
#define GrGLCaps_DEFINED
-#include "GrCaps.h"
#include "glsl/GrGLSL.h"
+#include "GrCaps.h"
#include "GrGLStencilAttachment.h"
+#include "GrSwizzle.h"
#include "SkChecksum.h"
#include "SkTHash.h"
#include "SkTArray.h"
@@ -142,6 +143,11 @@ public:
return fConfigTable[config].fFormats;
}
+ /** Returns the mapping between GrPixelConfig components and GL internal format components. */
+ const GrSwizzle& configSwizzle(GrPixelConfig config) const {
+ return fConfigTable[config].fSwizzle;
+ }
+
/**
* Gets an array of legal stencil formats. These formats are not guaranteed
* to be supported by the driver but are legal GLenum names given the GL
@@ -307,6 +313,9 @@ public:
/// Are textures with GL_TEXTURE_EXTERNAL_OES type supported.
bool externalTextureSupport() const { return fExternalTextureSupport; }
+ /// GL_ARB_texture_swizzle
+ bool textureSwizzleSupport() const { return fTextureSwizzleSupport; }
+
/**
* 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
@@ -335,15 +344,12 @@ private:
void initBlendEqationSupport(const GrGLContextInfo&);
void initStencilFormats(const GrGLContextInfo&);
// This must be called after initFSAASupport().
- void initConfigTable(const GrGLContextInfo&, const GrGLInterface* gli);
+ void initConfigTable(const GrGLContextInfo&, const GrGLInterface* gli, GrGLSLCaps* glslCaps);
void initShaderPrecisionTable(const GrGLContextInfo& ctxInfo,
const GrGLInterface* intf,
GrGLSLCaps* glslCaps);
- void initConfigSwizzleTable(const GrGLContextInfo& ctxInfo, GrGLSLCaps* glslCaps);
-
-
SkTArray<StencilFormat, true> fStencilFormats;
int fMaxFragmentUniformVectors;
@@ -376,6 +382,7 @@ private:
bool fPartialFBOReadIsSlow : 1;
bool fBindUniformLocationSupport : 1;
bool fExternalTextureSupport : 1;
+ bool fTextureSwizzleSupport : 1;
/** Number type of the components (with out considering number of bits.) */
enum FormatType {
@@ -418,6 +425,8 @@ private:
kRenderableWithMSAA_Flag = 0x8,
};
uint32_t fFlags;
+
+ GrSwizzle fSwizzle;
};
ConfigInfo fConfigTable[kGrPixelConfigCnt];
« no previous file with comments | « src/gpu/GrTextureAccess.cpp ('k') | src/gpu/gl/GrGLCaps.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698