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

Unified Diff: src/gpu/GrGpu.h

Issue 1717393002: Add "sample locations" feature to GrProcessor (Closed) Base URL: https://skia.googlesource.com/skia.git@upload_getmultisamp
Patch Set: comments Created 4 years, 9 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/GrGpu.h
diff --git a/src/gpu/GrGpu.h b/src/gpu/GrGpu.h
index 5d35fcf859bca3792681e9e6ff5037e92fc9fdf0..aea6b1900223f8ae7b33722176d99229ead77ec3 100644
--- a/src/gpu/GrGpu.h
+++ b/src/gpu/GrGpu.h
@@ -365,6 +365,13 @@ public:
const SkIRect& srcRect,
const SkIPoint& dstPoint);
+ const GrCaps::MultisampleSpecs& getMultisampleSpecs(GrRenderTarget* rt,
+ const GrStencilSettings& stencil) {
+ using namespace std::placeholders;
+ const auto& functor = std::bind(&GrGpu::onGetMultisampleSpecs, this, rt, stencil, _1, _2);
+ return this->caps()->getMultisampleSpecs(rt->desc(), functor);
+ }
+
struct DrawArgs {
DrawArgs(const GrPrimitiveProcessor* primProc,
const GrPipeline* pipeline,
@@ -601,6 +608,12 @@ private:
const SkIRect& srcRect,
const SkIPoint& dstPoint) = 0;
+ // overridden by backend specific derived class to perform the multisample queries
+ virtual void onGetMultisampleSpecs(GrRenderTarget*,
+ const GrStencilSettings&,
+ int* effectiveSampleCnt,
+ SkAutoTDeleteArray<SkPoint>* samplePattern) = 0;
+
void resetContext() {
this->onResetContext(fResetBits);
fResetBits = 0;
« include/gpu/GrCaps.h ('K') | « src/gpu/GrCaps.cpp ('k') | src/gpu/GrProgramDesc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698