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

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

Issue 1415873011: Revert of Enable stencil clipping in mixed sampled render targets (patchset #6 id:100001 of https:/… (Closed) Base URL: https://skia.googlesource.com/skia.git@reverts2
Patch Set: 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/GrGLGpu.h ('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 4cf2ca14b5b13a03c3abd2208b8146ce045e7680..7a8f745ce3158e9726e0d2989f7b14e898b54c86 100644
--- a/src/gpu/gl/GrGLGpu.cpp
+++ b/src/gpu/gl/GrGLGpu.cpp
@@ -1500,7 +1500,7 @@ bool GrGLGpu::flushGLState(const DrawArgs& args) {
GrGLRenderTarget* glRT = static_cast<GrGLRenderTarget*>(pipeline.getRenderTarget());
this->flushStencil(pipeline.getStencil());
this->flushScissor(pipeline.getScissorState(), glRT->getViewport(), glRT->origin());
- this->flushHWAAState(glRT, pipeline.isHWAntialiasState(), !pipeline.getStencil().isDisabled());
+ this->flushHWAAState(glRT, pipeline.isHWAntialiasState());
// This must come after textures are flushed because a texture may need
// to be msaa-resolved (which will modify bound FBO state).
@@ -2034,22 +2034,6 @@ bool GrGLGpu::onReadPixels(GrSurface* surface,
return true;
}
-void GrGLGpu::setColocatedSampleLocations(GrRenderTarget* rt, bool useColocatedSampleLocations) {
- GrGLRenderTarget* target = static_cast<GrGLRenderTarget*>(rt->asRenderTarget());
- SkASSERT(0 != target->renderFBOID());
-
- if (!rt->isStencilBufferMultisampled() ||
- useColocatedSampleLocations == target->usesColocatedSampleLocations()) {
- return;
- }
-
- GL_CALL(NamedFramebufferParameteri(target->renderFBOID(),
- GR_GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS,
- useColocatedSampleLocations));
-
- target->flagAsUsingColocatedSampleLocations(useColocatedSampleLocations);
-}
-
void GrGLGpu::flushRenderTarget(GrGLRenderTarget* target, const SkIRect* bound) {
SkASSERT(target);
@@ -2297,19 +2281,9 @@ void GrGLGpu::flushStencil(const GrStencilSettings& stencilSettings) {
}
}
-void GrGLGpu::flushHWAAState(GrRenderTarget* rt, bool useHWAA, bool stencilEnabled) {
+void GrGLGpu::flushHWAAState(GrRenderTarget* rt, bool useHWAA) {
SkASSERT(!useHWAA || rt->isStencilBufferMultisampled());
- if (rt->hasMixedSamples() && stencilEnabled &&
- this->glCaps().glslCaps()->programmableSampleLocationsSupport()) {
- if (useHWAA) {
- this->setColocatedSampleLocations(rt, false);
- } else {
- this->setColocatedSampleLocations(rt, true);
- }
- useHWAA = true;
- }
-
if (this->glCaps().multisampleDisableSupport()) {
if (useHWAA) {
if (kYes_TriState != fMSAAEnabled) {
@@ -3111,7 +3085,7 @@ void GrGLGpu::copySurfaceAsDraw(GrSurface* dst,
this->flushBlend(blendInfo);
this->flushColorWrite(true);
this->flushDrawFace(GrPipelineBuilder::kBoth_DrawFace);
- this->flushHWAAState(dstRT, false, false);
+ this->flushHWAAState(dstRT, false);
this->disableScissor();
GrStencilSettings stencil;
stencil.setDisabled();
« no previous file with comments | « src/gpu/gl/GrGLGpu.h ('k') | src/gpu/gl/GrGLInterface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698