diff options
author | brianosman <brianosman@google.com> | 2016-04-26 16:48:06 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-26 16:48:06 -0700 |
commit | adf4fa6fdef40071ebef11d767c2eb067af77179 (patch) | |
tree | fd594897735f8e8c5a8b7f6b79411d6e936fdaa2 /src/gpu/gl/GrGLGpu.cpp | |
parent | ed086cae885050188cbb8761c0b1382bbadf088b (diff) |
Ensure we're operating on the correct texture when generating mipmaps.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1915403004
Review URL: https://codereview.chromium.org/1915403004
Diffstat (limited to 'src/gpu/gl/GrGLGpu.cpp')
-rw-r--r-- | src/gpu/gl/GrGLGpu.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp index d259d2fb14..29add839bd 100644 --- a/src/gpu/gl/GrGLGpu.cpp +++ b/src/gpu/gl/GrGLGpu.cpp @@ -3197,6 +3197,7 @@ void GrGLGpu::bindTexture(int unitIdx, const GrTextureParams& params, bool dstCo if (GrTextureParams::kMipMap_FilterMode == filterMode) { if (texture->texturePriv().mipMapsAreDirty()) { + this->setTextureUnit(unitIdx); GL_CALL(GenerateMipmap(target)); texture->texturePriv().dirtyMipMaps(false); texture->texturePriv().setMaxMipMapLevel(SkMipMap::ComputeLevelCount( |