Index: gpu/command_buffer/service/context_group.cc |
=================================================================== |
--- gpu/command_buffer/service/context_group.cc (revision 132415) |
+++ gpu/command_buffer/service/context_group.cc (working copy) |
@@ -9,6 +9,7 @@ |
#include "base/string_util.h" |
#include "gpu/command_buffer/common/id_allocator.h" |
#include "gpu/command_buffer/service/buffer_manager.h" |
+#include "gpu/command_buffer/service/display.h" |
#include "gpu/command_buffer/service/framebuffer_manager.h" |
#include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
#include "gpu/command_buffer/service/program_manager.h" |
@@ -20,8 +21,9 @@ |
namespace gpu { |
namespace gles2 { |
-ContextGroup::ContextGroup(bool bind_generates_resource) |
- : num_contexts_(0), |
+ContextGroup::ContextGroup(Display* display, bool bind_generates_resource) |
+ : display_(display ? display : new Display), |
+ num_contexts_(0), |
bind_generates_resource_(bind_generates_resource), |
max_vertex_attribs_(0u), |
max_texture_units_(0u), |
@@ -170,6 +172,8 @@ |
renderbuffer_manager_.reset(); |
} |
+ display_->DestroyOwnedTextures(texture_manager_.get(), have_context); |
+ |
if (texture_manager_ != NULL) { |
texture_manager_->Destroy(have_context); |
texture_manager_.reset(); |