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
This commit is contained in:
brianosman 2016-04-26 16:48:06 -07:00 committed by Commit bot
parent ed086cae88
commit adf4fa6fde

View File

@ -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(