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

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

Issue 1016903002: Use sample count for temp renderbuffer when clearing stenci (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 9 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 | « no previous file | no next file » | 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 34ceb066e0740015c0b03bd7ca44c30d252e0e7e..a2c8d7f3ea753dff24de13c43798bd0e2fc0b71c 100644
--- a/src/gpu/gl/GrGLGpu.cpp
+++ b/src/gpu/gl/GrGLGpu.cpp
@@ -808,7 +808,7 @@ static bool renderbuffer_storage_msaa(GrGLContext& ctx,
SkFAIL("Shouldn't be here if we don't support multisampled renderbuffers.");
break;
}
- return (GR_GL_NO_ERROR == CHECK_ALLOC_ERROR(ctx.interface()));;
+ return (GR_GL_NO_ERROR == CHECK_ALLOC_ERROR(ctx.interface()));
}
bool GrGLGpu::createRenderTargetObjects(const GrSurfaceDesc& desc, bool budgeted, GrGLuint texID,
@@ -1208,7 +1208,11 @@ bool GrGLGpu::createStencilBufferForRenderTarget(GrRenderTarget* rt, int width,
GrGLuint tempRB;
GL_CALL(GenRenderbuffers(1, &tempRB));
GL_CALL(BindRenderbuffer(GR_GL_RENDERBUFFER, tempRB));
- GL_CALL(RenderbufferStorage(GR_GL_RENDERBUFFER, GR_GL_RGBA8, width, height));
+ if (samples > 0) {
+ renderbuffer_storage_msaa(fGLContext, samples, GR_GL_RGBA8, width, height);
+ } else {
+ GL_CALL(RenderbufferStorage(GR_GL_RENDERBUFFER, GR_GL_RGBA8, width, height));
+ }
GL_CALL(FramebufferRenderbuffer(GR_GL_FRAMEBUFFER,
GR_GL_COLOR_ATTACHMENT0,
GR_GL_RENDERBUFFER, tempRB));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698