Index: include/gpu/GrRenderTarget.h |
diff --git a/include/gpu/GrRenderTarget.h b/include/gpu/GrRenderTarget.h |
index 2309dbd876f6cf4e9d58b715730088045e83fb65..17d75d75290223bfca3f75a22256af8c189c56b7 100644 |
--- a/include/gpu/GrRenderTarget.h |
+++ b/include/gpu/GrRenderTarget.h |
@@ -81,6 +81,13 @@ public: |
} |
/** |
+ * @return the number of actual raster samples-per-pixel, or zero if non-MSAA. |
+ */ |
+ int numRasterSamples() const { |
+ return fStencilAttachment ? this->numStencilSamples() : this->numColorSamples(); |
+ } |
+ |
+ /** |
* @return true if the surface is mixed sampled, false otherwise. |
*/ |
bool hasMixedSamples() const { |