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

Unified Diff: src/gpu/gl/GrGLRenderTarget.h

Issue 1232103002: Enable stencil clipping in mixed sampled render targets (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: GL_ARB_sample_locations 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
« no previous file with comments | « src/gpu/gl/GrGLPathRendering.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLRenderTarget.h
diff --git a/src/gpu/gl/GrGLRenderTarget.h b/src/gpu/gl/GrGLRenderTarget.h
index d1365efd420c10af802bd173fd534a4d443871cd..ce04ae017dca79981746d66730e53254c6286b1b 100644
--- a/src/gpu/gl/GrGLRenderTarget.h
+++ b/src/gpu/gl/GrGLRenderTarget.h
@@ -70,6 +70,21 @@ public:
// components seperately.
void dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const override;
+ /**
+ * @return true if sample locations colocated at pixel center have been set for this
+ * render target. Requires support for NV_sample_locations.
+ */
+ bool usesColocatedSampleLocations() const {
+ return fUsesColocatedSampleLocations;
+ }
+
+ /**
+ * Flag render target as using or not using sample locations colocated at pixel center.
+ */
+ void flagAsUsingColocatedSampleLocations(bool useColocatedSampleLocations) {
+ fUsesColocatedSampleLocations = useColocatedSampleLocations;
+ }
+
protected:
// The public constructor registers this object with the cache. However, only the most derived
// class should register with the cache. This constructor does not do the registration and
@@ -116,6 +131,10 @@ private:
// release zero out the IDs and the cache needs to know the size even after those actions.
size_t fGpuMemorySize;
+ // True if sample locations colocated at pixel center are currently in use, false if default
+ // sample locations are currently in use.
+ bool fUsesColocatedSampleLocations;
+
typedef GrRenderTarget INHERITED;
};
« no previous file with comments | « src/gpu/gl/GrGLPathRendering.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698