rename GrDrawTargetCaps to GrCaps
authorbsalomon <bsalomon@google.com>
Tue, 19 May 2015 16:29:46 +0000 (09:29 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 19 May 2015 16:29:46 +0000 (09:29 -0700)
Review URL: https://codereview.chromium.org/1133123009

65 files changed:
include/gpu/GrProcessorUnitTest.h
include/gpu/GrXferProcessor.h
include/gpu/effects/GrCoverageSetOpXP.h
include/gpu/effects/GrPorterDuffXferProcessor.h
src/effects/SkAlphaThresholdFilter.cpp
src/effects/SkArithmeticMode_gpu.cpp
src/effects/SkArithmeticMode_gpu.h
src/effects/SkBlurMaskFilter.cpp
src/effects/SkColorFilters.cpp
src/effects/SkColorMatrixFilter.cpp
src/effects/SkDisplacementMapEffect.cpp
src/effects/SkLightingImageFilter.cpp
src/effects/SkMagnifierImageFilter.cpp
src/effects/SkMorphologyImageFilter.cpp
src/effects/SkPerlinNoiseShader.cpp
src/effects/SkTableColorFilter.cpp
src/effects/gradients/SkLinearGradient.cpp
src/effects/gradients/SkRadialGradient.cpp
src/effects/gradients/SkSweepGradient.cpp
src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp
src/gpu/GrAAConvexPathRenderer.cpp
src/gpu/GrBatchTarget.h
src/gpu/GrBufferAllocPool.cpp
src/gpu/GrCommandBuilder.cpp
src/gpu/GrCommandBuilder.h
src/gpu/GrDefaultGeoProcFactory.cpp
src/gpu/GrDrawTarget.cpp
src/gpu/GrDrawTarget.h
src/gpu/GrDrawTargetCaps.h
src/gpu/GrGpu.h
src/gpu/GrOvalRenderer.cpp
src/gpu/GrPipeline.cpp
src/gpu/GrPipeline.h
src/gpu/GrPipelineBuilder.cpp
src/gpu/GrPipelineBuilder.h
src/gpu/GrSWMaskHelper.cpp
src/gpu/GrTest.cpp
src/gpu/GrXferProcessor.cpp
src/gpu/effects/GrBezierEffect.cpp
src/gpu/effects/GrBezierEffect.h
src/gpu/effects/GrBicubicEffect.cpp
src/gpu/effects/GrBitmapTextGeoProc.cpp
src/gpu/effects/GrConfigConversionEffect.cpp
src/gpu/effects/GrConstColorProcessor.cpp
src/gpu/effects/GrConvexPolyEffect.cpp
src/gpu/effects/GrConvolutionEffect.cpp
src/gpu/effects/GrCoverageSetOpXP.cpp
src/gpu/effects/GrCustomXfermode.cpp
src/gpu/effects/GrCustomXfermodePriv.h
src/gpu/effects/GrDashingEffect.cpp
src/gpu/effects/GrDisableColorXP.cpp
src/gpu/effects/GrDisableColorXP.h
src/gpu/effects/GrDistanceFieldGeoProc.cpp
src/gpu/effects/GrDitherEffect.cpp
src/gpu/effects/GrMatrixConvolutionEffect.cpp
src/gpu/effects/GrOvalEffect.cpp
src/gpu/effects/GrPorterDuffXferProcessor.cpp
src/gpu/effects/GrRRectEffect.cpp
src/gpu/effects/GrSimpleTextureEffect.cpp
src/gpu/effects/GrTextureDomain.cpp
src/gpu/gl/GrGLCaps.cpp
src/gpu/gl/GrGLCaps.h
src/gpu/gl/GrGLGpu.cpp
tests/GLProgramsTest.cpp
tests/GrDrawTargetTest.cpp

index 5145a49749d029e2bf513686809ae73b3ecb8bdb..13b6fc07564295019950f1bfb7c8d762edebf36d 100644 (file)
@@ -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)
 
