Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(181)

Unified Diff: gpu/command_buffer/service/context_group.cc

Issue 10106015: Allow textures to be moved from one GL context group to another. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();

Powered by Google App Engine
This is Rietveld 408576698