Chromium Code Reviews| Index: src/gpu/GrGpu.h |
| diff --git a/src/gpu/GrGpu.h b/src/gpu/GrGpu.h |
| index 147c4810200ea45daa192aa6e585fcc98f049ad8..da636138fe6bfebe94006ecc7f7e88745238dcf8 100644 |
| --- a/src/gpu/GrGpu.h |
| +++ b/src/gpu/GrGpu.h |
| @@ -10,11 +10,13 @@ |
| #include "GrPipelineBuilder.h" |
| #include "GrProgramDesc.h" |
| +#include "GrRenderTargetPriv.h" |
| #include "GrStencil.h" |
| #include "GrSwizzle.h" |
| #include "GrTextureParamsAdjuster.h" |
| #include "GrXferProcessor.h" |
| #include "SkPath.h" |
| +#include <map> |
| class GrBatchTracker; |
| class GrContext; |
| @@ -333,6 +335,10 @@ public: |
| const SkIRect& srcRect, |
| const SkIPoint& dstPoint); |
| + typedef GrRenderTargetPriv::MultisampleSpecs MultisampleSpecs; |
| + |
| + const MultisampleSpecs& getMultisampleSpecs(GrRenderTarget*, const GrStencilSettings&); |
| + |
| struct DrawArgs { |
| DrawArgs(const GrPrimitiveProcessor* primProc, |
| const GrPipeline* pipeline, |
| @@ -487,6 +493,11 @@ protected: |
| } |
| } |
| + class SamplePattern : public SkTArray<SkPoint, true> { |
|
bsalomon
2016/02/22 20:28:25
It seems a little odd to me for this to be a point
Chris Dalton
2016/02/22 21:19:11
Yeah, that felt a little weird. The only reason th
Chris Dalton
2016/02/22 22:17:55
Done.
|
| + public: |
| + bool operator <(const SamplePattern&) const; |
| + }; |
| + |
| Stats fStats; |
| SkAutoTDelete<GrPathRendering> fPathRendering; |
| // Subclass must initialize this in its constructor. |
| @@ -566,6 +577,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, |
| + SamplePattern*) = 0; |
| + |
| void resetContext() { |
| this->onResetContext(fResetBits); |
| fResetBits = 0; |
| @@ -574,6 +591,9 @@ private: |
| ResetTimestamp fResetTimestamp; |
| uint32_t fResetBits; |
| + SkTArray<skstd::unique_ptr<MultisampleSpecs> > fRasterMultisampleSpecs; |
| + std::map<SamplePattern, uint16_t> fKnownSamplePatterns; |
| + uint16_t fNextSamplePatternID; |
| // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. |
| GrContext* fContext; |