index fa9dca211e8fcd24ea0fb81c4c8b743da09a33f8..8458a620feb07805de18c474d7c679408cbad972 100644 (file)
@@ -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;
 
index fcae6d2fc6bbb6623cd2c4580bdd434a9b28e24a..f4224e1cbefe5819b614f55aaa39c8e6e224b47e 100644 (file)
@@ -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;
index d47fc0f8cc9f6c8c33292b7807e711ae1a854443..481b373c10ac6a8170d43469b60a3b768f77b55c 100644 (file)
@@ -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;
 
index 70d195bfbd3253d57277d8b6e0b28b0198e462e4..d4638779a47b06f60027a49a300fa7ed46659c2e 100644 (file)
@@ -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];
index 69c2d7c0fdf25901cc9bd0ec492d268fb83ec5fd..ae0839710c83fd7aa5a803adc3c70cc9fe68fc4b 100644 (file)
@@ -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();
index 9f6953e2381a037f03de2535d844f8c467b599c6..a8e32ab03af8fae66bd5781f1ece9b1940c50d4e 100644 (file)
@@ -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;
index 574a9af2b6e6a4a87efc29cbdf0149224470d4eb..556cb4469daf266a70ba890831f1278c1cc91562 100644 (file)
@@ -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);
index 63016f07814d23875c8d524e195786da035cf00a..30b550bcc00887ae63f8cd63935d8b5bbcf03aef 100644 (file)
@@ -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) {
index 58f074c9aa19f2da9a80e4707e6a7f5e49a54865..6e9da61e1b79b7e620c2ae444c8e8492c6335e3f 100644 (file)
@@ -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) {
index 2b9665c2c8eb4bd76b71d70f7bdbf42ef1c52f8e..23202e2c3f097bb94991ffceec293a20c68dded4 100644 (file)
@@ -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;
index b324cc46d112aab1d6c5c845a2f4db83c27e3fc1..d281da400bc97fefbbb1a75727f6e49fa28cb78f 100644 (file)
@@ -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();
index 48fad8ee79d1c565167fe7b441283e224ee3e33a..40ff14c8013b9bcdc504a2259ce755f437cd6f18 100644 (file)
@@ -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;
index 9ecf0c2266c341768ccec0b508e3e68e4556d44b..f4bcaf42c06d99d4e9f946d43b24819750114b7a 100644 (file)
@@ -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;
index c59bd8c120ee673af9d066a71426b830bcdeacec..7185b4dafed15008ad318325840ee63904521636 100644 (file)
@@ -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();
index 7298960a08618b05f5136c80bf6577e0fdfe63e0..787126807e2ccdcad9a02ac8c484d8676e251fc6 100644 (file)
@@ -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];
index da4c20d1138c290fc5cf4b50dd42f77d03708a79..6457630f6c2943b0d3b38f7632964b65505d30f3 100644 (file)
@@ -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()}};
index bc2d15ab6b5c7b688ac76d6c8820bd0f9d3e3574..fec180cfa10d4328e2e7fd12f411f2a03d3e427d 100644 (file)
@@ -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();
index 03b41a420ba1166f399b2c20c2a3e2adc1f6e7b2..686d87742ed6a25fbc98bf58a5e7b654ef8d0ee9 100644 (file)
@@ -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()};
 
index f7b3eb89b28af3247d65440c5523816a6102a2d8..3f511ed2afe2907c9a9d57faaeb462f3f21f1bf3 100644 (file)
@@ -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
index 1b7efefd07fc3888fd717d0d55fa4f3f4538aa9a..dbf2979aac1acb011405b362b5e3d9f010f8a10a 100644 (file)
@@ -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() ?
index 61f12d81698224443d55237f6a561503753897ba..8d83d2cbd602dc5ceab3895e360142a36c975a96 100644 (file)
@@ -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(); }
 
