diff options
author | boliu <boliu@chromium.org> | 2016-02-25 18:42:48 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-26 02:44:03 +0000 |
commit | b97ce453db7a9db647292e455dcc4de01a97e473 (patch) | |
tree | f2b03ea1e36c17253f17550f2eb4df1ec15985a7 /gpu | |
parent | f3d772c9d29ea403856a804b0bc136150d844a0f (diff) | |
download | chromium_src-b97ce453db7a9db647292e455dcc4de01a97e473.zip chromium_src-b97ce453db7a9db647292e455dcc4de01a97e473.tar.gz chromium_src-b97ce453db7a9db647292e455dcc4de01a97e473.tar.bz2 |
gpu: Do not shrink level_infos vector
The vector is generated sized to the max levels. So TextureDefinitions
should not be resizing the vector to 1. Instead, update level 0, and
reset the other levels, if there are any.
BUG=569959
CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel
Review URL: https://codereview.chromium.org/1729153003
Cr-Commit-Position: refs/heads/master@{#377785}
Diffstat (limited to 'gpu')
-rw-r--r-- | gpu/command_buffer/service/texture_definition.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gpu/command_buffer/service/texture_definition.cc b/gpu/command_buffer/service/texture_definition.cc index e888077..f04bd6f 100644 --- a/gpu/command_buffer/service/texture_definition.cc +++ b/gpu/command_buffer/service/texture_definition.cc @@ -393,6 +393,8 @@ void TextureDefinition::UpdateTextureInternal(Texture* texture) const { level_info_.height, level_info_.depth, level_info_.border, level_info_.format, level_info_.type, level_info_.cleared_rect); + texture->face_infos_[0].level_infos.resize( + texture->face_infos_[0].num_mip_levels); } if (image_buffer_.get()) { |