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

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

Issue 1693923002: Make copySurface work in more situations. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comments Created 4 years, 10 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.h ('k') | src/gpu/gl/GrGLGpu.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLCaps.cpp
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index c2ace6cd368948d25d60f95b766895dcfd1ce740..79bb22efac0455cfad4158887f48eba86aae5fcf 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -54,6 +54,8 @@ GrGLCaps::GrGLCaps(const GrContextOptions& contextOptions,
fRGBA8888PixelsOpsAreSlow = false;
fPartialFBOReadIsSlow = false;
+ fBlitFramebufferSupport = kNone_BlitFramebufferSupport;
+
fShaderCaps.reset(new GrGLSLCaps(contextOptions));
this->init(contextOptions, ctxInfo, glInterface);
@@ -766,15 +768,28 @@ void GrGLCaps::initFSAASupport(const GrGLContextInfo& ctxInfo, const GrGLInterfa
} else if (ctxInfo.hasExtension("GL_APPLE_framebuffer_multisample")) {
fMSFBOType = kES_Apple_MSFBOType;
}
+
+ // Above determined the preferred MSAA approach, now decide whether glBlitFramebuffer
+ // is available.
+ if (ctxInfo.version() >= GR_GL_VER(3, 0)) {
+ fBlitFramebufferSupport = kFull_BlitFramebufferSupport;
+ } else if (ctxInfo.hasExtension("GL_CHROMIUM_framebuffer_multisample")) {
+ // The CHROMIUM extension uses the ANGLE version of glBlitFramebuffer and includes its
+ // limitations.
+ fBlitFramebufferSupport = kNoScalingNoMirroring_BlitFramebufferSupport;
+ }
} else {
if (fUsesMixedSamples) {
fMSFBOType = kMixedSamples_MSFBOType;
+ fBlitFramebufferSupport = kFull_BlitFramebufferSupport;
} else if ((ctxInfo.version() >= GR_GL_VER(3,0)) ||
ctxInfo.hasExtension("GL_ARB_framebuffer_object")) {
fMSFBOType = GrGLCaps::kDesktop_ARB_MSFBOType;
+ fBlitFramebufferSupport = kFull_BlitFramebufferSupport;
} else if (ctxInfo.hasExtension("GL_EXT_framebuffer_multisample") &&
ctxInfo.hasExtension("GL_EXT_framebuffer_blit")) {
fMSFBOType = GrGLCaps::kDesktop_EXT_MSFBOType;
+ fBlitFramebufferSupport = kFull_BlitFramebufferSupport;
}
}
}
« no previous file with comments | « src/gpu/gl/GrGLCaps.h ('k') | src/gpu/gl/GrGLGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698