index 878d537d45833ddeb82e57e7daad9637771e4454..b1a87b883e5c1404c046928e14305c565470deda 100644 (file)
@@ -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) {
index 106e78185d5d613b9e5ed548f0d14db12c3d8259..b3f6d7185b6b219de70ba1a9eb420214b044daea 100644 (file)
@@ -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();
 
index 90099ee2ef973f0dd73b1682842784f65e1f305e..a94a439dcd2ce6aa514b645cef84e57f5077def9 100644 (file)
@@ -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;
index 59e9dcda2766b678ec4fa5ba3a69ee0cd8f6a14b..5534888f2c3cf4a9348fc48202ba0a50d58e8753 100644 (file)
@@ -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()) {
index 549ab374c8f71940f77b5a003a69b575b14c4972..2d80bcc8c3c89cc8fa612c42ce2311da0036a2c2 100644 (file)
@@ -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]);
index 84f7eb2197a4aa736aabba9847b9ba5b08ab5518..e0b96b2a3bfe4ea4a506fc9e64fd53590e8b81f2 100644 (file)
@@ -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;
index 086b61579a82e0dfe418cf0bd8a11f82ae691de5..c1b7381cc20f43a350ac920c0da42859bc062c50 100644 (file)
@@ -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;
index f2ad10f41714c6faf9beb947eed234025b20677e..6e8dc43f75ac9c8faa19aa487468c6b545891997 100644 (file)
@@ -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
index 69baebb22821155b1b311c5388102532112e2036..fe223f0382d7c52eaa1858e9ed9f0c91e10ff358 100644 (file)
@@ -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),
index 551882f971c83281ffa440389a8d457365460d6f..5feac78fc9b50009d42444b1daf32de662d1dc5d 100644 (file)
@@ -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
index fdba0d764c91a96c8709c31d62e106e772aa970c..a85ae67135ee630dc3f641ce9213a03ed60ceac2 100644 (file)
@@ -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,
index 3b722e2b1d169e134dff985a269d708db021961a..3e9f330d07716dfaaef329c18672e7a184fb6cc2 100644 (file)
@@ -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);
index fa085f0b993153bec51753f3edab933a3c4b6155..b48a1b4b1f1b90e1156fa93f542cadd64981fd8c 100644 (file)
@@ -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;
 
     /// @}
index 510b85acb8c56de2ec46b5ebe82a58c0601bd4c7..223f62fd954d39079a847275cf94328c278f8ad5 100644 (file)
@@ -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;
index 0b3d030cdb61244d061c6da745b01a9295f74e1e..0801d03a6c59c31a10ab4266dca935be0b1bc1a1 100644 (file)
@@ -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;
index 8eb6ff77c40ccec3b5e391c1510da9f1442fc790..343a05eaae36a17433b70bd8967362cd4d12c6cc 100644 (file)
@@ -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());
index 8d1b0dbd7aed78465f1f5d6400f7e377abd83c5a..582558027addb4cbac3916f20989d80573f720c8 100644 (file)
@@ -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 {
index 7700c58fe6937c0e711c674eccc937bd7241bc18..d335c7115ab2a490c2c467804427c657c82d4264 100644 (file)
@@ -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()) {
index 917697270eb295904f40db5006f5317f7e523c97..5d94bd98628d31aa4ecdc5572bf1a6338f37e0c0 100644 (file)
@@ -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;
index ad06792fb5ac2afe3c7b70727bba3f6540d82dbd..2e09dd3fcbd7b2d233f6dc078d6b31e26d7d36bb 100644 (file)
@@ -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;
index 8b75a884c08540b52e6dba0abf48689848814bc4..9a6f9fcd9b202e596c9f55138ab40e8816299f68 100644 (file)
@@ -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;
index ab703fdd907376ccd30b54f24521dd34cb6f182e..5f8ad383c5e34e3f9a7dda23441e63853e1e6028 100644 (file)
@@ -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);
index 2ad4ce04e5af3414b743687e019696623d2de6f3..0cef3fa8d62c9bd7adacfe5bca04ae0d596e34d1 100644 (file)
@@ -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];
index 3d96a00e9d9aeea0a2b38a5fe618d0f60bc62415..4124d5b97db3ae7bd2c05551c9aff3662ee7b55e 100644 (file)
@@ -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;
index 02552b3bae8c7788a6c1b26a6304ee104e7141e5..8c4f0bcd5f232d1b49a6274d191dfc688f1407b1 100644 (file)
@@ -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();
index 1fdd3b781ff93c2c8d5b660b3700547535779ad6..e716ea5dcebe923063b4d9df0760f6b89efd562c 100644 (file)
@@ -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);
 
