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

Unified Diff: src/gpu/GrRenderTargetPriv.h

Issue 1232103002: Enable stencil clipping in mixed sampled render targets (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Predefined sample locations, glcaps, render target priv Created 5 years, 3 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
Index: src/gpu/GrRenderTargetPriv.h
diff --git a/src/gpu/GrRenderTargetPriv.h b/src/gpu/GrRenderTargetPriv.h
index f4931db1db7475feab36d24f163aeec8b4bc0f7e..115dc530a882e6dcb0c0feddaf34317476c106bc 100644
--- a/src/gpu/GrRenderTargetPriv.h
+++ b/src/gpu/GrRenderTargetPriv.h
@@ -27,6 +27,32 @@ public:
*/
bool attachStencilAttachment(GrStencilAttachment* stencil);
+ /**
+ * Some hardware allows overriding the default multisampling pattern with user-defined sample
+ * locations. Returns true if the render target has been configured to use programmable sample
+ * locations. */
+ bool programmableSampleLocationsEnabled() { return fRenderTarget->fProgrammableSampleLocationsEnabled; }
+
+ /** Mark render target as being configured to use programmable sample locations, or otherwise. */
+ void setProgrammableSampleLocationsEnabled(bool enabled) {
+ fRenderTarget->fProgrammableSampleLocationsEnabled = enabled;
+ }
+
+ /**
+ * @return true if centered sample locations have been set for this
+ * render target. Requires support for NV_sample_locations.
+ */
+ bool usesCenteredSampleLocations() const {
+ return fRenderTarget->fUsesCenteredSampleLocations;
+ }
+
+ /**
+ * Flag render target as using or not using programmable sample locations.
+ */
+ void flagAsUsingCenteredSampleLocations(bool useCenteredSampleLocations) {
+ fRenderTarget->fUsesCenteredSampleLocations = useCenteredSampleLocations;
+ }
+
private:
explicit GrRenderTargetPriv(GrRenderTarget* renderTarget) : fRenderTarget(renderTarget) {}
GrRenderTargetPriv(const GrRenderTargetPriv&) {} // unimpl

Powered by Google App Engine
This is Rietveld 408576698