Remove unused pixel ops caps from GrGLCaps.
Change-Id: Ic568a6774175741ca4765288ecd90c07471200db
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/406996
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index e8683c2..8153eb3 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -43,12 +43,9 @@
fIsCoreProfile = false;
fBindFragDataLocationSupport = false;
fRectangleTextureSupport = false;
- fRGBA8888PixelsOpsAreSlow = false;
- fPartialFBOReadIsSlow = false;
fBindUniformLocationSupport = false;
fMipmapLevelControlSupport = false;
fMipmapLodControlSupport = false;
- fRGBAToBGRAReadbackConversionsAreSlow = false;
fUseBufferDataNullHint = false;
fDoManualMipmapping = false;
fClearToBoundaryValuesIsBroken = false;
@@ -295,27 +292,6 @@
}
} // no WebGL support
-#ifdef SK_BUILD_FOR_WIN
- // We're assuming that on Windows Chromium we're using ANGLE.
- bool isANGLE = ctxInfo.angleBackend() != GrGLANGLEBackend::kUnknown ||
- ctxInfo.driver() == GrGLDriver::kChromium;
- // Angle has slow read/write pixel paths for 32bit RGBA (but fast for BGRA).
- fRGBA8888PixelsOpsAreSlow = isANGLE;
- // On DX9 ANGLE reading a partial FBO is slow. TODO: Check whether this is still true and
- // check DX11 ANGLE.
- fPartialFBOReadIsSlow = isANGLE;
-#endif
-
- bool isMESA = ctxInfo.driver() == GrGLDriver::kMesa;
- bool isMAC = false;
-#ifdef SK_BUILD_FOR_MAC
- isMAC = true;
-#endif
-
- // Both mesa and mac have reduced performance if reading back an RGBA framebuffer as BGRA or
- // vis-versa.
- fRGBAToBGRAReadbackConversionsAreSlow = isMESA || isMAC;
-
// Chrome's command buffer will zero out a buffer if null is passed to glBufferData to
// avoid letting an application see uninitialized memory.
if (GR_IS_GR_GL(standard) || GR_IS_GR_GL_ES(standard)) {
@@ -599,6 +575,9 @@
}
#ifdef SK_BUILD_FOR_WIN
+ // We're assuming that on Windows Chromium we're using ANGLE.
+ bool isANGLE = ctxInfo.angleBackend() != GrGLANGLEBackend::kUnknown ||
+ ctxInfo.driver() == GrGLDriver::kChromium;
// On ANGLE deferring flushes can lead to GPU starvation
fPreferVRAMUseOverFlushes = !isANGLE;
#endif
@@ -1186,14 +1165,10 @@
writer->appendBool("ES2 compatibility support", fES2CompatibilitySupport);
writer->appendBool("drawRangeElements support", fDrawRangeElementsSupport);
writer->appendBool("Base (vertex base) instance support", fBaseVertexBaseInstanceSupport);
- writer->appendBool("RGBA 8888 pixel ops are slow", fRGBA8888PixelsOpsAreSlow);
- writer->appendBool("Partial FBO read is slow", fPartialFBOReadIsSlow);
writer->appendBool("Bind uniform location support", fBindUniformLocationSupport);
writer->appendBool("Rectangle texture support", fRectangleTextureSupport);
writer->appendBool("Mipmap LOD control support", fMipmapLodControlSupport);
writer->appendBool("Mipmap level control support", fMipmapLevelControlSupport);
- writer->appendBool("BGRA to RGBA readback conversions are slow",
- fRGBAToBGRAReadbackConversionsAreSlow);
writer->appendBool("Use buffer data null hint", fUseBufferDataNullHint);
writer->appendBool("Clear texture support", fClearTextureSupport);
writer->appendBool("Program binary support", fProgramBinarySupport);
diff --git a/src/gpu/gl/GrGLCaps.h b/src/gpu/gl/GrGLCaps.h
index 39e7187..0760a61 100644
--- a/src/gpu/gl/GrGLCaps.h
+++ b/src/gpu/gl/GrGLCaps.h
@@ -346,12 +346,6 @@
void onDumpJSON(SkJSONWriter*) const override;
- bool rgba8888PixelsOpsAreSlow() const { return fRGBA8888PixelsOpsAreSlow; }
- bool partialFBOReadIsSlow() const { return fPartialFBOReadIsSlow; }
- bool rgbaToBgraReadbackConversionsAreSlow() const {
- return fRGBAToBGRAReadbackConversionsAreSlow;
- }
-
bool useBufferDataNullHint() const { return fUseBufferDataNullHint; }
// Certain Intel GPUs on Mac fail to clear if the glClearColor is made up of only 1s and 0s.
@@ -548,14 +542,11 @@
bool fBaseVertexBaseInstanceSupport : 1;
bool fIsCoreProfile : 1;
bool fBindFragDataLocationSupport : 1;
- bool fRGBA8888PixelsOpsAreSlow : 1;
- bool fPartialFBOReadIsSlow : 1;
bool fBindUniformLocationSupport : 1;
bool fRectangleTextureSupport : 1;
bool fMipmapLevelControlSupport : 1;
bool fMipmapLodControlSupport : 1;
- bool fRGBAToBGRAReadbackConversionsAreSlow : 1;
- bool fUseBufferDataNullHint : 1;
+ bool fUseBufferDataNullHint : 1;
bool fClearTextureSupport : 1;
bool fProgramBinarySupport : 1;
bool fProgramParameterSupport : 1;