aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGLUtil.h
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2015-12-16 05:08:27 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-12-16 05:08:27 -0800
commit7354a4b193aaaeae43fb9ede90e1158fa46c372b (patch)
treeeb9a59b67d46c38dc521e957946949ad7ee55bfb /src/gpu/gl/GrGLUtil.h
parent5d16fea9e22221be5fbe2866bbcfe8d6f4c6aeac (diff)
Avoid pixel GPU readback in saveLayerWithPickup
When the default framebuffer is wrapped in a device for rendering we don't get a GrTexture. This CL adds a copy to a temporary texture in this instance so the rest of the Ganesh pipeline can continue on as usual. Review URL: https://codereview.chromium.org/1531493002
Diffstat (limited to 'src/gpu/gl/GrGLUtil.h')
-rw-r--r--src/gpu/gl/GrGLUtil.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gpu/gl/GrGLUtil.h b/src/gpu/gl/GrGLUtil.h
index 70af3a36f4..8a3021cd57 100644
--- a/src/gpu/gl/GrGLUtil.h
+++ b/src/gpu/gl/GrGLUtil.h
@@ -81,6 +81,12 @@ enum GrGLDriver {
GR_GL_CALL(gl, GetFramebufferAttachmentParameteriv(t, a, pname, p)); \
} while (0)
+#define GR_GL_GetNamedFramebufferAttachmentParameteriv(gl, fb, a, pname, p) \
+ do { \
+ *(p) = GR_GL_INIT_ZERO; \
+ GR_GL_CALL(gl, GetNamedFramebufferAttachmentParameteriv(fb, a, pname, p)); \
+ } while (0)
+
#define GR_GL_GetRenderbufferParameteriv(gl, t, pname, p) \
do { \
*(p) = GR_GL_INIT_ZERO; \