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/SkDebuggerGUI.cpp b/debugger/QT/SkDebuggerGUI.cpp
index 0f4299f..d444152 100644
--- a/debugger/QT/SkDebuggerGUI.cpp
+++ b/debugger/QT/SkDebuggerGUI.cpp
@@ -92,7 +92,7 @@
     connect(&fActionClose, SIGNAL(triggered()), this, SLOT(actionClose()));
     connect(fSettingsWidget.getVisibilityButton(), SIGNAL(toggled(bool)), this, SLOT(actionCommandFilter()));
 #if SK_SUPPORT_GPU
-    connect(fSettingsWidget.getGLCheckBox(), SIGNAL(toggled(bool)), this, SLOT(actionGLWidget(bool)));
+    connect(&fSettingsWidget, SIGNAL(glSettingsChanged()), this, SLOT(actionGLWidget()));
 #endif
     connect(fSettingsWidget.getRasterCheckBox(), SIGNAL(toggled(bool)), this, SLOT(actionRasterWidget(bool)));
     connect(fSettingsWidget.getOverdrawVizCheckBox(), SIGNAL(toggled(bool)), this, SLOT(actionOverdrawVizWidget(bool)));
@@ -360,8 +360,9 @@
     renderer = SkNEW(sk_tools::SimplePictureRenderer);
 
 #if SK_SUPPORT_GPU
-    if (Qt::Checked == fSettingsWidget.getGLCheckBox()->checkState()) {
+    if (fSettingsWidget.isGLActive()) {
         renderer->setDeviceType(sk_tools::PictureRenderer::kGPU_DeviceType);
+        renderer->setSampleCount(fSettingsWidget.getGLSampleCount());
     }
 #endif
 
@@ -459,7 +460,11 @@
 }
 
 #if SK_SUPPORT_GPU
-void SkDebuggerGUI::actionGLWidget(bool isToggled) {
+void SkDebuggerGUI::actionGLWidget() {
+    bool isToggled = fSettingsWidget.isGLActive();
+    if (isToggled) {
+        fCanvasWidget.setGLSampleCount(fSettingsWidget.getGLSampleCount());
+    }
     fCanvasWidget.setWidgetVisibility(SkCanvasWidget::kGPU_WidgetType, !isToggled);
 }
 #endif