index 43aaeabc54992cb9a5bc1ce4751a20fa49e93c25..295de26a4d4a66011d74e5bb20cc56592c775bc6 100644 (file)
@@ -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;
 
index 8e942a1dfdc2d1d0e7f9f930b00070d2b113f6a0..8331fc70465b5a7d79f8e81566f2a45511ddf312 100644 (file)
@@ -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),
index 9b513f663eafe6bd390e19e0be7056486c91c4b4..38c8f91c277684fe87dffc462dae9d400b554997 100644 (file)
@@ -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();
 }
index f5fe4fd6f1a186aeba0ec768c1d99ee1ba416fb1..c5ed8f0b8cb5302317f7542b9ad6fe2800adfdc8 100644 (file)
@@ -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;
index 09228e505a8715ad468cf3f325d295a8ddc4959e..1e454a00010b8856ffbf17e009923551e33bf35a 100755 (executable)
@@ -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;
index 85116aee28cde08afd465df045b96d7037032f93..2589c3bb1e39974b190c5bfed9fc9a3e017b5f85 100644 (file)
@@ -56,7 +56,7 @@ GR_DEFINE_FRAGMENT_PROCESSOR_TEST(DitherEffect);
 
 GrFragmentProcessor* DitherEffect::TestCreate(SkRandom*,
                                               GrContext*,
-                                              const GrDrawTargetCaps&,
+                                              const GrCaps&,
                                               GrTexture*[]) {
     return DitherEffect::Create();
 }
index a705f2b043ba17c314e73d9cc28bab4a1c278fdf..bb75d54b1a721c0aaf0701852f570e0311082c23 100644 (file)
@@ -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;
index d387b67f83a850006728fd69259432733ddace46..5370611ba04fcd74ba570de45b04a520f5fa231c 100644 (file)
@@ -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);
index 8b92eba1be0063ea15f14ea507bc437ae6fee8ed..424fbbf36b5053f5e06045614fbc6ff06d3582b3 100644 (file)
@@ -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);
index 9954b63acf3fca37035b37ce11a7babba13034e6..bf297fd7e39687cffa72765cf6f5ff313dcf7f97 100644 (file)
@@ -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);
index e729b1b0451b49897ca2f8931f616ddb94599522..9a5b3a7abb84110a5234d7876012ee733bd01a42 100644 (file)
@@ -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;
index bd189868e75e477864c7a48e693278cd9f6848d3..7ac3a1899620f1b29a2e34a4873e8429cb450901 100644 (file)
@@ -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;
index 368e5366e42c6cf690ece1d646a945f2719f27ab..7d9c50d16b4965e07c80880e2eda11cfd1988abc 100644 (file)
@@ -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
index 25c7889b973c183f4d8c2ec6183ded5415cc9da9..663cd4be41a644e1cf9f0e75cb3f3b8aa808052e 100644 (file)
@@ -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;
 };
 
 
index 6d97804fc65ffa52ddf350c58cd9d6f2b0232723..df3a5e66846f0ab070d7a4ce32a20987a86418aa 100644 (file)
@@ -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;
index 7f1f4ec946acd4a62a796e842a1277d7bce22f24..90aac8b86df448b6b0c345db8c4d3e2b6422ae48 100644 (file)
@@ -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(
index c032d88bd0dab1b29da83a0fd633975023542f18..194a90127772a540c60f28aea61dfcf90e6e3d37 100644 (file)
@@ -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());