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

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

Issue 1527383003: Generate a table of config->glformat info. Precursor to lifting this to caps. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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
Index: src/gpu/gl/GrGLGpu.h
diff --git a/src/gpu/gl/GrGLGpu.h b/src/gpu/gl/GrGLGpu.h
index d802f08b75b236ce6a8820a82e50b7a565fbd97d..409aae8f43da64a3d11f35f7af5002b344ea43ca 100644
--- a/src/gpu/gl/GrGLGpu.h
+++ b/src/gpu/gl/GrGLGpu.h
@@ -283,6 +283,7 @@ private:
void flushStencil(const GrStencilSettings&);
void flushHWAAState(GrRenderTarget* rt, bool useHWAA);
+ void generateConfigTable();
bool configToGLFormats(GrPixelConfig config,
bool getSizedInternal,
GrGLenum* internalFormat,
@@ -500,6 +501,19 @@ private:
}
} fHWBlendState;
+ TriState fMSAAEnabled;
+
+ GrStencilSettings fHWStencilSettings;
+ TriState fHWStencilTestEnabled;
+
+
+ GrPipelineBuilder::DrawFace fHWDrawFace;
+ TriState fHWWriteToColor;
+ uint32_t fHWBoundRenderTargetUniqueID;
+ TriState fHWSRGBFramebuffer;
+ SkTArray<uint32_t, true> fHWBoundTextureUniqueIDs;
bsalomon 2015/12/16 19:10:45 just moved this stuff to be within the ///@} below
+ ///@}
+
/** IDs for copy surface program. */
struct {
GrGLuint fProgram;
@@ -525,19 +539,16 @@ private:
}
}
- TriState fMSAAEnabled;
-
- GrStencilSettings fHWStencilSettings;
- TriState fHWStencilTestEnabled;
-
-
- GrPipelineBuilder::DrawFace fHWDrawFace;
- TriState fHWWriteToColor;
- uint32_t fHWBoundRenderTargetUniqueID;
- TriState fHWSRGBFramebuffer;
- SkTArray<uint32_t, true> fHWBoundTextureUniqueIDs;
+ struct ConfigEntry {
+ // Default constructor inits to known bad GL enum values.
+ ConfigEntry() { memset(this, 0xAB, sizeof(ConfigEntry)); }
+ GrGLenum fBaseInternalFormat;
+ GrGLenum fSizedInternalFormat;
+ GrGLenum fExternalFormat;
+ GrGLenum fExternalType;
+ };
- ///@}
+ ConfigEntry fConfigTable[kLast_GrPixelConfig + 1];
egdaniel 2015/12/16 19:19:08 Why not have this configTable live on the caps ins
bsalomon 2015/12/16 19:21:20 Yes, as noted in description, this is the first st
// Mapping of pixel configs to known supported stencil formats to be used
// when adding a stencil buffer to a framebuffer.

Powered by Google App Engine
This is Rietveld 408576698