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

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

Issue 7554015: Implemented support for GL constext share groups in the renderer process. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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/gles2_cmd_decoder.cc
===================================================================
--- gpu/command_buffer/service/gles2_cmd_decoder.cc (revision 95161)
+++ gpu/command_buffer/service/gles2_cmd_decoder.cc (working copy)
@@ -1620,7 +1620,7 @@
ContextGroup* group)
: GLES2Decoder(),
surface_manager_(surface_manager),
- group_(ContextGroup::Ref(group ? group : new ContextGroup())),
+ group_(group),
error_bits_(0),
pack_alignment_(4),
unpack_alignment_(4),
@@ -1666,6 +1666,8 @@
frame_number_(0),
has_arb_robustness_(false),
reset_status_(GL_NO_ERROR) {
+ DCHECK(group);
+
attrib_0_value_.v[0] = 0.0f;
attrib_0_value_.v[1] = 0.0f;
attrib_0_value_.v[2] = 0.0f;
@@ -2680,7 +2682,7 @@
glGenBuffersARB(1, &service_id);
CreateBufferInfo(client_id, service_id);
info = GetBufferInfo(client_id);
- IdAllocator* id_allocator =
+ IdAllocatorInterface* id_allocator =
group_->GetIdAllocator(id_namespaces::kBuffers);
id_allocator->MarkAsUsed(client_id);
}
@@ -2759,7 +2761,7 @@
glGenFramebuffersEXT(1, &service_id);
CreateFramebufferInfo(client_id, service_id);
info = GetFramebufferInfo(client_id);
- IdAllocator* id_allocator =
+ IdAllocatorInterface* id_allocator =
group_->GetIdAllocator(id_namespaces::kFramebuffers);
id_allocator->MarkAsUsed(client_id);
} else {
@@ -2798,7 +2800,7 @@
glGenRenderbuffersEXT(1, &service_id);
CreateRenderbufferInfo(client_id, service_id);
info = GetRenderbufferInfo(client_id);
- IdAllocator* id_allocator =
+ IdAllocatorInterface* id_allocator =
group_->GetIdAllocator(id_namespaces::kRenderbuffers);
id_allocator->MarkAsUsed(client_id);
} else {
@@ -2820,7 +2822,7 @@
glGenTextures(1, &service_id);
CreateTextureInfo(client_id, service_id);
info = GetTextureInfo(client_id);
- IdAllocator* id_allocator =
+ IdAllocatorInterface* id_allocator =
group_->GetIdAllocator(id_namespaces::kTextures);
id_allocator->MarkAsUsed(client_id);
}
@@ -3313,7 +3315,7 @@
void GLES2DecoderImpl::DoDeleteSharedIdsCHROMIUM(
GLuint namespace_id, GLsizei n, const GLuint* ids) {
- IdAllocator* id_allocator = group_->GetIdAllocator(namespace_id);
+ IdAllocatorInterface* id_allocator = group_->GetIdAllocator(namespace_id);
for (GLsizei ii = 0; ii < n; ++ii) {
id_allocator->FreeID(ids[ii]);
}
@@ -3342,7 +3344,7 @@
void GLES2DecoderImpl::DoGenSharedIdsCHROMIUM(
GLuint namespace_id, GLuint id_offset, GLsizei n, GLuint* ids) {
- IdAllocator* id_allocator = group_->GetIdAllocator(namespace_id);
+ IdAllocatorInterface* id_allocator = group_->GetIdAllocator(namespace_id);
if (id_offset == 0) {
for (GLsizei ii = 0; ii < n; ++ii) {
ids[ii] = id_allocator->AllocateID();
@@ -3379,7 +3381,7 @@
void GLES2DecoderImpl::DoRegisterSharedIdsCHROMIUM(
GLuint namespace_id, GLsizei n, const GLuint* ids) {
- IdAllocator* id_allocator = group_->GetIdAllocator(namespace_id);
+ IdAllocatorInterface* id_allocator = group_->GetIdAllocator(namespace_id);
for (GLsizei ii = 0; ii < n; ++ii) {
if (!id_allocator->MarkAsUsed(ids[ii])) {
for (GLsizei jj = 0; jj < ii; ++jj) {

Powered by Google App Engine
This is Rietveld 408576698