diff options
Diffstat (limited to 'gm')
-rw-r--r-- | gm/beziereffects.cpp | 16 | ||||
-rw-r--r-- | gm/bigrrectaaeffect.cpp | 1 | ||||
-rw-r--r-- | gm/bitmapshader.cpp | 11 | ||||
-rw-r--r-- | gm/rrects.cpp | 1 | ||||
-rw-r--r-- | gm/texturedomaineffect.cpp | 2 | ||||
-rw-r--r-- | gm/windowrectangles.cpp | 16 | ||||
-rw-r--r-- | gm/yuvtorgbeffect.cpp | 6 |
7 files changed, 33 insertions, 20 deletions
diff --git a/gm/beziereffects.cpp b/gm/beziereffects.cpp index 57caa46410..226ce315ec 100644 --- a/gm/beziereffects.cpp +++ b/gm/beziereffects.cpp @@ -136,7 +136,7 @@ protected: return; } - if (!context->caps()->shaderCaps()->floatIs32Bits()) { + if (!context->contextPriv().caps()->shaderCaps()->floatIs32Bits()) { SkPaint paint; sk_tool_utils::set_portable_typeface(&paint); paint.setAntiAlias(true); @@ -224,9 +224,9 @@ protected: bool flipKL = (c == loopIndex && cnt != 3); - sk_sp<GrGeometryProcessor> gp = GrCubicEffect::Make(color, SkMatrix::I(), klm, - flipKL, edgeType, - *context->caps()); + sk_sp<GrGeometryProcessor> gp = + GrCubicEffect::Make(color, SkMatrix::I(), klm, flipKL, edgeType, + *context->contextPriv().caps()); if (!gp) { break; } @@ -358,8 +358,8 @@ protected: for(int edgeType = 0; edgeType < kGrClipEdgeTypeCnt; ++edgeType) { sk_sp<GrGeometryProcessor> gp; GrClipEdgeType et = (GrClipEdgeType)edgeType; - gp = GrConicEffect::Make(color, SkMatrix::I(), et, - *context->caps(), SkMatrix::I(), false); + gp = GrConicEffect::Make(color, SkMatrix::I(), et, *context->contextPriv().caps(), + SkMatrix::I(), false); if (!gp) { continue; } @@ -566,8 +566,8 @@ protected: for(int edgeType = 0; edgeType < kGrClipEdgeTypeCnt; ++edgeType) { sk_sp<GrGeometryProcessor> gp; GrClipEdgeType et = (GrClipEdgeType)edgeType; - gp = GrQuadEffect::Make(color, SkMatrix::I(), et, - *context->caps(), SkMatrix::I(), false); + gp = GrQuadEffect::Make(color, SkMatrix::I(), et, *context->contextPriv().caps(), + SkMatrix::I(), false); if (!gp) { continue; } diff --git a/gm/bigrrectaaeffect.cpp b/gm/bigrrectaaeffect.cpp index a5d77fc248..6f75344ea7 100644 --- a/gm/bigrrectaaeffect.cpp +++ b/gm/bigrrectaaeffect.cpp @@ -8,6 +8,7 @@ #include "gm.h" #include "sk_tool_utils.h" #if SK_SUPPORT_GPU +#include "GrCaps.h" #include "GrContext.h" #include "GrRenderTargetContextPriv.h" #include "SkRRect.h" diff --git a/gm/bitmapshader.cpp b/gm/bitmapshader.cpp index 98205d2146..3f3c51e81a 100644 --- a/gm/bitmapshader.cpp +++ b/gm/bitmapshader.cpp @@ -5,12 +5,17 @@ * found in the LICENSE file. */ #include "gm.h" -#include "sk_tool_utils.h" #include "SkBitmap.h" #include "SkPaint.h" #include "SkShader.h" +#include "sk_tool_utils.h" + +#if SK_SUPPORT_GPU +#include "GrCaps.h" #include "GrContext.h" +#include "GrContextPriv.h" +#endif namespace skiagm { @@ -116,9 +121,11 @@ DEF_SIMPLE_GM(hugebitmapshader, canvas, 100, 100) { // (See https://skia-review.googlesource.com/c/skia/+/73200) int bitmapW = 1; int bitmapH = 60000; +#if SK_SUPPORT_GPU if (auto* ctx = canvas->getGrContext()) { - bitmapH = ctx->caps()->maxTextureSize() + 1; + bitmapH = ctx->contextPriv().caps()->maxTextureSize() + 1; } +#endif bitmap.setInfo(SkImageInfo::MakeA8(bitmapW, bitmapH), bitmapW); uint8_t* pixels = new uint8_t[bitmapH]; for(int i = 0; i < bitmapH; ++i) { diff --git a/gm/rrects.cpp b/gm/rrects.cpp index dfeebf3dd8..d6b52918ef 100644 --- a/gm/rrects.cpp +++ b/gm/rrects.cpp @@ -8,6 +8,7 @@ #include "gm.h" #include "sk_tool_utils.h" #if SK_SUPPORT_GPU +#include "GrCaps.h" #include "GrContext.h" #include "GrRenderTargetContextPriv.h" #include "effects/GrRRectEffect.h" diff --git a/gm/texturedomaineffect.cpp b/gm/texturedomaineffect.cpp index b6d7cbaa02..e5e26278e3 100644 --- a/gm/texturedomaineffect.cpp +++ b/gm/texturedomaineffect.cpp @@ -91,7 +91,7 @@ protected: GrSurfaceDesc desc; desc.fWidth = fBmp.width(); desc.fHeight = fBmp.height(); - desc.fConfig = SkImageInfo2GrPixelConfig(fBmp.info(), *context->caps()); + desc.fConfig = SkImageInfo2GrPixelConfig(fBmp.info(), *context->contextPriv().caps()); SkASSERT(kUnknown_GrPixelConfig != desc.fConfig); sk_sp<GrTextureProxy> proxy = proxyProvider->createTextureProxy( diff --git a/gm/windowrectangles.cpp b/gm/windowrectangles.cpp index c427b1af27..d03cf6dd28 100644 --- a/gm/windowrectangles.cpp +++ b/gm/windowrectangles.cpp @@ -11,13 +11,15 @@ #include "SkRRect.h" #if SK_SUPPORT_GPU -# include "GrAppliedClip.h" -# include "GrStencilClip.h" -# include "GrReducedClip.h" -# include "GrRenderTargetContext.h" -# include "GrRenderTargetContextPriv.h" -# include "GrResourceProvider.h" -# include "effects/GrTextureDomain.h" +#include "GrAppliedClip.h" +#include "GrCaps.h" +#include "GrContextPriv.h" +#include "GrReducedClip.h" +#include "GrRenderTargetContext.h" +#include "GrRenderTargetContextPriv.h" +#include "GrResourceProvider.h" +#include "GrStencilClip.h" +#include "effects/GrTextureDomain.h" #endif constexpr static SkIRect kDeviceRect = {0, 0, 600, 600}; diff --git a/gm/yuvtorgbeffect.cpp b/gm/yuvtorgbeffect.cpp index 74c11a9a8e..0c69ec0dd5 100644 --- a/gm/yuvtorgbeffect.cpp +++ b/gm/yuvtorgbeffect.cpp @@ -90,7 +90,8 @@ protected: GrSurfaceDesc desc; desc.fWidth = fBmp[i].width(); desc.fHeight = fBmp[i].height(); - desc.fConfig = SkImageInfo2GrPixelConfig(fBmp[i].info(), *context->caps()); + desc.fConfig = + SkImageInfo2GrPixelConfig(fBmp[i].info(), *context->contextPriv().caps()); SkASSERT(kUnknown_GrPixelConfig != desc.fConfig); proxy[i] = proxyProvider->createTextureProxy(desc, SkBudgeted::kYes, @@ -216,7 +217,8 @@ protected: GrSurfaceDesc desc; desc.fWidth = fBmp[index].width(); desc.fHeight = fBmp[index].height(); - desc.fConfig = SkImageInfo2GrPixelConfig(fBmp[index].info(), *context->caps()); + desc.fConfig = + SkImageInfo2GrPixelConfig(fBmp[index].info(), *context->contextPriv().caps()); SkASSERT(kUnknown_GrPixelConfig != desc.fConfig); proxy[i] = proxyProvider->createTextureProxy( |