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

Unified Diff: tools/PictureRenderer.h

Issue 14544007: Add msaa configs to bench_pictures (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Remove enum Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/PictureRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/PictureRenderer.h
===================================================================
--- tools/PictureRenderer.h (revision 8891)
+++ tools/PictureRenderer.h (working copy)
@@ -162,6 +162,12 @@
#endif
}
+#if SK_SUPPORT_GPU
+ void setSampleCount(int sampleCount) {
+ fSampleCount = sampleCount;
+ }
+#endif
+
void setDrawFilters(DrawFilterFlags const * const filters, const SkString& configName) {
memcpy(fDrawFilters, filters, sizeof(fDrawFilters));
fDrawFiltersConfig = configName;
@@ -201,7 +207,11 @@
#if SK_SUPPORT_GPU
switch (fDeviceType) {
case kGPU_DeviceType:
- config.append("_gpu");
+ if (fSampleCount) {
+ config.appendf("_msaa%d", fSampleCount);
+ } else {
+ config.append("_gpu");
+ }
break;
#if SK_ANGLE
case kAngle_DeviceType:
@@ -261,6 +271,7 @@
, fScaleFactor(SK_Scalar1)
#if SK_SUPPORT_GPU
, fGrContext(NULL)
+ , fSampleCount(0)
#endif
{
fGridInfo.fMargin.setEmpty();
@@ -315,6 +326,7 @@
#if SK_SUPPORT_GPU
GrContextFactory fGrContextFactory;
GrContext* fGrContext;
+ int fSampleCount;
#endif
virtual SkString getConfigNameInternal() = 0;
« no previous file with comments | « no previous file | tools/PictureRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698