| Index: src/gpu/gl/GrGLCaps.cpp
|
| diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
|
| index 5baed59f14de1cb501d766144c8343e2f14beef0..6209ce40204bbe6bdd452b0d95cd8aee5ccdb8f0 100644
|
| --- a/src/gpu/gl/GrGLCaps.cpp
|
| +++ b/src/gpu/gl/GrGLCaps.cpp
|
| @@ -53,6 +53,7 @@ GrGLCaps::GrGLCaps(const GrContextOptions& contextOptions,
|
| fRGBA8888PixelsOpsAreSlow = false;
|
| fPartialFBOReadIsSlow = false;
|
| fMipMapLevelAndLodControlSupport = false;
|
| + fRGBAToBGRAReadbackConversionsAreSlow = false;
|
|
|
| fBlitFramebufferSupport = kNone_BlitFramebufferSupport;
|
|
|
| @@ -266,6 +267,16 @@ void GrGLCaps::init(const GrContextOptions& contextOptions,
|
| fPartialFBOReadIsSlow = isANGLE;
|
| #endif
|
|
|
| + bool isMESA = kMesa_GrGLDriver == ctxInfo.driver();
|
| + 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;
|
| +
|
| /**************************************************************************
|
| * GrShaderCaps fields
|
| **************************************************************************/
|
| @@ -1052,6 +1063,8 @@ SkString GrGLCaps::dump() const {
|
| r.appendf("External texture support: %s\n", (fExternalTextureSupport ? "YES" : "NO"));
|
| r.appendf("Rectangle texture support: %s\n", (fRectangleTextureSupport? "YES" : "NO"));
|
| r.appendf("Texture swizzle support: %s\n", (fTextureSwizzleSupport ? "YES" : "NO"));
|
| + r.appendf("BGRA to RGBA readback conversions are slow: %s\n",
|
| + (fRGBAToBGRAReadbackConversionsAreSlow ? "YES" : "NO"));
|
|
|
| r.append("Configs\n-------\n");
|
| for (int i = 0; i < kGrPixelConfigCnt; ++i) {
|
|
|