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

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

Issue 1415503008: Fix setColocatedSampleLocations on ES and GL < 4.5 (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: address comments Created 5 years, 1 month 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/GrGLInterface.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLGpu.cpp
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp
index dc3ea0c3d782afd8afdd6e6172e395b08d87f180..0e9aa0d917850884ba45998e8c26023544c6b470 100644
--- a/src/gpu/gl/GrGLGpu.cpp
+++ b/src/gpu/gl/GrGLGpu.cpp
@@ -2035,9 +2035,17 @@ void GrGLGpu::setColocatedSampleLocations(GrRenderTarget* rt, bool useColocatedS
return;
}
- GL_CALL(NamedFramebufferParameteri(target->renderFBOID(),
- GR_GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS,
- useColocatedSampleLocations));
+ if (kGL_GrGLStandard == this->glStandard() && this->glVersion() >= GR_GL_VER(4,5)) {
+ GL_CALL(NamedFramebufferParameteri(target->renderFBOID(),
+ GR_GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS,
+ useColocatedSampleLocations));
+ } else {
+ GL_CALL(BindFramebuffer(GR_GL_FRAMEBUFFER, target->renderFBOID()));
+ GL_CALL(FramebufferParameteri(GR_GL_FRAMEBUFFER,
+ GR_GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS,
+ useColocatedSampleLocations));
+ fHWBoundRenderTargetUniqueID = SK_InvalidUniqueID;
+ }
target->flagAsUsingColocatedSampleLocations(useColocatedSampleLocations);
}
« no previous file with comments | « src/gpu/gl/GrGLCaps.cpp ('k') | src/gpu/gl/GrGLInterface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698