diff options
author | bsalomon <bsalomon@google.com> | 2015-05-28 08:13:16 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-28 08:13:16 -0700 |
commit | 9138c46e572085870638b6f7ad7fcdfcdf3cac99 (patch) | |
tree | 81724ed66336cfc21c7139860914d70fb726e34c /src/effects | |
parent | 9c240a1e6d314056fe0d6a8a33a3c60a6e19288f (diff) |
Add direct getter for GrCaps to GrContext.
TBR=joshualitt@google.com
Review URL: https://codereview.chromium.org/1149773005
Diffstat (limited to 'src/effects')
-rw-r--r-- | src/effects/SkAlphaThresholdFilter.cpp | 2 | ||||
-rw-r--r-- | src/effects/SkGpuBlurUtils.cpp | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/effects/SkAlphaThresholdFilter.cpp b/src/effects/SkAlphaThresholdFilter.cpp index 395408c23e..fe8887f54e 100644 --- a/src/effects/SkAlphaThresholdFilter.cpp +++ b/src/effects/SkAlphaThresholdFilter.cpp @@ -271,7 +271,7 @@ bool SkAlphaThresholdFilterImpl::asFragmentProcessor(GrFragmentProcessor** fp, if (fp) { GrContext* context = texture->getContext(); GrSurfaceDesc maskDesc; - if (context->isConfigRenderable(kAlpha_8_GrPixelConfig, false)) { + if (context->caps()->isConfigRenderable(kAlpha_8_GrPixelConfig, false)) { maskDesc.fConfig = kAlpha_8_GrPixelConfig; } else { maskDesc.fConfig = kRGBA_8888_GrPixelConfig; diff --git a/src/effects/SkGpuBlurUtils.cpp b/src/effects/SkGpuBlurUtils.cpp index 4997afe22f..ad268d6961 100644 --- a/src/effects/SkGpuBlurUtils.cpp +++ b/src/effects/SkGpuBlurUtils.cpp @@ -13,6 +13,7 @@ #include "effects/GrConvolutionEffect.h" #include "effects/GrMatrixConvolutionEffect.h" #include "GrContext.h" +#include "GrCaps.h" #include "GrDrawContext.h" #endif @@ -154,7 +155,7 @@ GrTexture* GaussianBlur(GrContext* context, SkIRect clearRect; int scaleFactorX, radiusX; int scaleFactorY, radiusY; - int maxTextureSize = context->getMaxTextureSize(); + int maxTextureSize = context->caps()->maxTextureSize(); sigmaX = adjust_sigma(sigmaX, maxTextureSize, &scaleFactorX, &radiusX); sigmaY = adjust_sigma(sigmaY, maxTextureSize, &scaleFactorY, &radiusY); |