Init GrGLSLCaps fields from inside GrGLCaps
Fixes circular dependencies by allowing the initialization to be done
intertwined.
BUG=skia:
Review URL: https://codereview.chromium.org/1177053002
diff --git a/src/gpu/gl/GrGLCaps.h b/src/gpu/gl/GrGLCaps.h
index 742a74d..e924c60 100644
--- a/src/gpu/gl/GrGLCaps.h
+++ b/src/gpu/gl/GrGLCaps.h
@@ -264,7 +264,7 @@
GrGLSLCaps* glslCaps() const { return reinterpret_cast<GrGLSLCaps*>(fShaderCaps.get()); }
private:
- void init(const GrGLContextInfo& ctxInfo, const GrGLInterface* glInterface);
+ void init(const GrContextOptions&, const GrGLContextInfo&, const GrGLInterface*);
/**
* Maintains a bit per GrPixelConfig. It is used to avoid redundantly
@@ -428,8 +428,6 @@
SkString dump() const override;
private:
- void init(const GrGLContextInfo&, const GrGLInterface*, const GrGLCaps&);
-
// Must be called after fGeometryShaderSupport is initialized.
void initShaderPrecisionTable(const GrGLContextInfo&, const GrGLInterface*);
@@ -444,6 +442,8 @@
AdvBlendEqInteraction fAdvBlendEqInteraction;
+ friend class GrGLCaps; // For initialization.
+
typedef GrShaderCaps INHERITED;
};