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

Unified Diff: include/gpu/GrRenderTarget.h

Issue 1717393002: Add "sample locations" feature to GrProcessor (Closed) Base URL: https://skia.googlesource.com/skia.git@upload_getmultisamp
Patch Set: move into GrProcessor Created 4 years, 10 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: include/gpu/GrRenderTarget.h
diff --git a/include/gpu/GrRenderTarget.h b/include/gpu/GrRenderTarget.h
index d39d284bd8259a90a8b43b93f1ca28ca65e13f7d..838b5725cd397cbbf193791280e8a81b564f0148 100644
--- a/include/gpu/GrRenderTarget.h
+++ b/include/gpu/GrRenderTarget.h
@@ -193,6 +193,29 @@ private:
// and the drawTarget of a destination renderTarget to which this one is being drawn.
GrDrawTarget* fLastDrawTarget;
+ /**
+ * Info struct filled out by GrGpu that contains hardware-specific multisample info.
+ */
+ struct MultisampleSpecs {
+ /**
+ * The actual number of samples allocated for the render target. NOTE: this value can be
+ * greater than the surface descriptor's sample count.
+ */
+ int fEffectiveSampleCnt;
+ /**
+ * If sample locations are supported, contains a nonzero unique ID that identifies the
+ * render target's sample pattern.
+ */
+ uint16_t fSamplePatternID;
+ /**
+ * If supported, references the render target's sample locations. The sample locations are
+ * stored in device space, with the center of the pixel at [0.5, 0.5].
+ */
+ const SkPoint* fSampleLocations;
+ };
+
+ SkAutoTDelete<MultisampleSpecs> fMultisampleSpecs;
+
typedef GrSurface INHERITED;
};

Powered by Google App Engine
This is Rietveld 408576698