Index: src/gpu/GrRenderTargetPriv.h |
diff --git a/src/gpu/GrRenderTargetPriv.h b/src/gpu/GrRenderTargetPriv.h |
index f4931db1db7475feab36d24f163aeec8b4bc0f7e..2d2fe94a294732c3b5b20a83594a3c2e0b2bca24 100644 |
--- a/src/gpu/GrRenderTargetPriv.h |
+++ b/src/gpu/GrRenderTargetPriv.h |
@@ -10,11 +10,15 @@ |
#include "GrRenderTarget.h" |
+class GrStencilSettings; |
+ |
/** Class that adds methods to GrRenderTarget that are only intended for use internal to Skia. |
This class is purely a privileged window into GrRenderTarget. It should never have additional |
data members or virtual methods. */ |
class GrRenderTargetPriv { |
public: |
+ typedef GrRenderTarget::MultisampleSpecs MultisampleSpecs; |
+ |
/** |
* GrStencilAttachment is not part of the public API. |
*/ |
@@ -27,6 +31,37 @@ public: |
*/ |
bool attachStencilAttachment(GrStencilAttachment* stencil); |
+ /** |
+ * Returns the actual number of samples the GPU will run when drawing to this render target with |
+ * HW antialiasing and the provided stencil settings. NOTE: this can be greater than the sample |
+ * count in the render target's surface descriptor. |
+ */ |
+ int getEffectiveSampleCount(const GrStencilSettings&) const; |
+ |
+ /** |
+ * Returns a nonzero unique ID that identifies the sample pattern the GPU will use when drawing |
+ * to this render target with HW antialiasing and the provided stencil settings. |
+ * |
+ * Requires support for sample locations. |
+ */ |
+ uint16_t getSamplePatternID(const GrStencilSettings&) const; |
+ |
+ /** |
+ * Returns the sample locations the GPU will use when drawing to this render target with HW |
+ * antialiasing and the provided stencil settings. The sample locations are stored in device |
+ * space, with the center of the pixel at [0.5, 0.5]. |
+ * |
+ * Requires support for sample locations. |
+ */ |
+ const SkPoint* getSampleLocations(const GrStencilSettings&) const; |
+ |
+ /** |
+ * Used by GrGpu to cache the render target's multisample info. |
+ */ |
+ SkAutoTDelete<MultisampleSpecs>* accessMultisampleSpecs() { |
+ return &fRenderTarget->fMultisampleSpecs; |
+ } |
+ |
private: |
explicit GrRenderTargetPriv(GrRenderTarget* renderTarget) : fRenderTarget(renderTarget) {} |
GrRenderTargetPriv(const GrRenderTargetPriv&) {} // unimpl |