diff options
author | Greg Daniel <egdaniel@google.com> | 2018-06-08 17:22:23 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-06-08 23:07:25 +0000 |
commit | 8f5bbda0071e5663f454804e370e66f86b87078b (patch) | |
tree | 7214467a0ba834ae948b8f108c0ccc5b7cb2dde5 /src/gpu/GrGpu.h | |
parent | 09c9400695c87be11f0ef5268e0f6efce0e62831 (diff) |
Fall back to bilerp if we are undable to do a copy for mips.
Bug: skia:
Change-Id: I52b86d83aaec1fa245be2ee17bbd56defcb5881f
Reviewed-on: https://skia-review.googlesource.com/133587
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrGpu.h')
-rw-r--r-- | src/gpu/GrGpu.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/gpu/GrGpu.h b/src/gpu/GrGpu.h index ad20d52366..d97a22edd0 100644 --- a/src/gpu/GrGpu.h +++ b/src/gpu/GrGpu.h @@ -379,10 +379,19 @@ public: // Determines whether a texture will need to be rescaled in order to be used with the // GrSamplerState. - static bool IsACopyNeededForTextureParams(const GrCaps*, GrTextureProxy* texProxy, - int width, int height, - const GrSamplerState&, GrTextureProducer::CopyParams*, - SkScalar scaleAdjust[2]); + static bool IsACopyNeededForRepeatWrapMode(const GrCaps*, GrTextureProxy* texProxy, + int width, int height, + GrSamplerState::Filter, + GrTextureProducer::CopyParams*, + SkScalar scaleAdjust[2]); + + // Determines whether a texture will need to be copied because the draw requires mips but the + // texutre doesn't have any. This call should be only checked if IsACopyNeededForTextureParams + // fails. If the previous call succeeds, then a copy should be done using those params and the + // mip mapping requirements will be handled there. + static bool IsACopyNeededForMips(const GrCaps* caps, const GrTextureProxy* texProxy, + GrSamplerState::Filter filter, + GrTextureProducer::CopyParams* copyParams); void handleDirtyContext() { if (fResetBits) { |