summaryrefslogtreecommitdiffstats
path: root/content/common
diff options
context:
space:
mode:
Diffstat (limited to 'content/common')
-rw-r--r--content/common/gpu/gpu_channel.cc4
-rw-r--r--content/common/gpu/gpu_channel.h2
-rw-r--r--content/common/gpu/gpu_command_buffer_stub.cc3
-rw-r--r--content/common/gpu/gpu_command_buffer_stub.h7
4 files changed, 15 insertions, 1 deletions
diff --git a/content/common/gpu/gpu_channel.cc b/content/common/gpu/gpu_channel.cc
index 9785ce7..a93c5b6 100644
--- a/content/common/gpu/gpu_channel.cc
+++ b/content/common/gpu/gpu_channel.cc
@@ -18,6 +18,7 @@
#include "content/common/gpu/gpu_messages.h"
#include "content/public/common/content_client.h"
#include "content/public/common/content_switches.h"
+#include "gpu/command_buffer/service/mailbox_manager.h"
#include "ui/gfx/gl/gl_context.h"
#include "ui/gfx/gl/gl_surface.h"
@@ -41,6 +42,7 @@ GpuChannel::GpuChannel(GpuChannelManager* gpu_channel_manager,
: gpu_channel_manager_(gpu_channel_manager),
client_id_(client_id),
share_group_(share_group ? share_group : new gfx::GLShareGroup),
+ mailbox_manager_(new gpu::gles2::MailboxManager),
watchdog_(watchdog),
software_(software),
handle_messages_scheduled_(false),
@@ -192,6 +194,7 @@ void GpuChannel::CreateViewCommandBuffer(
this,
share_group,
window,
+ mailbox_manager_,
gfx::Size(),
disallowed_features_,
init_params.allowed_extensions,
@@ -349,6 +352,7 @@ void GpuChannel::OnCreateOffscreenCommandBuffer(
this,
share_group,
gfx::GLSurfaceHandle(),
+ mailbox_manager_.get(),
size,
disallowed_features_,
init_params.allowed_extensions,
diff --git a/content/common/gpu/gpu_channel.h b/content/common/gpu/gpu_channel.h
index 42e4d8b..67d856e 100644
--- a/content/common/gpu/gpu_channel.h
+++ b/content/common/gpu/gpu_channel.h
@@ -156,6 +156,8 @@ class GpuChannel : public IPC::Channel::Listener,
// process use.
scoped_refptr<gfx::GLShareGroup> share_group_;
+ scoped_refptr<gpu::gles2::MailboxManager> mailbox_manager_;
+
#if defined(ENABLE_GPU)
typedef IDMap<GpuCommandBufferStub, IDMapOwnPointer> StubMap;
StubMap stubs_;
diff --git a/content/common/gpu/gpu_command_buffer_stub.cc b/content/common/gpu/gpu_command_buffer_stub.cc
index b6f6d28..aa5b331 100644
--- a/content/common/gpu/gpu_command_buffer_stub.cc
+++ b/content/common/gpu/gpu_command_buffer_stub.cc
@@ -39,6 +39,7 @@ GpuCommandBufferStub::GpuCommandBufferStub(
GpuChannel* channel,
GpuCommandBufferStub* share_group,
const gfx::GLSurfaceHandle& handle,
+ gpu::gles2::MailboxManager* mailbox_manager,
const gfx::Size& size,
const gpu::gles2::DisallowedFeatures& disallowed_features,
const std::string& allowed_extensions,
@@ -65,7 +66,7 @@ GpuCommandBufferStub::GpuCommandBufferStub(
if (share_group) {
context_group_ = share_group->context_group_;
} else {
- context_group_ = new gpu::gles2::ContextGroup(true);
+ context_group_ = new gpu::gles2::ContextGroup(mailbox_manager, true);
}
if (surface_id != 0)
surface_state_.reset(new GpuCommandBufferStubBase::SurfaceState(
diff --git a/content/common/gpu/gpu_command_buffer_stub.h b/content/common/gpu/gpu_command_buffer_stub.h
index 4f08818..5a99c56 100644
--- a/content/common/gpu/gpu_command_buffer_stub.h
+++ b/content/common/gpu/gpu_command_buffer_stub.h
@@ -39,6 +39,12 @@ class GpuChannel;
struct GpuMemoryAllocation;
class GpuWatchdog;
+namespace gpu {
+namespace gles2 {
+class MailboxManager;
+}
+}
+
// This Base class is used to expose methods of GpuCommandBufferStub used for
// testability.
class CONTENT_EXPORT GpuCommandBufferStubBase {
@@ -88,6 +94,7 @@ class GpuCommandBufferStub
GpuChannel* channel,
GpuCommandBufferStub* share_group,
const gfx::GLSurfaceHandle& handle,
+ gpu::gles2::MailboxManager* mailbox_manager,
const gfx::Size& size,
const gpu::gles2::DisallowedFeatures& disallowed_features,
const std::string& allowed_extensions,