Remove unused HWAA flag and uniqueID field from GrDrawTargetCaps.
BUG=skia:
Review URL: https://codereview.chromium.org/1019303005
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp
index 2640e71..420f9ea 100644
--- a/src/gpu/GrDrawTarget.cpp
+++ b/src/gpu/GrDrawTarget.cpp
@@ -1052,7 +1052,6 @@
fNPOTTextureTileSupport = false;
fTwoSidedStencilSupport = false;
fStencilWrapOpsSupport = false;
- fHWAALineSupport = false;
fShaderDerivativeSupport = false;
fGeometryShaderSupport = false;
fDualSourceBlendingSupport = false;
@@ -1083,7 +1082,6 @@
fNPOTTextureTileSupport = other.fNPOTTextureTileSupport;
fTwoSidedStencilSupport = other.fTwoSidedStencilSupport;
fStencilWrapOpsSupport = other.fStencilWrapOpsSupport;
- fHWAALineSupport = other.fHWAALineSupport;
fShaderDerivativeSupport = other.fShaderDerivativeSupport;
fGeometryShaderSupport = other.fGeometryShaderSupport;
fDualSourceBlendingSupport = other.fDualSourceBlendingSupport;
@@ -1166,7 +1164,6 @@
r.appendf("NPOT Texture Tile Support : %s\n", gNY[fNPOTTextureTileSupport]);
r.appendf("Two Sided Stencil Support : %s\n", gNY[fTwoSidedStencilSupport]);
r.appendf("Stencil Wrap Ops Support : %s\n", gNY[fStencilWrapOpsSupport]);
- r.appendf("HW AA Lines Support : %s\n", gNY[fHWAALineSupport]);
r.appendf("Shader Derivative Support : %s\n", gNY[fShaderDerivativeSupport]);
r.appendf("Geometry Shader Support : %s\n", gNY[fGeometryShaderSupport]);
r.appendf("Dual Source Blending Support : %s\n", gNY[fDualSourceBlendingSupport]);
@@ -1256,15 +1253,6 @@
return r;
}
-uint32_t GrDrawTargetCaps::CreateUniqueID() {
- static int32_t gUniqueID = SK_InvalidUniqueID;
- uint32_t id;
- do {
- id = static_cast<uint32_t>(sk_atomic_inc(&gUniqueID) + 1);
- } while (id == SK_InvalidUniqueID);
- return id;
-}
-
///////////////////////////////////////////////////////////////////////////////////////////////////
bool GrClipTarget::setupClip(GrPipelineBuilder* pipelineBuilder,
diff --git a/src/gpu/GrDrawTargetCaps.h b/src/gpu/GrDrawTargetCaps.h
index 9a08eff..08f4f43 100644
--- a/src/gpu/GrDrawTargetCaps.h
+++ b/src/gpu/GrDrawTargetCaps.h
@@ -56,10 +56,10 @@
};
- GrDrawTargetCaps() : fUniqueID(CreateUniqueID()) {
+ GrDrawTargetCaps() {
this->reset();
}
- GrDrawTargetCaps(const GrDrawTargetCaps& other) : INHERITED(), fUniqueID(CreateUniqueID()) {
+ GrDrawTargetCaps(const GrDrawTargetCaps& other) : INHERITED() {
*this = other;
}
GrDrawTargetCaps& operator= (const GrDrawTargetCaps&);
@@ -73,7 +73,6 @@
bool mipMapSupport() const { return fMipMapSupport; }
bool twoSidedStencilSupport() const { return fTwoSidedStencilSupport; }
bool stencilWrapOpsSupport() const { return fStencilWrapOpsSupport; }
- bool hwAALineSupport() const { return fHWAALineSupport; }
bool shaderDerivativeSupport() const { return fShaderDerivativeSupport; }
bool geometryShaderSupport() const { return fGeometryShaderSupport; }
bool dualSourceBlendingSupport() const { return fDualSourceBlendingSupport; }
@@ -143,19 +142,11 @@
*/
bool floatPrecisionVaries() const { return fShaderPrecisionVaries; }
- /**
- * Gets an id that is unique for this GrDrawTargetCaps object. It is static in that it does
- * not change when the content of the GrDrawTargetCaps object changes. This will never return
- * 0.
- */
- uint32_t getUniqueID() const { return fUniqueID; }
-
protected:
bool fNPOTTextureTileSupport : 1;
bool fMipMapSupport : 1;
bool fTwoSidedStencilSupport : 1;
bool fStencilWrapOpsSupport : 1;
- bool fHWAALineSupport : 1;
bool fShaderDerivativeSupport : 1;
bool fGeometryShaderSupport : 1;
bool fDualSourceBlendingSupport : 1;
@@ -183,10 +174,6 @@
PrecisionInfo fFloatPrecisions[kGrShaderTypeCount][kGrSLPrecisionCount];
private:
- static uint32_t CreateUniqueID();
-
- const uint32_t fUniqueID;
-
typedef SkRefCnt INHERITED;
};
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index 9911d53..c9009b9 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -337,8 +337,6 @@
fMipMapSupport = fNPOTTextureTileSupport || ctxInfo.hasExtension("GL_IMG_texture_npot");
}
- fHWAALineSupport = (kGL_GrGLStandard == standard);
-
GR_GL_GetIntegerv(gli, GR_GL_MAX_TEXTURE_SIZE, &fMaxTextureSize);
GR_GL_GetIntegerv(gli, GR_GL_MAX_RENDERBUFFER_SIZE, &fMaxRenderTargetSize);
// Our render targets are always created with textures as the color