diff options
author | bsalomon <bsalomon@google.com> | 2015-05-19 09:29:46 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-19 09:29:46 -0700 |
commit | 4b91f768b348aa1cebeb54f3ff9331938734c242 (patch) | |
tree | 48bab710cb6a14979551fd7bdea5244a65c37393 | |
parent | b8c241ad099f3f0c2cbf3e7c10f5f6207175d490 (diff) |
rename GrDrawTargetCaps to GrCaps
Review URL: https://codereview.chromium.org/1133123009
65 files changed, 158 insertions, 158 deletions
diff --git a/include/gpu/GrProcessorUnitTest.h b/include/gpu/GrProcessorUnitTest.h index 5145a49749..13b6fc0756 100644 --- a/include/gpu/GrProcessorUnitTest.h +++ b/include/gpu/GrProcessorUnitTest.h @@ -13,7 +13,7 @@ #include "SkTypes.h" class SkMatrix; -class GrDrawTargetCaps; +class GrCaps; namespace GrProcessorUnitTest { // Used to access the dummy textures in TestCreate procs. @@ -36,7 +36,7 @@ public: typedef Processor* (*CreateProc)(SkRandom*, GrContext*, - const GrDrawTargetCaps& caps, + const GrCaps& caps, GrTexture* dummyTextures[]); GrProcessorTestFactory(CreateProc createProc) { @@ -46,7 +46,7 @@ public: static Processor* CreateStage(SkRandom* random, GrContext* context, - const GrDrawTargetCaps& caps, + const GrCaps& caps, GrTexture* dummyTextures[]) { VerifyFactoryCount(); SkASSERT(GetFactories()->count()); @@ -73,21 +73,21 @@ private: static GrProcessorTestFactory<GrGeometryProcessor> gTestFactory SK_UNUSED; \ static GrGeometryProcessor* TestCreate(SkRandom*, \ GrContext*, \ - const GrDrawTargetCaps&, \ + const GrCaps&, \ GrTexture* dummyTextures[2]) #define GR_DECLARE_FRAGMENT_PROCESSOR_TEST \ static GrProcessorTestFactory<GrFragmentProcessor> gTestFactory SK_UNUSED; \ static GrFragmentProcessor* TestCreate(SkRandom*, \ GrContext*, \ - const GrDrawTargetCaps&, \ + const GrCaps&, \ GrTexture* dummyTextures[2]) #define GR_DECLARE_XP_FACTORY_TEST \ static GrProcessorTestFactory<GrXPFactory> gTestFactory SK_UNUSED; \ static GrXPFactory* TestCreate(SkRandom*, \ GrContext*, \ - const GrDrawTargetCaps&, \ + const GrCaps&, \ GrTexture* dummyTextures[2]) @@ -95,7 +95,7 @@ private: * also implement this static function: * GrProcessor* TestCreate(SkRandom*, * GrContext*, - * const GrDrawTargetCaps&, + * const GrCaps&, * GrTexture* dummyTextures[2]); * dummyTextures[] are valid textures that can optionally be used to construct GrTextureAccesses. * The first texture has config kSkia8888_GrPixelConfig and the second has @@ -118,7 +118,7 @@ private: #define GR_DECLARE_FRAGMENT_PROCESSOR_TEST \ static GrFragmentProcessor* TestCreate(SkRandom*, \ GrContext*, \ - const GrDrawTargetCaps&, \ + const GrCaps&, \ GrTexture* dummyTextures[2]) #define GR_DEFINE_FRAGMENT_PROCESSOR_TEST(X) @@ -127,7 +127,7 @@ private: #define GR_DECLARE_XP_FACTORY_TEST \ static GrXPFactory* TestCreate(SkRandom*, \ GrContext*, \ - const GrDrawTargetCaps&, \ + const GrCaps&, \ GrTexture* dummyTextures[2]) #define GR_DEFINE_XP_FACTORY_TEST(X) @@ -136,7 +136,7 @@ private: #define GR_DECLARE_GEOMETRY_PROCESSOR_TEST \ static GrGeometryProcessor* TestCreate(SkRandom*, \ GrContext*, \ - const GrDrawTargetCaps&, \ + const GrCaps&, \ GrTexture* dummyTextures[2]) #define GR_DEFINE_GEOMETRY_PROCESSOR_TEST(X) diff --git a/include/gpu/GrXferProcessor.h b/include/gpu/GrXferProcessor.h index fa9dca211e..8458a620fe 100644 --- a/include/gpu/GrXferProcessor.h +++ b/include/gpu/GrXferProcessor.h @@ -167,14 +167,14 @@ public: const GrProcOptInfo& coveragePOI, bool doesStencilWrite, GrColor* overrideColor, - const GrDrawTargetCaps& caps); + const GrCaps& caps); /** * Returns whether this XP will require an Xfer barrier on the given rt. If true, outBarrierType * is updated to contain the type of barrier needed. */ bool willNeedXferBarrier(const GrRenderTarget* rt, - const GrDrawTargetCaps& caps, + const GrCaps& caps, GrXferBarrierType* outBarrierType) const; struct BlendInfo { @@ -264,7 +264,7 @@ private: const GrProcOptInfo& coveragePOI, bool doesStencilWrite, GrColor* overrideColor, - const GrDrawTargetCaps& caps) = 0; + const GrCaps& caps) = 0; /** * Sets a unique key on the GrProcessorKeyBuilder that is directly associated with this xfer @@ -278,7 +278,7 @@ private: * of barrier. */ virtual bool onWillNeedXferBarrier(const GrRenderTarget*, - const GrDrawTargetCaps&, + const GrCaps&, GrXferBarrierType* outBarrierType SK_UNUSED) const { return false; } @@ -320,7 +320,7 @@ public: GrXferProcessor* createXferProcessor(const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI, const GrDeviceCoordTexture* dstCopy, - const GrDrawTargetCaps& caps) const; + const GrCaps& caps) const; /** * This function returns true if the GrXferProcessor generated from this factory will be able to @@ -343,7 +343,7 @@ public: virtual void getInvariantOutput(const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI, InvariantOutput*) const = 0; - bool willNeedDstCopy(const GrDrawTargetCaps& caps, const GrProcOptInfo& colorPOI, + bool willNeedDstCopy(const GrCaps& caps, const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI) const; bool isEqual(const GrXPFactory& that) const { @@ -371,7 +371,7 @@ protected: uint32_t fClassID; private: - virtual GrXferProcessor* onCreateXferProcessor(const GrDrawTargetCaps& caps, + virtual GrXferProcessor* onCreateXferProcessor(const GrCaps& caps, const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI, const GrDeviceCoordTexture* dstCopy) const = 0; @@ -379,7 +379,7 @@ private: * Returns true if the XP generated by this factory will explicitly read dst in the fragment * shader. */ - virtual bool willReadDstColor(const GrDrawTargetCaps& caps, + virtual bool willReadDstColor(const GrCaps& caps, const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI) const = 0; diff --git a/include/gpu/effects/GrCoverageSetOpXP.h b/include/gpu/effects/GrCoverageSetOpXP.h index fcae6d2fc6..f4224e1cbe 100644 --- a/include/gpu/effects/GrCoverageSetOpXP.h +++ b/include/gpu/effects/GrCoverageSetOpXP.h @@ -34,12 +34,12 @@ public: private: GrCoverageSetOpXPFactory(SkRegion::Op regionOp, bool invertCoverage); - GrXferProcessor* onCreateXferProcessor(const GrDrawTargetCaps& caps, + GrXferProcessor* onCreateXferProcessor(const GrCaps& caps, const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI, const GrDeviceCoordTexture* dstCopy) const override; - bool willReadDstColor(const GrDrawTargetCaps& /*caps*/, + bool willReadDstColor(const GrCaps& /*caps*/, const GrProcOptInfo& /*colorPOI*/, const GrProcOptInfo& /*coveragePOI*/) const override { return false; diff --git a/include/gpu/effects/GrPorterDuffXferProcessor.h b/include/gpu/effects/GrPorterDuffXferProcessor.h index d47fc0f8cc..481b373c10 100644 --- a/include/gpu/effects/GrPorterDuffXferProcessor.h +++ b/include/gpu/effects/GrPorterDuffXferProcessor.h @@ -26,12 +26,12 @@ public: private: GrPorterDuffXPFactory(GrBlendCoeff src, GrBlendCoeff dst); - GrXferProcessor* onCreateXferProcessor(const GrDrawTargetCaps& caps, + GrXferProcessor* onCreateXferProcessor(const GrCaps& caps, const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI, const GrDeviceCoordTexture* dstCopy) const override; - bool willReadDstColor(const GrDrawTargetCaps& caps, + bool willReadDstColor(const GrCaps& caps, const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI) const override; diff --git a/src/effects/SkAlphaThresholdFilter.cpp b/src/effects/SkAlphaThresholdFilter.cpp index 70d195bfbd..d4638779a4 100644 --- a/src/effects/SkAlphaThresholdFilter.cpp +++ b/src/effects/SkAlphaThresholdFilter.cpp @@ -203,7 +203,7 @@ GR_DEFINE_FRAGMENT_PROCESSOR_TEST(AlphaThresholdEffect); GrFragmentProcessor* AlphaThresholdEffect::TestCreate(SkRandom* random, GrContext* context, - const GrDrawTargetCaps&, + const GrCaps&, GrTexture** textures) { GrTexture* bmpTex = textures[GrProcessorUnitTest::kSkiaPMTextureIdx]; GrTexture* maskTex = textures[GrProcessorUnitTest::kAlphaTextureIdx]; diff --git a/src/effects/SkArithmeticMode_gpu.cpp b/src/effects/SkArithmeticMode_gpu.cpp index 69c2d7c0fd..ae0839710c 100644 --- a/src/effects/SkArithmeticMode_gpu.cpp +++ b/src/effects/SkArithmeticMode_gpu.cpp @@ -141,7 +141,7 @@ void GrArithmeticFP::onComputeInvariantOutput(GrInvariantOutput* inout) const { GrFragmentProcessor* GrArithmeticFP::TestCreate(SkRandom* rand, GrContext*, - const GrDrawTargetCaps&, + const GrCaps&, GrTexture* textures[]) { float k1 = rand->nextF(); float k2 = rand->nextF(); @@ -189,7 +189,7 @@ private: const GrProcOptInfo& coveragePOI, bool doesStencilWrite, GrColor* overrideColor, - const GrDrawTargetCaps& caps) override; + const GrCaps& caps) override; void onGetGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override; @@ -285,7 +285,7 @@ GrXferProcessor::OptFlags ArithmeticXP::onGetOptimizations(const GrProcOptInfo& const GrProcOptInfo& coveragePOI, bool doesStencilWrite, GrColor* overrideColor, - const GrDrawTargetCaps& caps) { + const GrCaps& caps) { return GrXferProcessor::kNone_Opt; } @@ -298,7 +298,7 @@ GrArithmeticXPFactory::GrArithmeticXPFactory(float k1, float k2, float k3, float } GrXferProcessor* -GrArithmeticXPFactory::onCreateXferProcessor(const GrDrawTargetCaps& caps, +GrArithmeticXPFactory::onCreateXferProcessor(const GrCaps& caps, const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI, const GrDeviceCoordTexture* dstCopy) const { @@ -322,7 +322,7 @@ GR_DEFINE_XP_FACTORY_TEST(GrArithmeticXPFactory); GrXPFactory* GrArithmeticXPFactory::TestCreate(SkRandom* random, GrContext*, - const GrDrawTargetCaps&, + const GrCaps&, GrTexture*[]) { float k1 = random->nextF(); float k2 = random->nextF(); diff --git a/src/effects/SkArithmeticMode_gpu.h b/src/effects/SkArithmeticMode_gpu.h index 9f6953e238..a8e32ab03a 100644 --- a/src/effects/SkArithmeticMode_gpu.h +++ b/src/effects/SkArithmeticMode_gpu.h @@ -87,12 +87,12 @@ public: private: GrArithmeticXPFactory(float k1, float k2, float k3, float k4, bool enforcePMColor); - GrXferProcessor* onCreateXferProcessor(const GrDrawTargetCaps& caps, + GrXferProcessor* onCreateXferProcessor(const GrCaps& caps, const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI, const GrDeviceCoordTexture* dstCopy) const override; - bool willReadDstColor(const GrDrawTargetCaps& caps, + bool willReadDstColor(const GrCaps& caps, const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI) const override { return true; diff --git a/src/effects/SkBlurMaskFilter.cpp b/src/effects/SkBlurMaskFilter.cpp index 574a9af2b6..556cb4469d 100644 --- a/src/effects/SkBlurMaskFilter.cpp +++ b/src/effects/SkBlurMaskFilter.cpp @@ -822,7 +822,7 @@ GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrRectBlurEffect); GrFragmentProcessor* GrRectBlurEffect::TestCreate(SkRandom* random, GrContext* context, - const GrDrawTargetCaps&, + const GrCaps&, GrTexture**) { float sigma = random->nextRangeF(3,8); float width = random->nextRangeF(200,300); @@ -1004,7 +1004,7 @@ GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrRRectBlurEffect); GrFragmentProcessor* GrRRectBlurEffect::TestCreate(SkRandom* random, GrContext* context, - const GrDrawTargetCaps& caps, + const GrCaps& caps, GrTexture*[]) { SkScalar w = random->nextRangeScalar(100.f, 1000.f); SkScalar h = random->nextRangeScalar(100.f, 1000.f); diff --git a/src/effects/SkColorFilters.cpp b/src/effects/SkColorFilters.cpp index 63016f0781..30b550bcc0 100644 --- a/src/effects/SkColorFilters.cpp +++ b/src/effects/SkColorFilters.cpp @@ -346,7 +346,7 @@ void ModeColorFilterEffect::onComputeInvariantOutput(GrInvariantOutput* inout) c GR_DEFINE_FRAGMENT_PROCESSOR_TEST(ModeColorFilterEffect); GrFragmentProcessor* ModeColorFilterEffect::TestCreate(SkRandom* rand, GrContext*, - const GrDrawTargetCaps&, + const GrCaps&, GrTexture*[]) { SkXfermode::Mode mode = SkXfermode::kDst_Mode; while (SkXfermode::kDst_Mode == mode) { diff --git a/src/effects/SkColorMatrixFilter.cpp b/src/effects/SkColorMatrixFilter.cpp index 58f074c9aa..6e9da61e1b 100644 --- a/src/effects/SkColorMatrixFilter.cpp +++ b/src/effects/SkColorMatrixFilter.cpp @@ -547,7 +547,7 @@ GR_DEFINE_FRAGMENT_PROCESSOR_TEST(ColorMatrixEffect); GrFragmentProcessor* ColorMatrixEffect::TestCreate(SkRandom* random, GrContext*, - const GrDrawTargetCaps&, + const GrCaps&, GrTexture* dummyTextures[2]) { SkColorMatrix colorMatrix; for (size_t i = 0; i < SK_ARRAY_COUNT(colorMatrix.fMat); ++i) { diff --git a/src/effects/SkDisplacementMapEffect.cpp b/src/effects/SkDisplacementMapEffect.cpp index 2b9665c2c8..23202e2c3f 100644 --- a/src/effects/SkDisplacementMapEffect.cpp +++ b/src/effects/SkDisplacementMapEffect.cpp @@ -517,7 +517,7 @@ GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrDisplacementMapEffect); GrFragmentProcessor* GrDisplacementMapEffect::TestCreate(SkRandom* random, GrContext*, - const GrDrawTargetCaps&, + const GrCaps&, GrTexture* textures[]) { int texIdxDispl = random->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx : GrProcessorUnitTest::kAlphaTextureIdx; diff --git a/src/effects/SkLightingImageFilter.cpp b/src/effects/SkLightingImageFilter.cpp index b324cc46d1..d281da400b 100644 --- a/src/effects/SkLightingImageFilter.cpp +++ b/src/effects/SkLightingImageFilter.cpp @@ -1589,7 +1589,7 @@ GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrDiffuseLightingEffect); GrFragmentProcessor* GrDiffuseLightingEffect::TestCreate(SkRandom* random, GrContext* context, - const GrDrawTargetCaps&, + const GrCaps&, GrTexture* textures[]) { SkScalar surfaceScale = random->nextSScalar1(); SkScalar kd = random->nextUScalar1(); @@ -1797,7 +1797,7 @@ GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrSpecularLightingEffect); GrFragmentProcessor* GrSpecularLightingEffect::TestCreate(SkRandom* random, GrContext* context, - const GrDrawTargetCaps&, + const GrCaps&, GrTexture* textures[]) { SkScalar surfaceScale = random->nextSScalar1(); SkScalar ks = random->nextUScalar1(); diff --git a/src/effects/SkMagnifierImageFilter.cpp b/src/effects/SkMagnifierImageFilter.cpp index 48fad8ee79..40ff14c801 100644 --- a/src/effects/SkMagnifierImageFilter.cpp +++ b/src/effects/SkMagnifierImageFilter.cpp @@ -210,7 +210,7 @@ GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrMagnifierEffect); GrFragmentProcessor* GrMagnifierEffect::TestCreate(SkRandom* random, GrContext* context, - const GrDrawTargetCaps&, + const GrCaps&, GrTexture** textures) { GrTexture* texture = textures[0]; const int kMaxWidth = 200; diff --git a/src/effects/SkMorphologyImageFilter.cpp b/src/effects/SkMorphologyImageFilter.cpp index 9ecf0c2266..f4bcaf42c0 100644 --- a/src/effects/SkMorphologyImageFilter.cpp +++ b/src/effects/SkMorphologyImageFilter.cpp @@ -544,7 +544,7 @@ GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrMorphologyEffect); GrFragmentProcessor* GrMorphologyEffect::TestCreate(SkRandom* random, GrContext*, - const GrDrawTargetCaps&, + const GrCaps&, GrTexture* textures[]) { int texIdx = random->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx : GrProcessorUnitTest::kAlphaTextureIdx; diff --git a/src/effects/SkPerlinNoiseShader.cpp b/src/effects/SkPerlinNoiseShader.cpp index c59bd8c120..7185b4dafe 100644 --- a/src/effects/SkPerlinNoiseShader.cpp +++ b/src/effects/SkPerlinNoiseShader.cpp @@ -602,7 +602,7 @@ GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrPerlinNoiseEffect); GrFragmentProcessor* GrPerlinNoiseEffect::TestCreate(SkRandom* random, GrContext* context, - const GrDrawTargetCaps&, + const GrCaps&, GrTexture**) { int numOctaves = random->nextRangeU(2, 10); bool stitchTiles = random->nextBool(); diff --git a/src/effects/SkTableColorFilter.cpp b/src/effects/SkTableColorFilter.cpp index 7298960a08..787126807e 100644 --- a/src/effects/SkTableColorFilter.cpp +++ b/src/effects/SkTableColorFilter.cpp @@ -551,7 +551,7 @@ GR_DEFINE_FRAGMENT_PROCESSOR_TEST(ColorTableEffect); GrFragmentProcessor* ColorTableEffect::TestCreate(SkRandom* random, GrContext* context, - const GrDrawTargetCaps&, + const GrCaps&, GrTexture* textures[]) { int flags = 0; uint8_t luts[256][4]; diff --git a/src/effects/gradients/SkLinearGradient.cpp b/src/effects/gradients/SkLinearGradient.cpp index da4c20d113..6457630f6c 100644 --- a/src/effects/gradients/SkLinearGradient.cpp +++ b/src/effects/gradients/SkLinearGradient.cpp @@ -527,7 +527,7 @@ GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrLinearGradient); GrFragmentProcessor* GrLinearGradient::TestCreate(SkRandom* random, GrContext* context, - const GrDrawTargetCaps&, + const GrCaps&, GrTexture**) { SkPoint points[] = {{random->nextUScalar1(), random->nextUScalar1()}, {random->nextUScalar1(), random->nextUScalar1()}}; diff --git a/src/effects/gradients/SkRadialGradient.cpp b/src/effects/gradients/SkRadialGradient.cpp index bc2d15ab6b..fec180cfa1 100644 --- a/src/effects/gradients/SkRadialGradient.cpp +++ b/src/effects/gradients/SkRadialGradient.cpp @@ -501,7 +501,7 @@ GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrRadialGradient); GrFragmentProcessor* GrRadialGradient::TestCreate(SkRandom* random, GrContext* context, - const GrDrawTargetCaps&, + const GrCaps&, GrTexture**) { SkPoint center = {random->nextUScalar1(), random->nextUScalar1()}; SkScalar radius = random->nextUScalar1(); diff --git a/src/effects/gradients/SkSweepGradient.cpp b/src/effects/gradients/SkSweepGradient.cpp index 03b41a420b..686d87742e 100644 --- a/src/effects/gradients/SkSweepGradient.cpp +++ b/src/effects/gradients/SkSweepGradient.cpp @@ -246,7 +246,7 @@ GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrSweepGradient); GrFragmentProcessor* GrSweepGradient::TestCreate(SkRandom* random, GrContext* context, - const GrDrawTargetCaps&, + const GrCaps&, GrTexture**) { SkPoint center = {random->nextUScalar1(), random->nextUScalar1()}; diff --git a/src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp b/src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp index f7b3eb89b2..3f511ed2af 100644 --- a/src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp +++ b/src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp @@ -186,7 +186,7 @@ GR_DEFINE_FRAGMENT_PROCESSOR_TEST(Edge2PtConicalEffect); */ GrFragmentProcessor* Edge2PtConicalEffect::TestCreate(SkRandom* random, GrContext* context, - const GrDrawTargetCaps&, + const GrCaps&, GrTexture**) { SkPoint center1 = {random->nextUScalar1(), random->nextUScalar1()}; SkScalar radius1 = random->nextUScalar1(); @@ -475,7 +475,7 @@ GR_DEFINE_FRAGMENT_PROCESSOR_TEST(FocalOutside2PtConicalEffect); */ GrFragmentProcessor* FocalOutside2PtConicalEffect::TestCreate(SkRandom* random, GrContext* context, - const GrDrawTargetCaps&, + const GrCaps&, GrTexture**) { SkPoint center1 = {random->nextUScalar1(), random->nextUScalar1()}; SkScalar radius1 = 0.f; @@ -694,7 +694,7 @@ GR_DEFINE_FRAGMENT_PROCESSOR_TEST(FocalInside2PtConicalEffect); */ GrFragmentProcessor* FocalInside2PtConicalEffect::TestCreate(SkRandom* random, GrContext* context, - const GrDrawTargetCaps&, + const GrCaps&, GrTexture**) { SkPoint center1 = {random->nextUScalar1(), random->nextUScalar1()}; SkScalar radius1 = 0.f; @@ -950,7 +950,7 @@ GR_DEFINE_FRAGMENT_PROCESSOR_TEST(CircleInside2PtConicalEffect); */ GrFragmentProcessor* CircleInside2PtConicalEffect::TestCreate(SkRandom* random, GrContext* context, - const GrDrawTargetCaps&, + const GrCaps&, GrTexture**) { SkPoint center1 = {random->nextUScalar1(), random->nextUScalar1()}; SkScalar radius1 = random->nextUScalar1() + 0.0001f; // make sure radius1 != 0 @@ -1189,7 +1189,7 @@ GR_DEFINE_FRAGMENT_PROCESSOR_TEST(CircleOutside2PtConicalEffect); */ GrFragmentProcessor* CircleOutside2PtConicalEffect::TestCreate(SkRandom* random, GrContext* context, - const GrDrawTargetCaps&, + const GrCaps&, GrTexture**) { SkPoint center1 = {random->nextUScalar1(), random->nextUScalar1()}; SkScalar radius1 = random->nextUScalar1() + 0.0001f; // make sure radius1 != 0 diff --git a/src/gpu/GrAAConvexPathRenderer.cpp b/src/gpu/GrAAConvexPathRenderer.cpp index 1b7efefd07..dbf2979aac 100644 --- a/src/gpu/GrAAConvexPathRenderer.cpp +++ b/src/gpu/GrAAConvexPathRenderer.cpp @@ -669,7 +669,7 @@ GR_DEFINE_GEOMETRY_PROCESSOR_TEST(QuadEdgeEffect); GrGeometryProcessor* QuadEdgeEffect::TestCreate(SkRandom* random, GrContext*, - const GrDrawTargetCaps& caps, + const GrCaps& caps, GrTexture*[]) { // Doesn't work without derivative instructions. return caps.shaderCaps()->shaderDerivativeSupport() ? diff --git a/src/gpu/GrBatchTarget.h b/src/gpu/GrBatchTarget.h index 61f12d8169..8d83d2cbd6 100644 --- a/src/gpu/GrBatchTarget.h +++ b/src/gpu/GrBatchTarget.h @@ -104,7 +104,7 @@ public: fInlineUploads.reset(); } - const GrDrawTargetCaps& caps() const { return *fGpu->caps(); } + const GrCaps& caps() const { return *fGpu->caps(); } GrResourceProvider* resourceProvider() const { return fGpu->getContext()->resourceProvider(); } diff --git a/src/gpu/GrBufferAllocPool.cpp b/src/gpu/GrBufferAllocPool.cpp index 878d537d45..b1a87b883e 100644 --- a/src/gpu/GrBufferAllocPool.cpp +++ b/src/gpu/GrBufferAllocPool.cpp @@ -287,7 +287,7 @@ bool GrBufferAllocPool::createBlock(size_t requestSize) { // Otherwise when buffer mapping is supported we map if the buffer size is greater than the // threshold. bool attemptMap = block.fBuffer->isCPUBacked(); - if (!attemptMap && GrDrawTargetCaps::kNone_MapFlags != fGpu->caps()->mapBufferFlags()) { + if (!attemptMap && GrCaps::kNone_MapFlags != fGpu->caps()->mapBufferFlags()) { attemptMap = size > GR_GEOM_BUFFER_MAP_THRESHOLD; } @@ -331,7 +331,7 @@ void GrBufferAllocPool::flushCpuData(const BufferBlock& block, size_t flushSize) SkASSERT(flushSize <= buffer->gpuMemorySize()); VALIDATE(true); - if (GrDrawTargetCaps::kNone_MapFlags != fGpu->caps()->mapBufferFlags() && + if (GrCaps::kNone_MapFlags != fGpu->caps()->mapBufferFlags() && flushSize > GR_GEOM_BUFFER_MAP_THRESHOLD) { void* data = buffer->map(); if (data) { diff --git a/src/gpu/GrCommandBuilder.cpp b/src/gpu/GrCommandBuilder.cpp index 106e78185d..b3f6d7185b 100644 --- a/src/gpu/GrCommandBuilder.cpp +++ b/src/gpu/GrCommandBuilder.cpp @@ -73,7 +73,7 @@ GrTargetCommands::Cmd* GrCommandBuilder::recordCopySurface(GrSurface* dst, GrTargetCommands::Cmd* GrCommandBuilder::recordXferBarrierIfNecessary(const GrPipeline& pipeline, - const GrDrawTargetCaps& caps) { + const GrCaps& caps) { const GrXferProcessor& xp = *pipeline.getXferProcessor(); GrRenderTarget* rt = pipeline.getRenderTarget(); diff --git a/src/gpu/GrCommandBuilder.h b/src/gpu/GrCommandBuilder.h index 90099ee2ef..a94a439dcd 100644 --- a/src/gpu/GrCommandBuilder.h +++ b/src/gpu/GrCommandBuilder.h @@ -57,7 +57,7 @@ public: GrSurface* src, const SkIRect& srcRect, const SkIPoint& dstPoint); - virtual Cmd* recordXferBarrierIfNecessary(const GrPipeline&, const GrDrawTargetCaps&); + virtual Cmd* recordXferBarrierIfNecessary(const GrPipeline&, const GrCaps&); protected: typedef GrTargetCommands::DrawBatch DrawBatch; diff --git a/src/gpu/GrDefaultGeoProcFactory.cpp b/src/gpu/GrDefaultGeoProcFactory.cpp index 59e9dcda27..5534888f2c 100644 --- a/src/gpu/GrDefaultGeoProcFactory.cpp +++ b/src/gpu/GrDefaultGeoProcFactory.cpp @@ -229,7 +229,7 @@ GR_DEFINE_GEOMETRY_PROCESSOR_TEST(DefaultGeoProc); GrGeometryProcessor* DefaultGeoProc::TestCreate(SkRandom* random, GrContext*, - const GrDrawTargetCaps& caps, + const GrCaps& caps, GrTexture*[]) { uint32_t flags = 0; if (random->nextBool()) { diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp index 549ab374c8..2d80bcc8c3 100644 --- a/src/gpu/GrDrawTarget.cpp +++ b/src/gpu/GrDrawTarget.cpp @@ -613,7 +613,7 @@ SkString GrShaderCaps::dump() const { /////////////////////////////////////////////////////////////////////////////// -void GrDrawTargetCaps::reset() { +void GrCaps::reset() { fMipMapSupport = false; fNPOTTextureTileSupport = false; fTwoSidedStencilSupport = false; @@ -638,7 +638,7 @@ void GrDrawTargetCaps::reset() { memset(fConfigTextureSupport, 0, sizeof(fConfigTextureSupport)); } -GrDrawTargetCaps& GrDrawTargetCaps::operator=(const GrDrawTargetCaps& other) { +GrCaps& GrCaps::operator=(const GrCaps& other) { fMipMapSupport = other.fMipMapSupport; fNPOTTextureTileSupport = other.fNPOTTextureTileSupport; fTwoSidedStencilSupport = other.fTwoSidedStencilSupport; @@ -667,25 +667,25 @@ GrDrawTargetCaps& GrDrawTargetCaps::operator=(const GrDrawTargetCaps& other) { static SkString map_flags_to_string(uint32_t flags) { SkString str; - if (GrDrawTargetCaps::kNone_MapFlags == flags) { + if (GrCaps::kNone_MapFlags == flags) { str = "none"; } else { - SkASSERT(GrDrawTargetCaps::kCanMap_MapFlag & flags); - SkDEBUGCODE(flags &= ~GrDrawTargetCaps::kCanMap_MapFlag); + SkASSERT(GrCaps::kCanMap_MapFlag & flags); + SkDEBUGCODE(flags &= ~GrCaps::kCanMap_MapFlag); str = "can_map"; - if (GrDrawTargetCaps::kSubset_MapFlag & flags) { + if (GrCaps::kSubset_MapFlag & flags) { str.append(" partial"); } else { str.append(" full"); } - SkDEBUGCODE(flags &= ~GrDrawTargetCaps::kSubset_MapFlag); + SkDEBUGCODE(flags &= ~GrCaps::kSubset_MapFlag); } SkASSERT(0 == flags); // Make sure we handled all the flags. return str; } -SkString GrDrawTargetCaps::dump() const { +SkString GrCaps::dump() const { SkString r; static const char* gNY[] = {"NO", "YES"}; r.appendf("MIP Map Support : %s\n", gNY[fMipMapSupport]); diff --git a/src/gpu/GrDrawTarget.h b/src/gpu/GrDrawTarget.h index 84f7eb2197..e0b96b2a3b 100644 --- a/src/gpu/GrDrawTarget.h +++ b/src/gpu/GrDrawTarget.h @@ -29,7 +29,7 @@ #include "SkXfermode.h" class GrClip; -class GrDrawTargetCaps; +class GrCaps; class GrPath; class GrPathRange; class GrPipeline; @@ -63,7 +63,7 @@ public: /** * Gets the capabilities of the draw target. */ - const GrDrawTargetCaps* caps() const { return fCaps.get(); } + const GrCaps* caps() const { return fCaps.get(); } void drawBatch(GrPipelineBuilder*, GrBatch*); @@ -325,7 +325,7 @@ private: // The context owns us, not vice-versa, so this ptr is not ref'ed by DrawTarget. GrContext* fContext; - SkAutoTUnref<const GrDrawTargetCaps> fCaps; + SkAutoTUnref<const GrCaps> fCaps; // To keep track that we always have at least as many debug marker adds as removes int fGpuTraceMarkerCount; GrTraceMarkerSet fActiveTraceMarkers; diff --git a/src/gpu/GrDrawTargetCaps.h b/src/gpu/GrDrawTargetCaps.h index 086b61579a..c1b7381cc2 100644 --- a/src/gpu/GrDrawTargetCaps.h +++ b/src/gpu/GrDrawTargetCaps.h @@ -5,8 +5,8 @@ * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ -#ifndef GrDrawTargetCaps_DEFINED -#define GrDrawTargetCaps_DEFINED +#ifndef GrCaps_DEFINED +#define GrCaps_DEFINED #include "GrTypes.h" #include "GrTypesPriv.h" @@ -103,21 +103,21 @@ private: }; /** - * Represents the draw target capabilities. + * Represents the capabilities of a GrContext. */ -class GrDrawTargetCaps : public SkRefCnt { +class GrCaps : public SkRefCnt { public: - SK_DECLARE_INST_COUNT(GrDrawTargetCaps) + SK_DECLARE_INST_COUNT(GrCaps) - GrDrawTargetCaps() { + GrCaps() { fShaderCaps.reset(NULL); this->reset(); } - GrDrawTargetCaps(const GrDrawTargetCaps& other) : INHERITED() { + GrCaps(const GrCaps& other) : INHERITED() { *this = other; } - virtual ~GrDrawTargetCaps() {} - GrDrawTargetCaps& operator= (const GrDrawTargetCaps&); + virtual ~GrCaps() {} + GrCaps& operator= (const GrCaps&); virtual void reset(); virtual SkString dump() const; diff --git a/src/gpu/GrGpu.h b/src/gpu/GrGpu.h index f2ad10f417..6e8dc43f75 100644 --- a/src/gpu/GrGpu.h +++ b/src/gpu/GrGpu.h @@ -44,7 +44,7 @@ public: /** * Gets the capabilities of the draw target. */ - const GrDrawTargetCaps* caps() const { return fCaps.get(); } + const GrCaps* caps() const { return fCaps.get(); } GrPathRendering* pathRendering() { return fPathRendering.get(); } @@ -66,7 +66,7 @@ public: * Creates a texture object. If kRenderTarget_GrSurfaceFlag the texture can * be used as a render target by calling GrTexture::asRenderTarget(). Not all * pixel configs can be used as render targets. Support for configs as textures - * or render targets can be checked using GrDrawTargetCaps. + * or render targets can be checked using GrCaps. * * @param desc describes the texture to be created. * @param budgeted does this texture count against the resource cache budget? @@ -403,7 +403,7 @@ protected: Stats fStats; SkAutoTDelete<GrPathRendering> fPathRendering; // Subclass must initialize this in its constructor. - SkAutoTUnref<const GrDrawTargetCaps> fCaps; + SkAutoTUnref<const GrCaps> fCaps; private: // called when the 3D context state is unknown. Subclass should emit any diff --git a/src/gpu/GrOvalRenderer.cpp b/src/gpu/GrOvalRenderer.cpp index 69baebb228..fe223f0382 100644 --- a/src/gpu/GrOvalRenderer.cpp +++ b/src/gpu/GrOvalRenderer.cpp @@ -205,7 +205,7 @@ GR_DEFINE_GEOMETRY_PROCESSOR_TEST(CircleEdgeEffect); GrGeometryProcessor* CircleEdgeEffect::TestCreate(SkRandom* random, GrContext* context, - const GrDrawTargetCaps&, + const GrCaps&, GrTexture* textures[]) { return CircleEdgeEffect::Create(GrRandomColor(random), random->nextBool(), @@ -387,7 +387,7 @@ GR_DEFINE_GEOMETRY_PROCESSOR_TEST(EllipseEdgeEffect); GrGeometryProcessor* EllipseEdgeEffect::TestCreate(SkRandom* random, GrContext* context, - const GrDrawTargetCaps&, + const GrCaps&, GrTexture* textures[]) { return EllipseEdgeEffect::Create(GrRandomColor(random), random->nextBool(), @@ -581,7 +581,7 @@ GR_DEFINE_GEOMETRY_PROCESSOR_TEST(DIEllipseEdgeEffect); GrGeometryProcessor* DIEllipseEdgeEffect::TestCreate(SkRandom* random, GrContext* context, - const GrDrawTargetCaps&, + const GrCaps&, GrTexture* textures[]) { return DIEllipseEdgeEffect::Create(GrRandomColor(random), GrTest::TestMatrix(random), diff --git a/src/gpu/GrPipeline.cpp b/src/gpu/GrPipeline.cpp index 551882f971..5feac78fc9 100644 --- a/src/gpu/GrPipeline.cpp +++ b/src/gpu/GrPipeline.cpp @@ -17,7 +17,7 @@ GrPipeline::GrPipeline(const GrPipelineBuilder& pipelineBuilder, const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI, - const GrDrawTargetCaps& caps, + const GrCaps& caps, const GrScissorState& scissorState, const GrDeviceCoordTexture* dstCopy) { // Create XferProcessor from DS's XPFactory diff --git a/src/gpu/GrPipeline.h b/src/gpu/GrPipeline.h index fdba0d764c..a85ae67135 100644 --- a/src/gpu/GrPipeline.h +++ b/src/gpu/GrPipeline.h @@ -32,7 +32,7 @@ public: GrPipeline(const GrPipelineBuilder&, const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI, - const GrDrawTargetCaps&, + const GrCaps&, const GrScissorState&, const GrDeviceCoordTexture* dstCopy); @@ -115,7 +115,7 @@ private: * blend coeffs will represent those used by backend API. */ void setOutputStateInfo(const GrPipelineBuilder& ds, GrXferProcessor::OptFlags, - const GrDrawTargetCaps&); + const GrCaps&); enum Flags { kDither_Flag = 0x1, diff --git a/src/gpu/GrPipelineBuilder.cpp b/src/gpu/GrPipelineBuilder.cpp index 3b722e2b1d..3e9f330d07 100644 --- a/src/gpu/GrPipelineBuilder.cpp +++ b/src/gpu/GrPipelineBuilder.cpp @@ -86,7 +86,7 @@ void GrPipelineBuilder::setFromPaint(const GrPaint& paint, GrRenderTarget* rt, c //////////////////////////////////////////////////////////////////////////////s -bool GrPipelineBuilder::willXPNeedDstCopy(const GrDrawTargetCaps& caps, +bool GrPipelineBuilder::willXPNeedDstCopy(const GrCaps& caps, const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI) const { return this->getXPFactory()->willNeedDstCopy(caps, colorPOI, coveragePOI); diff --git a/src/gpu/GrPipelineBuilder.h b/src/gpu/GrPipelineBuilder.h index fa085f0b99..b48a1b4b1f 100644 --- a/src/gpu/GrPipelineBuilder.h +++ b/src/gpu/GrPipelineBuilder.h @@ -24,7 +24,7 @@ #include "effects/GrSimpleTextureEffect.h" class GrBatch; -class GrDrawTargetCaps; +class GrCaps; class GrPaint; class GrTexture; @@ -179,7 +179,7 @@ public: /** * Checks whether the xp will need a copy of the destination to correctly blend. */ - bool willXPNeedDstCopy(const GrDrawTargetCaps& caps, const GrProcOptInfo& colorPOI, + bool willXPNeedDstCopy(const GrCaps& caps, const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI) const; /// @} diff --git a/src/gpu/GrSWMaskHelper.cpp b/src/gpu/GrSWMaskHelper.cpp index 510b85acb8..223f62fd95 100644 --- a/src/gpu/GrSWMaskHelper.cpp +++ b/src/gpu/GrSWMaskHelper.cpp @@ -67,7 +67,7 @@ static inline GrPixelConfig fmt_to_config(SkTextureCompressor::Format fmt) { return config; } -static bool choose_compressed_fmt(const GrDrawTargetCaps* caps, +static bool choose_compressed_fmt(const GrCaps* caps, SkTextureCompressor::Format *fmt) { if (NULL == fmt) { return false; diff --git a/src/gpu/GrTest.cpp b/src/gpu/GrTest.cpp index 0b3d030cdb..0801d03a6c 100644 --- a/src/gpu/GrTest.cpp +++ b/src/gpu/GrTest.cpp @@ -138,7 +138,7 @@ class GrPipeline; class MockGpu : public GrGpu { public: - MockGpu(GrContext* context) : INHERITED(context) { fCaps.reset(SkNEW(GrDrawTargetCaps)); } + MockGpu(GrContext* context) : INHERITED(context) { fCaps.reset(SkNEW(GrCaps)); } ~MockGpu() override {} bool canWriteTexturePixels(const GrTexture*, GrPixelConfig srcConfig) const override { return true; diff --git a/src/gpu/GrXferProcessor.cpp b/src/gpu/GrXferProcessor.cpp index 8eb6ff77c4..343a05eaae 100644 --- a/src/gpu/GrXferProcessor.cpp +++ b/src/gpu/GrXferProcessor.cpp @@ -28,7 +28,7 @@ GrXferProcessor::OptFlags GrXferProcessor::getOptimizations(const GrProcOptInfo& const GrProcOptInfo& coveragePOI, bool doesStencilWrite, GrColor* overrideColor, - const GrDrawTargetCaps& caps) { + const GrCaps& caps) { GrXferProcessor::OptFlags flags = this->onGetOptimizations(colorPOI, coveragePOI, doesStencilWrite, @@ -52,7 +52,7 @@ void GrXferProcessor::getGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBu } bool GrXferProcessor::willNeedXferBarrier(const GrRenderTarget* rt, - const GrDrawTargetCaps& caps, + const GrCaps& caps, GrXferBarrierType* outBarrierType) const { if (static_cast<const GrSurface*>(rt) == this->getDstCopyTexture()) { // Texture barriers are required when a shader reads and renders to the same texture. @@ -163,7 +163,7 @@ SkString GrXferProcessor::BlendInfo::dump() const { GrXferProcessor* GrXPFactory::createXferProcessor(const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI, const GrDeviceCoordTexture* dstCopy, - const GrDrawTargetCaps& caps) const { + const GrCaps& caps) const { #ifdef SK_DEBUG if (this->willReadDstColor(caps, colorPOI, coveragePOI)) { if (!caps.shaderCaps()->dstReadInShaderSupport()) { @@ -178,7 +178,7 @@ GrXferProcessor* GrXPFactory::createXferProcessor(const GrProcOptInfo& colorPOI, return this->onCreateXferProcessor(caps, colorPOI, coveragePOI, dstCopy); } -bool GrXPFactory::willNeedDstCopy(const GrDrawTargetCaps& caps, const GrProcOptInfo& colorPOI, +bool GrXPFactory::willNeedDstCopy(const GrCaps& caps, const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI) const { return (this->willReadDstColor(caps, colorPOI, coveragePOI) && !caps.shaderCaps()->dstReadInShaderSupport()); diff --git a/src/gpu/effects/GrBezierEffect.cpp b/src/gpu/effects/GrBezierEffect.cpp index 8d1b0dbd7a..582558027a 100644 --- a/src/gpu/effects/GrBezierEffect.cpp +++ b/src/gpu/effects/GrBezierEffect.cpp @@ -211,7 +211,7 @@ GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrConicEffect); GrGeometryProcessor* GrConicEffect::TestCreate(SkRandom* random, GrContext*, - const GrDrawTargetCaps& caps, + const GrCaps& caps, GrTexture*[]) { GrGeometryProcessor* gp; do { @@ -412,7 +412,7 @@ GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrQuadEffect); GrGeometryProcessor* GrQuadEffect::TestCreate(SkRandom* random, GrContext*, - const GrDrawTargetCaps& caps, + const GrCaps& caps, GrTexture*[]) { GrGeometryProcessor* gp; do { @@ -625,7 +625,7 @@ GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrCubicEffect); GrGeometryProcessor* GrCubicEffect::TestCreate(SkRandom* random, GrContext*, - const GrDrawTargetCaps& caps, + const GrCaps& caps, GrTexture*[]) { GrGeometryProcessor* gp; do { diff --git a/src/gpu/effects/GrBezierEffect.h b/src/gpu/effects/GrBezierEffect.h index 7700c58fe6..d335c7115a 100644 --- a/src/gpu/effects/GrBezierEffect.h +++ b/src/gpu/effects/GrBezierEffect.h @@ -61,7 +61,7 @@ public: static GrGeometryProcessor* Create(GrColor color, const SkMatrix& viewMatrix, const GrPrimitiveEdgeType edgeType, - const GrDrawTargetCaps& caps, + const GrCaps& caps, const SkMatrix& localMatrix, bool usesLocalCoords, uint8_t coverage = 0xff) { @@ -146,7 +146,7 @@ public: static GrGeometryProcessor* Create(GrColor color, const SkMatrix& viewMatrix, const GrPrimitiveEdgeType edgeType, - const GrDrawTargetCaps& caps, + const GrCaps& caps, const SkMatrix& localMatrix, bool usesLocalCoords, uint8_t coverage = 0xff) { @@ -233,7 +233,7 @@ public: static GrGeometryProcessor* Create(GrColor color, const SkMatrix& viewMatrix, const GrPrimitiveEdgeType edgeType, - const GrDrawTargetCaps& caps) { + const GrCaps& caps) { switch (edgeType) { case kFillAA_GrProcessorEdgeType: if (!caps.shaderCaps()->shaderDerivativeSupport()) { diff --git a/src/gpu/effects/GrBicubicEffect.cpp b/src/gpu/effects/GrBicubicEffect.cpp index 917697270e..5d94bd9862 100644 --- a/src/gpu/effects/GrBicubicEffect.cpp +++ b/src/gpu/effects/GrBicubicEffect.cpp @@ -182,7 +182,7 @@ GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrBicubicEffect); GrFragmentProcessor* GrBicubicEffect::TestCreate(SkRandom* random, GrContext* context, - const GrDrawTargetCaps&, + const GrCaps&, GrTexture* textures[]) { int texIdx = random->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx : GrProcessorUnitTest::kAlphaTextureIdx; diff --git a/src/gpu/effects/GrBitmapTextGeoProc.cpp b/src/gpu/effects/GrBitmapTextGeoProc.cpp index ad06792fb5..2e09dd3fcb 100644 --- a/src/gpu/effects/GrBitmapTextGeoProc.cpp +++ b/src/gpu/effects/GrBitmapTextGeoProc.cpp @@ -155,7 +155,7 @@ GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrBitmapTextGeoProc); GrGeometryProcessor* GrBitmapTextGeoProc::TestCreate(SkRandom* random, GrContext*, - const GrDrawTargetCaps&, + const GrCaps&, GrTexture* textures[]) { int texIdx = random->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx : GrProcessorUnitTest::kAlphaTextureIdx; diff --git a/src/gpu/effects/GrConfigConversionEffect.cpp b/src/gpu/effects/GrConfigConversionEffect.cpp index 8b75a884c0..9a6f9fcd9b 100644 --- a/src/gpu/effects/GrConfigConversionEffect.cpp +++ b/src/gpu/effects/GrConfigConversionEffect.cpp @@ -129,7 +129,7 @@ GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrConfigConversionEffect); GrFragmentProcessor* GrConfigConversionEffect::TestCreate(SkRandom* random, GrContext*, - const GrDrawTargetCaps&, + const GrCaps&, GrTexture* textures[]) { PMConversion pmConv = static_cast<PMConversion>(random->nextULessThan(kPMConversionCnt)); bool swapRB; diff --git a/src/gpu/effects/GrConstColorProcessor.cpp b/src/gpu/effects/GrConstColorProcessor.cpp index ab703fdd90..5f8ad383c5 100644 --- a/src/gpu/effects/GrConstColorProcessor.cpp +++ b/src/gpu/effects/GrConstColorProcessor.cpp @@ -107,7 +107,7 @@ GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrConstColorProcessor); GrFragmentProcessor* GrConstColorProcessor::TestCreate(SkRandom* random, GrContext*, - const GrDrawTargetCaps&, + const GrCaps&, GrTexture*[]) { GrColor color; int colorPicker = random->nextULessThan(3); diff --git a/src/gpu/effects/GrConvexPolyEffect.cpp b/src/gpu/effects/GrConvexPolyEffect.cpp index 2ad4ce04e5..0cef3fa8d6 100644 --- a/src/gpu/effects/GrConvexPolyEffect.cpp +++ b/src/gpu/effects/GrConvexPolyEffect.cpp @@ -63,7 +63,7 @@ GR_DEFINE_FRAGMENT_PROCESSOR_TEST(AARectEffect); GrFragmentProcessor* AARectEffect::TestCreate(SkRandom* random, GrContext*, - const GrDrawTargetCaps& caps, + const GrCaps& caps, GrTexture*[]) { SkRect rect = SkRect::MakeLTRB(random->nextSScalar1(), random->nextSScalar1(), @@ -363,7 +363,7 @@ GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrConvexPolyEffect); GrFragmentProcessor* GrConvexPolyEffect::TestCreate(SkRandom* random, GrContext*, - const GrDrawTargetCaps& caps, + const GrCaps& caps, GrTexture*[]) { int count = random->nextULessThan(kMaxEdges) + 1; SkScalar edges[kMaxEdges * 3]; diff --git a/src/gpu/effects/GrConvolutionEffect.cpp b/src/gpu/effects/GrConvolutionEffect.cpp index 3d96a00e9d..4124d5b97d 100644 --- a/src/gpu/effects/GrConvolutionEffect.cpp +++ b/src/gpu/effects/GrConvolutionEffect.cpp @@ -220,7 +220,7 @@ GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrConvolutionEffect); GrFragmentProcessor* GrConvolutionEffect::TestCreate(SkRandom* random, GrContext*, - const GrDrawTargetCaps&, + const GrCaps&, GrTexture* textures[]) { int texIdx = random->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx : GrProcessorUnitTest::kAlphaTextureIdx; diff --git a/src/gpu/effects/GrCoverageSetOpXP.cpp b/src/gpu/effects/GrCoverageSetOpXP.cpp index 02552b3bae..8c4f0bcd5f 100644 --- a/src/gpu/effects/GrCoverageSetOpXP.cpp +++ b/src/gpu/effects/GrCoverageSetOpXP.cpp @@ -38,7 +38,7 @@ private: const GrProcOptInfo& coveragePOI, bool doesStencilWrite, GrColor* color, - const GrDrawTargetCaps& caps) override; + const GrCaps& caps) override; void onGetGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override; @@ -112,7 +112,7 @@ CoverageSetOpXP::onGetOptimizations(const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI, bool doesStencilWrite, GrColor* color, - const GrDrawTargetCaps& caps) { + const GrCaps& caps) { // We never look at the color input return GrXferProcessor::kIgnoreColor_OptFlag; } @@ -223,7 +223,7 @@ GrXPFactory* GrCoverageSetOpXPFactory::Create(SkRegion::Op regionOp, bool invert } GrXferProcessor* -GrCoverageSetOpXPFactory::onCreateXferProcessor(const GrDrawTargetCaps& caps, +GrCoverageSetOpXPFactory::onCreateXferProcessor(const GrCaps& caps, const GrProcOptInfo& colorPOI, const GrProcOptInfo& covPOI, const GrDeviceCoordTexture* dstCopy) const { @@ -252,7 +252,7 @@ GR_DEFINE_XP_FACTORY_TEST(GrCoverageSetOpXPFactory); GrXPFactory* GrCoverageSetOpXPFactory::TestCreate(SkRandom* random, GrContext*, - const GrDrawTargetCaps&, + const GrCaps&, GrTexture*[]) { SkRegion::Op regionOp = SkRegion::Op(random->nextULessThan(SkRegion::kLastOp + 1)); bool invertCoverage = random->nextBool(); diff --git a/src/gpu/effects/GrCustomXfermode.cpp b/src/gpu/effects/GrCustomXfermode.cpp index 1fdd3b781f..e716ea5dce 100644 --- a/src/gpu/effects/GrCustomXfermode.cpp +++ b/src/gpu/effects/GrCustomXfermode.cpp @@ -495,7 +495,7 @@ void GrCustomXferFP::onComputeInvariantOutput(GrInvariantOutput* inout) const { GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrCustomXferFP); GrFragmentProcessor* GrCustomXferFP::TestCreate(SkRandom* rand, GrContext*, - const GrDrawTargetCaps&, + const GrCaps&, GrTexture* textures[]) { int mode = rand->nextRangeU(SkXfermode::kLastCoeffMode + 1, SkXfermode::kLastSeparableMode); @@ -540,12 +540,12 @@ private: const GrProcOptInfo& coveragePOI, bool doesStencilWrite, GrColor* overrideColor, - const GrDrawTargetCaps& caps) override; + const GrCaps& caps) override; void onGetGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override; bool onWillNeedXferBarrier(const GrRenderTarget* rt, - const GrDrawTargetCaps& caps, + const GrCaps& caps, GrXferBarrierType* outBarrierType) const override; void onGetBlendInfo(BlendInfo*) const override; @@ -652,7 +652,7 @@ GrXferProcessor::OptFlags CustomXP::onGetOptimizations(const GrProcOptInfo& colo const GrProcOptInfo& coveragePOI, bool doesStencilWrite, GrColor* overrideColor, - const GrDrawTargetCaps& caps) { + const GrCaps& caps) { /* Most the optimizations we do here are based on tweaking alpha for coverage. @@ -764,7 +764,7 @@ GrXferProcessor::OptFlags CustomXP::onGetOptimizations(const GrProcOptInfo& colo } bool CustomXP::onWillNeedXferBarrier(const GrRenderTarget* rt, - const GrDrawTargetCaps& caps, + const GrCaps& caps, GrXferBarrierType* outBarrierType) const { if (this->hasHWBlendEquation() && !caps.advancedCoherentBlendEquationSupport()) { *outBarrierType = kBlend_GrXferBarrierType; @@ -787,14 +787,14 @@ GrCustomXPFactory::GrCustomXPFactory(SkXfermode::Mode mode) } GrXferProcessor* -GrCustomXPFactory::onCreateXferProcessor(const GrDrawTargetCaps& caps, +GrCustomXPFactory::onCreateXferProcessor(const GrCaps& caps, const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI, const GrDeviceCoordTexture* dstCopy) const { return CustomXP::Create(fMode, dstCopy, this->willReadDstColor(caps, colorPOI, coveragePOI)); } -bool GrCustomXPFactory::willReadDstColor(const GrDrawTargetCaps& caps, +bool GrCustomXPFactory::willReadDstColor(const GrCaps& caps, const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI) const { if (!caps.advancedBlendEquationSupport()) { @@ -818,7 +818,7 @@ void GrCustomXPFactory::getInvariantOutput(const GrProcOptInfo& colorPOI, GR_DEFINE_XP_FACTORY_TEST(GrCustomXPFactory); GrXPFactory* GrCustomXPFactory::TestCreate(SkRandom* rand, GrContext*, - const GrDrawTargetCaps&, + const GrCaps&, GrTexture*[]) { int mode = rand->nextRangeU(SkXfermode::kLastCoeffMode + 1, SkXfermode::kLastSeparableMode); diff --git a/src/gpu/effects/GrCustomXfermodePriv.h b/src/gpu/effects/GrCustomXfermodePriv.h index 43aaeabc54..295de26a4d 100644 --- a/src/gpu/effects/GrCustomXfermodePriv.h +++ b/src/gpu/effects/GrCustomXfermodePriv.h @@ -68,12 +68,12 @@ public: GrXPFactory::InvariantOutput*) const override; private: - GrXferProcessor* onCreateXferProcessor(const GrDrawTargetCaps& caps, + GrXferProcessor* onCreateXferProcessor(const GrCaps& caps, const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI, const GrDeviceCoordTexture* dstCopy) const override; - bool willReadDstColor(const GrDrawTargetCaps& caps, + bool willReadDstColor(const GrCaps& caps, const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI) const override; diff --git a/src/gpu/effects/GrDashingEffect.cpp b/src/gpu/effects/GrDashingEffect.cpp index 8e942a1dfd..8331fc7046 100644 --- a/src/gpu/effects/GrDashingEffect.cpp +++ b/src/gpu/effects/GrDashingEffect.cpp @@ -961,7 +961,7 @@ GR_DEFINE_GEOMETRY_PROCESSOR_TEST(DashingCircleEffect); GrGeometryProcessor* DashingCircleEffect::TestCreate(SkRandom* random, GrContext*, - const GrDrawTargetCaps& caps, + const GrCaps& caps, GrTexture*[]) { DashAAMode aaMode = static_cast<DashAAMode>(random->nextULessThan(kDashAAModeCount)); return DashingCircleEffect::Create(GrRandomColor(random), @@ -1199,7 +1199,7 @@ GR_DEFINE_GEOMETRY_PROCESSOR_TEST(DashingLineEffect); GrGeometryProcessor* DashingLineEffect::TestCreate(SkRandom* random, GrContext*, - const GrDrawTargetCaps& caps, + const GrCaps& caps, GrTexture*[]) { DashAAMode aaMode = static_cast<DashAAMode>(random->nextULessThan(kDashAAModeCount)); return DashingLineEffect::Create(GrRandomColor(random), diff --git a/src/gpu/effects/GrDisableColorXP.cpp b/src/gpu/effects/GrDisableColorXP.cpp index 9b513f663e..38c8f91c27 100644 --- a/src/gpu/effects/GrDisableColorXP.cpp +++ b/src/gpu/effects/GrDisableColorXP.cpp @@ -36,7 +36,7 @@ private: const GrProcOptInfo& coveragePOI, bool doesStencilWrite, GrColor* color, - const GrDrawTargetCaps& caps) override { + const GrCaps& caps) override { return GrXferProcessor::kIgnoreColor_OptFlag | GrXferProcessor::kIgnoreCoverage_OptFlag; } @@ -100,7 +100,7 @@ GrDisableColorXPFactory::GrDisableColorXPFactory() { } GrXferProcessor* -GrDisableColorXPFactory::onCreateXferProcessor(const GrDrawTargetCaps& caps, +GrDisableColorXPFactory::onCreateXferProcessor(const GrCaps& caps, const GrProcOptInfo& colorPOI, const GrProcOptInfo& covPOI, const GrDeviceCoordTexture* dstCopy) const { @@ -111,7 +111,7 @@ GR_DEFINE_XP_FACTORY_TEST(GrDisableColorXPFactory); GrXPFactory* GrDisableColorXPFactory::TestCreate(SkRandom* random, GrContext*, - const GrDrawTargetCaps&, + const GrCaps&, GrTexture*[]) { return GrDisableColorXPFactory::Create(); } diff --git a/src/gpu/effects/GrDisableColorXP.h b/src/gpu/effects/GrDisableColorXP.h index f5fe4fd6f1..c5ed8f0b8c 100644 --- a/src/gpu/effects/GrDisableColorXP.h +++ b/src/gpu/effects/GrDisableColorXP.h @@ -32,12 +32,12 @@ public: private: GrDisableColorXPFactory(); - GrXferProcessor* onCreateXferProcessor(const GrDrawTargetCaps& caps, + GrXferProcessor* onCreateXferProcessor(const GrCaps& caps, const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI, const GrDeviceCoordTexture* dstCopy) const override; - bool willReadDstColor(const GrDrawTargetCaps& caps, + bool willReadDstColor(const GrCaps& caps, const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI) const override { return false; diff --git a/src/gpu/effects/GrDistanceFieldGeoProc.cpp b/src/gpu/effects/GrDistanceFieldGeoProc.cpp index 09228e505a..1e454a0001 100755 --- a/src/gpu/effects/GrDistanceFieldGeoProc.cpp +++ b/src/gpu/effects/GrDistanceFieldGeoProc.cpp @@ -232,7 +232,7 @@ GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrDistanceFieldA8TextGeoProc); GrGeometryProcessor* GrDistanceFieldA8TextGeoProc::TestCreate(SkRandom* random, GrContext*, - const GrDrawTargetCaps&, + const GrCaps&, GrTexture* textures[]) { int texIdx = random->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx : GrProcessorUnitTest::kAlphaTextureIdx; @@ -446,7 +446,7 @@ GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrDistanceFieldPathGeoProc); GrGeometryProcessor* GrDistanceFieldPathGeoProc::TestCreate(SkRandom* random, GrContext*, - const GrDrawTargetCaps&, + const GrCaps&, GrTexture* textures[]) { int texIdx = random->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx : GrProcessorUnitTest::kAlphaTextureIdx; @@ -698,7 +698,7 @@ GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrDistanceFieldLCDTextGeoProc); GrGeometryProcessor* GrDistanceFieldLCDTextGeoProc::TestCreate(SkRandom* random, GrContext*, - const GrDrawTargetCaps&, + const GrCaps&, GrTexture* textures[]) { int texIdx = random->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx : GrProcessorUnitTest::kAlphaTextureIdx; diff --git a/src/gpu/effects/GrDitherEffect.cpp b/src/gpu/effects/GrDitherEffect.cpp index 85116aee28..2589c3bb1e 100644 --- a/src/gpu/effects/GrDitherEffect.cpp +++ b/src/gpu/effects/GrDitherEffect.cpp @@ -56,7 +56,7 @@ GR_DEFINE_FRAGMENT_PROCESSOR_TEST(DitherEffect); GrFragmentProcessor* DitherEffect::TestCreate(SkRandom*, GrContext*, - const GrDrawTargetCaps&, + const GrCaps&, GrTexture*[]) { return DitherEffect::Create(); } diff --git a/src/gpu/effects/GrMatrixConvolutionEffect.cpp b/src/gpu/effects/GrMatrixConvolutionEffect.cpp index a705f2b043..bb75d54b1a 100644 --- a/src/gpu/effects/GrMatrixConvolutionEffect.cpp +++ b/src/gpu/effects/GrMatrixConvolutionEffect.cpp @@ -239,7 +239,7 @@ GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrMatrixConvolutionEffect); GrFragmentProcessor* GrMatrixConvolutionEffect::TestCreate(SkRandom* random, GrContext* context, - const GrDrawTargetCaps&, + const GrCaps&, GrTexture* textures[]) { int texIdx = random->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx : GrProcessorUnitTest::kAlphaTextureIdx; diff --git a/src/gpu/effects/GrOvalEffect.cpp b/src/gpu/effects/GrOvalEffect.cpp index d387b67f83..5370611ba0 100644 --- a/src/gpu/effects/GrOvalEffect.cpp +++ b/src/gpu/effects/GrOvalEffect.cpp @@ -78,7 +78,7 @@ GR_DEFINE_FRAGMENT_PROCESSOR_TEST(CircleEffect); GrFragmentProcessor* CircleEffect::TestCreate(SkRandom* random, GrContext*, - const GrDrawTargetCaps& caps, + const GrCaps& caps, GrTexture*[]) { SkPoint center; center.fX = random->nextRangeScalar(0.f, 1000.f); @@ -260,7 +260,7 @@ GR_DEFINE_FRAGMENT_PROCESSOR_TEST(EllipseEffect); GrFragmentProcessor* EllipseEffect::TestCreate(SkRandom* random, GrContext*, - const GrDrawTargetCaps& caps, + const GrCaps& caps, GrTexture*[]) { SkPoint center; center.fX = random->nextRangeScalar(0.f, 1000.f); diff --git a/src/gpu/effects/GrPorterDuffXferProcessor.cpp b/src/gpu/effects/GrPorterDuffXferProcessor.cpp index 8b92eba1be..424fbbf36b 100644 --- a/src/gpu/effects/GrPorterDuffXferProcessor.cpp +++ b/src/gpu/effects/GrPorterDuffXferProcessor.cpp @@ -95,7 +95,7 @@ private: const GrProcOptInfo& coveragePOI, bool doesStencilWrite, GrColor* overrideColor, - const GrDrawTargetCaps& caps) override; + const GrCaps& caps) override; void onGetGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override; @@ -126,7 +126,7 @@ private: const GrProcOptInfo& coveragePOI, bool doesStencilWrite); - void calcOutputTypes(GrXferProcessor::OptFlags blendOpts, const GrDrawTargetCaps& caps, + void calcOutputTypes(GrXferProcessor::OptFlags blendOpts, const GrCaps& caps, bool hasSolidCoverage); GrBlendCoeff fSrcBlend; @@ -305,7 +305,7 @@ PorterDuffXferProcessor::onGetOptimizations(const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI, bool doesStencilWrite, GrColor* overrideColor, - const GrDrawTargetCaps& caps) { + const GrCaps& caps) { GrXferProcessor::OptFlags optFlags = this->internalGetOptimizations(colorPOI, coveragePOI, doesStencilWrite); @@ -314,7 +314,7 @@ PorterDuffXferProcessor::onGetOptimizations(const GrProcOptInfo& colorPOI, } void PorterDuffXferProcessor::calcOutputTypes(GrXferProcessor::OptFlags optFlags, - const GrDrawTargetCaps& caps, + const GrCaps& caps, bool hasSolidCoverage) { if (this->willReadDstColor()) { fPrimaryOutputType = kCustom_PrimaryOutputType; @@ -484,7 +484,7 @@ private: const GrProcOptInfo& coveragePOI, bool doesStencilWrite, GrColor* overrideColor, - const GrDrawTargetCaps& caps) override; + const GrCaps& caps) override; void onGetGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override; @@ -575,7 +575,7 @@ PDLCDXferProcessor::onGetOptimizations(const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI, bool doesStencilWrite, GrColor* overrideColor, - const GrDrawTargetCaps& caps) { + const GrCaps& caps) { // We want to force our primary output to be alpha * Coverage, where alpha is the alpha // value of the blend the constant. We should already have valid blend coeff's if we are at // a point where we have RGB coverage. We don't need any color stages since the known color @@ -673,7 +673,7 @@ GrXPFactory* GrPorterDuffXPFactory::Create(SkXfermode::Mode mode) { } GrXferProcessor* -GrPorterDuffXPFactory::onCreateXferProcessor(const GrDrawTargetCaps& caps, +GrPorterDuffXPFactory::onCreateXferProcessor(const GrCaps& caps, const GrProcOptInfo& colorPOI, const GrProcOptInfo& covPOI, const GrDeviceCoordTexture* dstCopy) const { @@ -763,7 +763,7 @@ void GrPorterDuffXPFactory::getInvariantOutput(const GrProcOptInfo& colorPOI, output->fWillBlendWithDst = false; } -bool GrPorterDuffXPFactory::willReadDstColor(const GrDrawTargetCaps& caps, +bool GrPorterDuffXPFactory::willReadDstColor(const GrCaps& caps, const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI) const { // We can always blend correctly if we have dual source blending. @@ -800,7 +800,7 @@ GR_DEFINE_XP_FACTORY_TEST(GrPorterDuffXPFactory); GrXPFactory* GrPorterDuffXPFactory::TestCreate(SkRandom* random, GrContext*, - const GrDrawTargetCaps&, + const GrCaps&, GrTexture*[]) { SkXfermode::Mode mode = SkXfermode::Mode(random->nextULessThan(SkXfermode::kLastCoeffMode)); return GrPorterDuffXPFactory::Create(mode); diff --git a/src/gpu/effects/GrRRectEffect.cpp b/src/gpu/effects/GrRRectEffect.cpp index 9954b63acf..bf297fd7e3 100644 --- a/src/gpu/effects/GrRRectEffect.cpp +++ b/src/gpu/effects/GrRRectEffect.cpp @@ -110,7 +110,7 @@ GR_DEFINE_FRAGMENT_PROCESSOR_TEST(CircularRRectEffect); GrFragmentProcessor* CircularRRectEffect::TestCreate(SkRandom* random, GrContext*, - const GrDrawTargetCaps& caps, + const GrCaps& caps, GrTexture*[]) { SkScalar w = random->nextRangeScalar(20.f, 1000.f); SkScalar h = random->nextRangeScalar(20.f, 1000.f); @@ -447,7 +447,7 @@ GR_DEFINE_FRAGMENT_PROCESSOR_TEST(EllipticalRRectEffect); GrFragmentProcessor* EllipticalRRectEffect::TestCreate(SkRandom* random, GrContext*, - const GrDrawTargetCaps& caps, + const GrCaps& caps, GrTexture*[]) { SkScalar w = random->nextRangeScalar(20.f, 1000.f); SkScalar h = random->nextRangeScalar(20.f, 1000.f); diff --git a/src/gpu/effects/GrSimpleTextureEffect.cpp b/src/gpu/effects/GrSimpleTextureEffect.cpp index e729b1b045..9a5b3a7abb 100644 --- a/src/gpu/effects/GrSimpleTextureEffect.cpp +++ b/src/gpu/effects/GrSimpleTextureEffect.cpp @@ -58,7 +58,7 @@ GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrSimpleTextureEffect); GrFragmentProcessor* GrSimpleTextureEffect::TestCreate(SkRandom* random, GrContext*, - const GrDrawTargetCaps&, + const GrCaps&, GrTexture* textures[]) { int texIdx = random->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx : GrProcessorUnitTest::kAlphaTextureIdx; diff --git a/src/gpu/effects/GrTextureDomain.cpp b/src/gpu/effects/GrTextureDomain.cpp index bd189868e7..7ac3a18996 100644 --- a/src/gpu/effects/GrTextureDomain.cpp +++ b/src/gpu/effects/GrTextureDomain.cpp @@ -288,7 +288,7 @@ GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrTextureDomainEffect); GrFragmentProcessor* GrTextureDomainEffect::TestCreate(SkRandom* random, GrContext*, - const GrDrawTargetCaps&, + const GrCaps&, GrTexture* textures[]) { int texIdx = random->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx : GrProcessorUnitTest::kAlphaTextureIdx; diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp index 368e5366e4..7d9c50d16b 100644 --- a/src/gpu/gl/GrGLCaps.cpp +++ b/src/gpu/gl/GrGLCaps.cpp @@ -55,7 +55,7 @@ void GrGLCaps::reset() { } -GrGLCaps::GrGLCaps(const GrGLCaps& caps) : GrDrawTargetCaps() { +GrGLCaps::GrGLCaps(const GrGLCaps& caps) : GrCaps() { *this = caps; } @@ -256,7 +256,7 @@ bool GrGLCaps::init(const GrGLContextInfo& ctxInfo, const GrGLInterface* gli) { this->initStencilFormats(ctxInfo); /************************************************************************** - * GrDrawTargetCaps fields + * GrCaps fields **************************************************************************/ if (kGL_GrGLStandard == standard) { // we could also look for GL_ATI_separate_stencil extension or diff --git a/src/gpu/gl/GrGLCaps.h b/src/gpu/gl/GrGLCaps.h index 25c7889b97..663cd4be41 100644 --- a/src/gpu/gl/GrGLCaps.h +++ b/src/gpu/gl/GrGLCaps.h @@ -23,7 +23,7 @@ class GrGLSLCaps; * version and the extensions string. It also tracks formats that have passed * the FBO completeness test. */ -class GrGLCaps : public GrDrawTargetCaps { +class GrGLCaps : public GrCaps { public: SK_DECLARE_INST_COUNT(GrGLCaps) @@ -371,7 +371,7 @@ private: }; mutable SkTHashMap<ReadPixelsSupportedFormat, bool> fReadPixelsSupportedCache; - typedef GrDrawTargetCaps INHERITED; + typedef GrCaps INHERITED; }; diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp index 6d97804fc6..df3a5e6684 100644 --- a/src/gpu/gl/GrGLGpu.cpp +++ b/src/gpu/gl/GrGLGpu.cpp @@ -2802,7 +2802,7 @@ void GrGLGpu::xferBarrier(GrRenderTarget* rt, GrXferBarrierType type) { return; } case kBlend_GrXferBarrierType: - SkASSERT(GrDrawTargetCaps::kAdvanced_BlendEquationSupport == + SkASSERT(GrCaps::kAdvanced_BlendEquationSupport == this->caps()->blendEquationSupport()); GL_CALL(BlendBarrier()); return; diff --git a/tests/GLProgramsTest.cpp b/tests/GLProgramsTest.cpp index 7f1f4ec946..90aac8b86d 100644 --- a/tests/GLProgramsTest.cpp +++ b/tests/GLProgramsTest.cpp @@ -94,7 +94,7 @@ GR_DEFINE_FRAGMENT_PROCESSOR_TEST(BigKeyProcessor); GrFragmentProcessor* BigKeyProcessor::TestCreate(SkRandom*, GrContext*, - const GrDrawTargetCaps&, + const GrCaps&, GrTexture*[]) { return BigKeyProcessor::Create(); } @@ -106,7 +106,7 @@ static const int kRenderTargetHeight = 1; static const int kRenderTargetWidth = 1; static GrRenderTarget* random_render_target(GrContext* context, SkRandom* random, - const GrDrawTargetCaps* caps) { + const GrCaps* caps) { // setup render target GrTextureParams params; GrSurfaceDesc texDesc; @@ -135,7 +135,7 @@ static GrRenderTarget* random_render_target(GrContext* context, SkRandom* random return texture ? texture->asRenderTarget() : NULL; } -static void set_random_xpf(GrContext* context, const GrDrawTargetCaps& caps, +static void set_random_xpf(GrContext* context, const GrCaps& caps, GrPipelineBuilder* pipelineBuilder, SkRandom* random, GrTexture* dummyTextures[]) { SkAutoTUnref<const GrXPFactory> xpf( diff --git a/tests/GrDrawTargetTest.cpp b/tests/GrDrawTargetTest.cpp index c032d88bd0..194a901277 100644 --- a/tests/GrDrawTargetTest.cpp +++ b/tests/GrDrawTargetTest.cpp @@ -6,15 +6,15 @@ * found in the LICENSE file. */ +#include "Test.h" #if SK_SUPPORT_GPU #include "GrContext.h" #include "GrContextFactory.h" #include "GrDrawTargetCaps.h" #include "GrGpu.h" -#include "Test.h" -static void test_print(skiatest::Reporter*, const GrDrawTargetCaps* caps) { +static void test_print(skiatest::Reporter*, const GrCaps* caps) { // This used to assert. SkString result = caps->dump(); SkASSERT(!result.isEmpty()); |