Move nested class GrDrawTarget::Caps out as GrDrawTargetCaps.
Pass caps to GrEffect::TestCreate() functions so that they can return effects that will work with the capabilities.
Review URL: https://codereview.chromium.org/12965018
git-svn-id: http://skia.googlecode.com/svn/trunk@8369 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/effects/GrCircleEdgeEffect.cpp b/src/gpu/effects/GrCircleEdgeEffect.cpp
index 3804fc7..19544d7 100644
--- a/src/gpu/effects/GrCircleEdgeEffect.cpp
+++ b/src/gpu/effects/GrCircleEdgeEffect.cpp
@@ -75,6 +75,7 @@
GrEffectRef* GrCircleEdgeEffect::TestCreate(SkMWCRandom* random,
GrContext* context,
+ const GrDrawTargetCaps&,
GrTexture* textures[]) {
return GrCircleEdgeEffect::Create(random->nextBool());
}
diff --git a/src/gpu/effects/GrConfigConversionEffect.cpp b/src/gpu/effects/GrConfigConversionEffect.cpp
index df8ab8d..1e65a6f 100644
--- a/src/gpu/effects/GrConfigConversionEffect.cpp
+++ b/src/gpu/effects/GrConfigConversionEffect.cpp
@@ -135,6 +135,7 @@
GrEffectRef* GrConfigConversionEffect::TestCreate(SkMWCRandom* random,
GrContext*,
+ const GrDrawTargetCaps&,
GrTexture* textures[]) {
PMConversion pmConv = static_cast<PMConversion>(random->nextULessThan(kPMConversionCnt));
bool swapRB;
diff --git a/src/gpu/effects/GrConvolutionEffect.cpp b/src/gpu/effects/GrConvolutionEffect.cpp
index 924b03c..380581f 100644
--- a/src/gpu/effects/GrConvolutionEffect.cpp
+++ b/src/gpu/effects/GrConvolutionEffect.cpp
@@ -183,6 +183,7 @@
GrEffectRef* GrConvolutionEffect::TestCreate(SkMWCRandom* random,
GrContext*,
+ const GrDrawTargetCaps&,
GrTexture* textures[]) {
int texIdx = random->nextBool() ? GrEffectUnitTest::kSkiaPMTextureIdx :
GrEffectUnitTest::kAlphaTextureIdx;
diff --git a/src/gpu/effects/GrEllipseEdgeEffect.cpp b/src/gpu/effects/GrEllipseEdgeEffect.cpp
index 5d7908e..7a773b0 100644
--- a/src/gpu/effects/GrEllipseEdgeEffect.cpp
+++ b/src/gpu/effects/GrEllipseEdgeEffect.cpp
@@ -96,6 +96,7 @@
GrEffectRef* GrEllipseEdgeEffect::TestCreate(SkMWCRandom* random,
GrContext* context,
+ const GrDrawTargetCaps&,
GrTexture* textures[]) {
return GrEllipseEdgeEffect::Create(random->nextBool());
}
diff --git a/src/gpu/effects/GrSimpleTextureEffect.cpp b/src/gpu/effects/GrSimpleTextureEffect.cpp
index 80627aa..172558d 100644
--- a/src/gpu/effects/GrSimpleTextureEffect.cpp
+++ b/src/gpu/effects/GrSimpleTextureEffect.cpp
@@ -97,6 +97,7 @@
GrEffectRef* GrSimpleTextureEffect::TestCreate(SkMWCRandom* random,
GrContext*,
+ const GrDrawTargetCaps&,
GrTexture* textures[]) {
int texIdx = random->nextBool() ? GrEffectUnitTest::kSkiaPMTextureIdx :
GrEffectUnitTest::kAlphaTextureIdx;
diff --git a/src/gpu/effects/GrTextureDomainEffect.cpp b/src/gpu/effects/GrTextureDomainEffect.cpp
index b1fd3ed..f3838ae 100644
--- a/src/gpu/effects/GrTextureDomainEffect.cpp
+++ b/src/gpu/effects/GrTextureDomainEffect.cpp
@@ -221,6 +221,7 @@
GrEffectRef* GrTextureDomainEffect::TestCreate(SkMWCRandom* random,
GrContext*,
+ const GrDrawTargetCaps&,
GrTexture* textures[]) {
int texIdx = random->nextBool() ? GrEffectUnitTest::kSkiaPMTextureIdx :
GrEffectUnitTest::kAlphaTextureIdx;