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

Side by Side Diff: debugger/QT/SkSettingsWidget.cpp

Issue 21752002: Support MSAA in the picture debugger (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « debugger/QT/SkSettingsWidget.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "SkSettingsWidget.h" 10 #include "SkSettingsWidget.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 fRasterCheckBox.setChecked(true); 60 fRasterCheckBox.setChecked(true);
61 61
62 fOverdrawVizLabel.setText(" Overdraw Viz: "); 62 fOverdrawVizLabel.setText(" Overdraw Viz: ");
63 fOverdrawVizLabel.setMinimumWidth(178); 63 fOverdrawVizLabel.setMinimumWidth(178);
64 fOverdrawVizLabel.setMaximumWidth(178); 64 fOverdrawVizLabel.setMaximumWidth(178);
65 65
66 #if SK_SUPPORT_GPU 66 #if SK_SUPPORT_GPU
67 fGLLabel.setText("OpenGL: "); 67 fGLLabel.setText("OpenGL: ");
68 fGLLabel.setMinimumWidth(178); 68 fGLLabel.setMinimumWidth(178);
69 fGLLabel.setMaximumWidth(178); 69 fGLLabel.setMaximumWidth(178);
70
71 fGLMSAAButtonGroup.setTitle("MSAA");
72 fGLMSAAButtonGroup.setMinimumWidth(178);
73 fGLMSAAButtonGroup.setMaximumWidth(178);
74 fGLMSAAButtonGroup.setEnabled(fGLCheckBox.isChecked());
75
76 fGLMSAAOff.setText("Off");
77 fGLMSAA4On.setText("4");
78 fGLMSAA4On.setChecked(true);
79 fGLMSAA16On.setText("16");
80
81 fGLMSAALayout.addWidget(&fGLMSAAOff);
82 fGLMSAALayout.addWidget(&fGLMSAA4On);
83 fGLMSAALayout.addWidget(&fGLMSAA16On);
84
85 fGLMSAAButtonGroup.setLayout(&fGLMSAALayout);
86
87 connect(&fGLCheckBox, SIGNAL(toggled(bool)), &fGLMSAAButtonGroup, SLOT(setEn abled(bool)));
88 connect(&fGLCheckBox, SIGNAL(toggled(bool)), this, SIGNAL(glSettingsChanged( )));
89 connect(&fGLMSAAOff, SIGNAL(toggled(bool)), this, SIGNAL(glSettingsChanged() ));
90 connect(&fGLMSAA4On, SIGNAL(toggled(bool)), this, SIGNAL(glSettingsChanged() ));
91 connect(&fGLMSAA16On, SIGNAL(toggled(bool)), this, SIGNAL(glSettingsChanged( )));
70 #endif 92 #endif
71 93
72 fRasterLayout.addWidget(&fRasterLabel); 94 fRasterLayout.addWidget(&fRasterLabel);
73 fRasterLayout.addWidget(&fRasterCheckBox); 95 fRasterLayout.addWidget(&fRasterCheckBox);
74 96
75 fOverdrawVizLayout.addWidget(&fOverdrawVizLabel); 97 fOverdrawVizLayout.addWidget(&fOverdrawVizLabel);
76 fOverdrawVizLayout.addWidget(&fOverdrawVizCheckBox); 98 fOverdrawVizLayout.addWidget(&fOverdrawVizCheckBox);
77 99
78 #if SK_SUPPORT_GPU 100 #if SK_SUPPORT_GPU
79 fGLLayout.addWidget(&fGLLabel); 101 fGLLayout.addWidget(&fGLLabel);
80 fGLLayout.addWidget(&fGLCheckBox); 102 fGLLayout.addWidget(&fGLCheckBox);
81 #endif 103 #endif
82 104
83 fCanvasLayout.setSpacing(6); 105 fCanvasLayout.setSpacing(6);
84 fCanvasLayout.setContentsMargins(11,11,11,11); 106 fCanvasLayout.setContentsMargins(11,11,11,11);
85 fCanvasLayout.addLayout(&fRasterLayout); 107 fCanvasLayout.addLayout(&fRasterLayout);
86 fCanvasLayout.addLayout(&fOverdrawVizLayout); 108 fCanvasLayout.addLayout(&fOverdrawVizLayout);
87 #if SK_SUPPORT_GPU 109 #if SK_SUPPORT_GPU
88 fCanvasLayout.addLayout(&fGLLayout); 110 fCanvasLayout.addLayout(&fGLLayout);
111 fCanvasLayout.addWidget(&fGLMSAAButtonGroup);
89 #endif 112 #endif
90 113
91 // Command Toggle 114 // Command Toggle
92 fCommandToggle.setText("Command Scrolling Preferences"); 115 fCommandToggle.setText("Command Scrolling Preferences");
93 fCommandFrame.setFrameShape(QFrame::StyledPanel); 116 fCommandFrame.setFrameShape(QFrame::StyledPanel);
94 fCommandFrame.setFrameShadow(QFrame::Raised); 117 fCommandFrame.setFrameShadow(QFrame::Raised);
95 118
96 fCurrentCommandLabel.setText("Current Command: "); 119 fCurrentCommandLabel.setText("Current Command: ");
97 fCurrentCommandLabel.setMinimumWidth(178); 120 fCurrentCommandLabel.setMinimumWidth(178);
98 fCurrentCommandLabel.setMaximumWidth(178); 121 fCurrentCommandLabel.setMaximumWidth(178);
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 fCommandHitBox.setText(QString::number(newHit)); 184 fCommandHitBox.setText(QString::number(newHit));
162 } 185 }
163 186
164 QRadioButton* SkSettingsWidget::getVisibilityButton() { 187 QRadioButton* SkSettingsWidget::getVisibilityButton() {
165 return &fVisibleOn; 188 return &fVisibleOn;
166 } 189 }
167 190
168 void SkSettingsWidget::setZoomText(float scale) { 191 void SkSettingsWidget::setZoomText(float scale) {
169 fZoomBox.setText(QString::number(scale*100, 'f', 0).append("%")); 192 fZoomBox.setText(QString::number(scale*100, 'f', 0).append("%"));
170 } 193 }
OLDNEW
« no previous file with comments | « debugger/QT/SkSettingsWidget.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698