aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGLGpu.cpp
diff options
context:
space:
mode:
authorGravatar brianosman <brianosman@google.com>2016-04-26 16:48:06 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-04-26 16:48:06 -0700
commitadf4fa6fdef40071ebef11d767c2eb067af77179 (patch)
treefd594897735f8e8c5a8b7f6b79411d6e936fdaa2 /src/gpu/gl/GrGLGpu.cpp
parented086cae885050188cbb8761c0b1382bbadf088b (diff)
Ensure we're operating on the correct texture when generating mipmaps.
Diffstat (limited to 'src/gpu/gl/GrGLGpu.cpp')
-rw-r--r--src/gpu/gl/GrGLGpu.cpp1
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(