aboutsummaryrefslogtreecommitdiffhomepage
path: root/debugger/QT/SkGLWidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'debugger/QT/SkGLWidget.cpp')
-rw-r--r--debugger/QT/SkGLWidget.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/debugger/QT/SkGLWidget.cpp b/debugger/QT/SkGLWidget.cpp
index baee2bbdac..44a15dca38 100644
--- a/debugger/QT/SkGLWidget.cpp
+++ b/debugger/QT/SkGLWidget.cpp
@@ -20,7 +20,7 @@ SkGLWidget::~SkGLWidget() {
void SkGLWidget::setSampleCount(int sampleCount) {
QGLFormat currentFormat = format();
- currentFormat.setSampleBuffers(sampleCount > 0);
+ currentFormat.setSampleBuffers(sampleCount > 1);
currentFormat.setSamples(sampleCount);
setFormat(currentFormat);
}
@@ -89,6 +89,7 @@ GrBackendRenderTarget SkGLWidget::getBackendRenderTarget() {
int sampleCnt;
GR_GL_GetIntegerv(fCurIntf.get(), GR_GL_FRAMEBUFFER_BINDING, &info.fFBOID);
GR_GL_GetIntegerv(fCurIntf.get(), GR_GL_SAMPLES, &sampleCnt);
+ sampleCnt = SkTMax(sampleCnt, 1);
GR_GL_GetIntegerv(fCurIntf.get(), GR_GL_STENCIL_BITS, &stencilBits);
// We are on desktop so we assume the internal config is RGBA
info.fFormat = GR_GL_RGBA8;