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

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: assert 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
« no previous file with comments | « no previous file | src/gpu/GrGpu.h » ('j') | src/gpu/GrGpu.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrRenderTarget.h
diff --git a/include/gpu/GrRenderTarget.h b/include/gpu/GrRenderTarget.h
index d39d284bd8259a90a8b43b93f1ca28ca65e13f7d..f01bb6a572266a14a4185c9551dd30dd1864a248 100644
--- a/include/gpu/GrRenderTarget.h
+++ b/include/gpu/GrRenderTarget.h
@@ -193,6 +193,30 @@ 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 {
+ MultisampleSpecs() { memset(this, 0, sizeof(*this)); }
+ /**
+ * The actual number of samples allocated for the render target. NOTE: this value can be
+ * greater than the surface descriptor's sample count.
bsalomon 2016/02/22 20:28:25 How does that happen? Is it referring to the fact
Chris Dalton 2016/02/22 21:19:11 Yeah, it's in 4.4.2 of the 3.0 spec: If samples
+ */
+ int fEffectiveSampleCnt;
+ /**
+ * If sample locations are supported, contains a unique ID that identifies the render
+ * target's sample pattern. Otherwise 0.
+ */
+ uint16_t fSamplePatternID;
+ /**
+ * If supported, references the render target's sample locations. Otherwise nullptr. The
+ * locations are stored as offsets in device space from the center of the pixel.
+ */
+ const SkPoint* fSampleLocations;
+ };
+
+ SkAutoTDelete<MultisampleSpecs> fMultisampleSpecs;
+
typedef GrSurface INHERITED;
};
« no previous file with comments | « no previous file | src/gpu/GrGpu.h » ('j') | src/gpu/GrGpu.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698