Support MSAA in the picture debugger
Add radio buttons for setting the GL sample count to 0 ("off"), 4 or
16.
Change the default mode of the GL widget to MSAA4. Previous behavior
corresponded to "off".
BUG=1459
R=robertphillips@google.com
Author: kkinnunen@nvidia.com
Review URL: https://chromiumcodereview.appspot.com/21752002
git-svn-id: http://skia.googlecode.com/svn/trunk@10509 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/debugger/QT/SkGLWidget.cpp b/debugger/QT/SkGLWidget.cpp
index ae3155a..53b6fa4 100644
--- a/debugger/QT/SkGLWidget.cpp
+++ b/debugger/QT/SkGLWidget.cpp
@@ -27,6 +27,14 @@
SkSafeUnref(fCanvas);
}
+void SkGLWidget::setSampleCount(int sampleCount)
+{
+ QGLFormat currentFormat = format();
+ currentFormat.setSampleBuffers(sampleCount > 0);
+ currentFormat.setSamples(sampleCount);
+ setFormat(currentFormat);
+}
+
void SkGLWidget::initializeGL() {
fCurIntf = GrGLCreateNativeInterface();
if (!fCurIntf) {