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,13 @@ |
#if SK_SUPPORT_GPU |
switch (fDeviceType) { |
case kGPU_DeviceType: |
- config.append("_gpu"); |
+ if (fSampleCount == 4) { |
bsalomon
2013/04/29 18:59:26
if (fSampleCount) {
config.appendf("_msaa%d",
jvanverth1
2013/04/29 19:36:27
Done.
|
+ config.append("_msaa4"); |
+ } else if (fSampleCount == 16) { |
+ config.append("_msaa16"); |
+ } else { |
+ config.append("_gpu"); |
+ } |
break; |
#if SK_ANGLE |
case kAngle_DeviceType: |
@@ -261,6 +273,7 @@ |
, fScaleFactor(SK_Scalar1) |
#if SK_SUPPORT_GPU |
, fGrContext(NULL) |
+ , fSampleCount(0) |
#endif |
{ |
fGridInfo.fMargin.setEmpty(); |
@@ -315,6 +328,7 @@ |
#if SK_SUPPORT_GPU |
GrContextFactory fGrContextFactory; |
GrContext* fGrContext; |
+ int fSampleCount; |
scroggo
2013/04/29 19:05:44
Should this be an enum that only accepts 4, 16, an
jvanverth1
2013/04/29 19:36:27
Done.
|
#endif |
virtual SkString getConfigNameInternal() = 0; |