| Index: gpu/command_buffer/service/texture_definition.cc
|
| diff --git a/gpu/command_buffer/service/texture_definition.cc b/gpu/command_buffer/service/texture_definition.cc
|
| index edd42717d3702ba9b421d5ba87ae79549ca11377..7af662c400c7b29348a117ff1c42621f80a10000 100644
|
| --- a/gpu/command_buffer/service/texture_definition.cc
|
| +++ b/gpu/command_buffer/service/texture_definition.cc
|
| @@ -413,7 +413,8 @@ bool TextureDefinition::Matches(const Texture* texture) const {
|
| if (texture->min_filter_ != min_filter_ ||
|
| texture->mag_filter_ != mag_filter_ ||
|
| texture->wrap_s_ != wrap_s_ ||
|
| - texture->wrap_t_ != wrap_t_) {
|
| + texture->wrap_t_ != wrap_t_ ||
|
| + texture->SafeToRenderFrom() != SafeToRenderFrom()) {
|
| return false;
|
| }
|
|
|
| @@ -424,5 +425,16 @@ bool TextureDefinition::Matches(const Texture* texture) const {
|
| return true;
|
| }
|
|
|
| +bool TextureDefinition::SafeToRenderFrom() const {
|
| + for (const std::vector<LevelInfo>& face_info : level_infos_) {
|
| + for (const LevelInfo& level_info : face_info) {
|
| + if (!level_info.cleared) {
|
| + return false;
|
| + }
|
| + }
|
| + }
|
| + return true;
|
| +}
|
| +
|
| } // namespace gles2
|
| } // namespace gpu
|
|
|