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/SkSettingsWidget.cpp b/debugger/QT/SkSettingsWidget.cpp
index 88078ea..fa619ea 100644
--- a/debugger/QT/SkSettingsWidget.cpp
+++ b/debugger/QT/SkSettingsWidget.cpp
@@ -67,6 +67,28 @@
     fGLLabel.setText("OpenGL: ");
     fGLLabel.setMinimumWidth(178);
     fGLLabel.setMaximumWidth(178);
+
+    fGLMSAAButtonGroup.setTitle("MSAA");
+    fGLMSAAButtonGroup.setMinimumWidth(178);
+    fGLMSAAButtonGroup.setMaximumWidth(178);
+    fGLMSAAButtonGroup.setEnabled(fGLCheckBox.isChecked());
+
+    fGLMSAAOff.setText("Off");
+    fGLMSAA4On.setText("4");
+    fGLMSAA4On.setChecked(true);
+    fGLMSAA16On.setText("16");
+
+    fGLMSAALayout.addWidget(&fGLMSAAOff);
+    fGLMSAALayout.addWidget(&fGLMSAA4On);
+    fGLMSAALayout.addWidget(&fGLMSAA16On);
+
+    fGLMSAAButtonGroup.setLayout(&fGLMSAALayout);
+
+    connect(&fGLCheckBox, SIGNAL(toggled(bool)), &fGLMSAAButtonGroup, SLOT(setEnabled(bool)));
+    connect(&fGLCheckBox, SIGNAL(toggled(bool)), this, SIGNAL(glSettingsChanged()));
+    connect(&fGLMSAAOff, SIGNAL(toggled(bool)), this, SIGNAL(glSettingsChanged()));
+    connect(&fGLMSAA4On, SIGNAL(toggled(bool)), this, SIGNAL(glSettingsChanged()));
+    connect(&fGLMSAA16On, SIGNAL(toggled(bool)), this, SIGNAL(glSettingsChanged()));
 #endif
 
     fRasterLayout.addWidget(&fRasterLabel);
@@ -86,6 +108,7 @@
     fCanvasLayout.addLayout(&fOverdrawVizLayout);
 #if SK_SUPPORT_GPU
     fCanvasLayout.addLayout(&fGLLayout);
+    fCanvasLayout.addWidget(&fGLMSAAButtonGroup);
 #endif
 
     // Command Toggle