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

Unified Diff: src/gpu/gl/GrGLGpu.h

Issue 1615023003: Add ability to query read pixels support without a render target. (Closed) Base URL: https://skia.googlesource.com/skia.git@fixsupp
Patch Set: squash with prev cl in series Created 4 years, 11 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') | src/gpu/gl/GrGLGpu.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLGpu.h
diff --git a/src/gpu/gl/GrGLGpu.h b/src/gpu/gl/GrGLGpu.h
index 4e7e4d6e14fedb159b4ced85a0c060278d81c84b..6f194dcd6c4296ebaebb0b1ec5ba86f6329e6d43 100644
--- a/src/gpu/gl/GrGLGpu.h
+++ b/src/gpu/gl/GrGLGpu.h
@@ -166,6 +166,20 @@ private:
bool onMakeCopyForTextureParams(GrTexture*, const GrTextureParams&,
GrTextureProducer::CopyParams*) const override;
+ // Checks whether glReadPixels can be called to get pixel values in readConfig from the
+ // render target.
+ bool readPixelsSupported(GrRenderTarget* target, GrPixelConfig readConfig);
+
+ // Checks whether glReadPixels can be called to get pixel values in readConfig from a
+ // render target that has renderTargetConfig. This may have to create a temporary
+ // render target and thus is less preferable than the variant that takes a render target.
+ bool readPixelsSupported(GrPixelConfig renderTargetConfig, GrPixelConfig readConfig);
+
+ // Checks whether glReadPixels can be called to get pixel values in readConfig from a
+ // render target that has the same config as surfaceForConfig. Calls one of the the two
+ // variations above, depending on whether the surface is a render target or not.
+ bool readPixelsSupported(GrSurface* surfaceForConfig, GrPixelConfig readConfig);
+
bool onReadPixels(GrSurface*,
int left, int top,
int width, int height,
« no previous file with comments | « src/gpu/gl/GrGLCaps.cpp ('k') | src/gpu/gl/GrGLGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698