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

Unified Diff: src/gpu/gl/GrGpuGL.cpp

Issue 395203002: Revert of Reopened: Caching the result of readPixelsSupported (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 5 months 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
« no previous file with comments | « src/gpu/gl/GrGLCaps.cpp ('k') | tests/THashCache.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGpuGL.cpp
diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp
index 3eca3d62475075e96d3dcb3eefd1fe4e1ccdb1f8..eddccc39f67e626a0beb814cd4016a5ce6e8bf0b 100644
--- a/src/gpu/gl/GrGpuGL.cpp
+++ b/src/gpu/gl/GrGpuGL.cpp
@@ -170,6 +170,8 @@
}
///////////////////////////////////////////////////////////////////////////////
+
+
GrPixelConfig GrGpuGL::preferredReadPixelsConfig(GrPixelConfig readConfig,
GrPixelConfig surfaceConfig) const {
if (GR_GL_RGBA_8888_PIXEL_OPS_SLOW && kRGBA_8888_GrPixelConfig == readConfig) {
@@ -180,13 +182,9 @@
// Mesa 3D takes a slow path on when reading back BGRA from an RGBA surface and vice-versa.
// Perhaps this should be guarded by some compiletime or runtime check.
return surfaceConfig;
- } else if (readConfig == kBGRA_8888_GrPixelConfig
- && this->glCaps().readPixelsSupported(
- this->glInterface(),
- GR_GL_BGRA,
- GR_GL_UNSIGNED_BYTE,
- surfaceConfig
- )) {
+ } else if (readConfig == kBGRA_8888_GrPixelConfig &&
+ !this->glCaps().readPixelsSupported(this->glInterface(),
+ GR_GL_BGRA, GR_GL_UNSIGNED_BYTE)) {
return kRGBA_8888_GrPixelConfig;
} else {
return readConfig;
@@ -715,7 +713,7 @@
}
// TODO: This function is using a lot of wonky semantics like, if width == -1
-// then set width = desc.fWdith ... blah. A better way to do it might be to
+// then set width = desc.fWdith ... blah. A better way to do it might be to
// create a CompressedTexData struct that takes a desc/ptr and figures out
// the proper upload semantics. Then users can construct this function how they
// see fit if they want to go against the "standard" way to do it.
« no previous file with comments | « src/gpu/gl/GrGLCaps.cpp ('k') | tests/THashCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698