| Index: gpu/command_buffer/service/texture_manager.cc
|
| diff --git a/gpu/command_buffer/service/texture_manager.cc b/gpu/command_buffer/service/texture_manager.cc
|
| index f3cc1d1170ea6d886bf2cfa3ea087f8ce470eaa9..a52ea3fade89a8c5dd84b4ed18f4336e973a925d 100644
|
| --- a/gpu/command_buffer/service/texture_manager.cc
|
| +++ b/gpu/command_buffer/service/texture_manager.cc
|
| @@ -1698,7 +1698,8 @@ TextureRef::TextureRef(TextureManager* manager,
|
| : manager_(manager),
|
| texture_(texture),
|
| client_id_(client_id),
|
| - num_observers_(0) {
|
| + num_observers_(0),
|
| + force_context_lost_(false) {
|
| DCHECK(manager_);
|
| DCHECK(texture_);
|
| texture_->AddTextureRef(this);
|
| @@ -1713,10 +1714,15 @@ scoped_refptr<TextureRef> TextureRef::Create(TextureManager* manager,
|
|
|
| TextureRef::~TextureRef() {
|
| manager_->StopTracking(this);
|
| - texture_->RemoveTextureRef(this, manager_->have_context_);
|
| + texture_->RemoveTextureRef(
|
| + this, force_context_lost_ ? false : manager_->have_context_);
|
| manager_ = NULL;
|
| }
|
|
|
| +void TextureRef::ForceContextLost() {
|
| + force_context_lost_ = true;
|
| +}
|
| +
|
| TextureManager::TextureManager(MemoryTracker* memory_tracker,
|
| FeatureInfo* feature_info,
|
| GLint max_texture_size,
|
|
|