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

Unified Diff: src/gpu/GrRenderTarget.cpp

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: src/gpu/GrRenderTarget.cpp
diff --git a/src/gpu/GrRenderTarget.cpp b/src/gpu/GrRenderTarget.cpp
index e547021227724d03e11ab0bb4c9053989eb8288e..51282b47ee92430f50bd797c08e8cadc65b977f3 100644
--- a/src/gpu/GrRenderTarget.cpp
+++ b/src/gpu/GrRenderTarget.cpp
@@ -105,3 +105,17 @@ bool GrRenderTargetPriv::attachStencilAttachment(GrStencilAttachment* stencil) {
}
return true;
}
+
+int GrRenderTargetPriv::getEffectiveSampleCount(const GrStencilSettings& stencil) const {
+ return fRenderTarget->getGpu()->getMultisampleSpecs(fRenderTarget, stencil).fEffectiveSampleCnt;
+}
+
+uint16_t GrRenderTargetPriv::getSamplePatternID(const GrStencilSettings& stencil) const {
+ SkASSERT(fRenderTarget->getGpu()->caps()->sampleLocationsSupport());
+ return fRenderTarget->getGpu()->getMultisampleSpecs(fRenderTarget, stencil).fSamplePatternID;
+}
+
+const SkPoint* GrRenderTargetPriv::getSampleLocations(const GrStencilSettings& stencil) const {
+ SkASSERT(fRenderTarget->getGpu()->caps()->sampleLocationsSupport());
+ return fRenderTarget->getGpu()->getMultisampleSpecs(fRenderTarget, stencil).fSampleLocations;
+}

Powered by Google App Engine
This is Rietveld 408576698