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

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
« no previous file with comments | « gpu/command_buffer/service/context_group.h ('k') | gpu/command_buffer/service/context_group_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/context_group.cc
===================================================================
--- gpu/command_buffer/service/context_group.cc (revision 134729)
+++ gpu/command_buffer/service/context_group.cc (working copy)
@@ -13,6 +13,7 @@
#include "gpu/command_buffer/service/framebuffer_manager.h"
#include "gpu/command_buffer/service/gles2_cmd_decoder.h"
#include "gpu/command_buffer/service/gpu_switches.h"
+#include "gpu/command_buffer/service/mailbox_manager.h"
#include "gpu/command_buffer/service/program_manager.h"
#include "gpu/command_buffer/service/renderbuffer_manager.h"
#include "gpu/command_buffer/service/shader_manager.h"
@@ -22,8 +23,10 @@
namespace gpu {
namespace gles2 {
-ContextGroup::ContextGroup(bool bind_generates_resource)
- : num_contexts_(0),
+ContextGroup::ContextGroup(MailboxManager* mailbox_manager,
+ bool bind_generates_resource)
+ : mailbox_manager_(mailbox_manager ? mailbox_manager : new MailboxManager),
+ num_contexts_(0),
enforce_gl_minimums_(CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnforceGLMinimums)),
bind_generates_resource_(bind_generates_resource),
@@ -249,6 +252,8 @@
}
if (texture_manager_ != NULL) {
+ mailbox_manager_->DestroyOwnedTextures(texture_manager_.get(),
+ have_context);
texture_manager_->Destroy(have_context);
texture_manager_.reset();
}
« no previous file with comments | « gpu/command_buffer/service/context_group.h ('k') | gpu/command_buffer/service/context_group_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698