summaryrefslogtreecommitdiffstats
path: root/content/common
diff options
context:
space:
mode:
authorpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-12 22:30:07 +0000
committerpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-12 22:30:07 +0000
commite608ce0911ee1764b93d8cd667d6eabbd083ab96 (patch)
tree1438be09f2e2dee426a3bff149a51cd826358cd7 /content/common
parentc5651f4a4e0581a53525ad59bfb1fecfeb6ed6bb (diff)
downloadchromium_src-e608ce0911ee1764b93d8cd667d6eabbd083ab96.zip
chromium_src-e608ce0911ee1764b93d8cd667d6eabbd083ab96.tar.gz
chromium_src-e608ce0911ee1764b93d8cd667d6eabbd083ab96.tar.bz2
Add the ability to share GL contexts across channels.
This is patch 1 of many to enable the use of the GPU process for the browser UI. Before this, all contexts within one channel were shared, but not across channels. With this patch channels can choose to share contexts with other ones. This patch also renames the various "renderer_id" to "client_id", since the GPU process doesn't care that the other side is a renderer or not. BUG=99516 TEST=None yet, but will come with later patches Review URL: http://codereview.chromium.org/9107033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117534 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common')
-rw-r--r--content/common/gpu/gpu_channel.cc17
-rw-r--r--content/common/gpu/gpu_channel.h7
-rw-r--r--content/common/gpu/gpu_channel_manager.cc26
-rw-r--r--content/common/gpu/gpu_channel_manager.h12
-rw-r--r--content/common/gpu/gpu_command_buffer_stub.cc8
-rw-r--r--content/common/gpu/gpu_command_buffer_stub.h8
-rw-r--r--content/common/gpu/gpu_messages.h23
-rw-r--r--content/common/gpu/image_transport_surface.cc26
-rw-r--r--content/common/gpu/image_transport_surface.h10
-rw-r--r--content/common/gpu/image_transport_surface_linux.cc28
-rw-r--r--content/common/gpu/image_transport_surface_mac.cc20
-rw-r--r--content/common/gpu/image_transport_surface_win.cc12
12 files changed, 104 insertions, 93 deletions
diff --git a/content/common/gpu/gpu_channel.cc b/content/common/gpu/gpu_channel.cc
index a53ed72..69b2aca 100644
--- a/content/common/gpu/gpu_channel.cc
+++ b/content/common/gpu/gpu_channel.cc
@@ -31,13 +31,14 @@ const int64 kHandleMoreWorkPeriod = 1;
GpuChannel::GpuChannel(GpuChannelManager* gpu_channel_manager,
GpuWatchdog* watchdog,
- int renderer_id,
+ gfx::GLShareGroup* share_group,
+ int client_id,
bool software)
: gpu_channel_manager_(gpu_channel_manager),
- renderer_id_(renderer_id),
+ client_id_(client_id),
renderer_process_(base::kNullProcessHandle),
renderer_pid_(base::kNullProcessId),
- share_group_(new gfx::GLShareGroup),
+ share_group_(share_group ? share_group : new gfx::GLShareGroup),
watchdog_(watchdog),
software_(software),
handle_messages_scheduled_(false),
@@ -45,7 +46,7 @@ GpuChannel::GpuChannel(GpuChannelManager* gpu_channel_manager,
num_contexts_preferring_discrete_gpu_(0),
weak_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {
DCHECK(gpu_channel_manager);
- DCHECK(renderer_id);
+ DCHECK(client_id);
static int last_channel_id = 0;
channel_id_ = ++last_channel_id;
@@ -110,7 +111,7 @@ bool GpuChannel::OnMessageReceived(const IPC::Message& message) {
}
void GpuChannel::OnChannelError() {
- gpu_channel_manager_->RemoveChannel(renderer_id_);
+ gpu_channel_manager_->RemoveChannel(client_id_);
}
void GpuChannel::OnChannelConnected(int32 peer_pid) {
@@ -171,7 +172,7 @@ void GpuChannel::DestroySoon() {
void GpuChannel::OnDestroy() {
TRACE_EVENT0("gpu", "GpuChannel::OnDestroy");
- gpu_channel_manager_->RemoveChannel(renderer_id_);
+ gpu_channel_manager_->RemoveChannel(client_id_);
}
void GpuChannel::CreateViewCommandBuffer(
@@ -198,7 +199,7 @@ void GpuChannel::CreateViewCommandBuffer(
init_params.attribs,
init_params.gpu_preference,
*route_id,
- renderer_id_,
+ client_id_,
render_view_id,
watchdog_,
software_));
@@ -394,7 +395,7 @@ void GpuChannel::OnWillGpuSwitchOccur(bool is_creating_context,
}
void GpuChannel::OnCloseChannel() {
- gpu_channel_manager_->RemoveChannel(renderer_id_);
+ gpu_channel_manager_->RemoveChannel(client_id_);
// At this point "this" is deleted!
}
diff --git a/content/common/gpu/gpu_channel.h b/content/common/gpu/gpu_channel.h
index c15067b..1e7ab78 100644
--- a/content/common/gpu/gpu_channel.h
+++ b/content/common/gpu/gpu_channel.h
@@ -41,7 +41,8 @@ class GpuChannel : public IPC::Channel::Listener,
// Takes ownership of the renderer process handle.
GpuChannel(GpuChannelManager* gpu_channel_manager,
GpuWatchdog* watchdog,
- int renderer_id,
+ gfx::GLShareGroup* share_group,
+ int client_id,
bool software);
virtual ~GpuChannel();
@@ -141,8 +142,8 @@ class GpuChannel : public IPC::Channel::Listener,
std::deque<IPC::Message*> deferred_messages_;
- // The id of the renderer who is on the other side of the channel.
- int renderer_id_;
+ // The id of the client who is on the other side of the channel.
+ int client_id_;
// Uniquely identifies the channel within this GPU process.
int channel_id_;
diff --git a/content/common/gpu/gpu_channel_manager.cc b/content/common/gpu/gpu_channel_manager.cc
index 44c946e..880d741 100644
--- a/content/common/gpu/gpu_channel_manager.cc
+++ b/content/common/gpu/gpu_channel_manager.cc
@@ -27,8 +27,8 @@ GpuChannelManager::~GpuChannelManager() {
gpu_channels_.clear();
}
-void GpuChannelManager::RemoveChannel(int renderer_id) {
- gpu_channels_.erase(renderer_id);
+void GpuChannelManager::RemoveChannel(int client_id) {
+ gpu_channels_.erase(client_id);
}
int GpuChannelManager::GenerateRouteID() {
@@ -45,8 +45,8 @@ void GpuChannelManager::RemoveRoute(int32 routing_id) {
gpu_child_thread_->RemoveRoute(routing_id);
}
-GpuChannel* GpuChannelManager::LookupChannel(int32 renderer_id) {
- GpuChannelMap::const_iterator iter = gpu_channels_.find(renderer_id);
+GpuChannel* GpuChannelManager::LookupChannel(int32 client_id) {
+ GpuChannelMap::const_iterator iter = gpu_channels_.find(client_id);
if (iter == gpu_channels_.end())
return NULL;
else
@@ -70,15 +70,23 @@ bool GpuChannelManager::Send(IPC::Message* msg) {
return gpu_child_thread_->Send(msg);
}
-void GpuChannelManager::OnEstablishChannel(int renderer_id) {
+void GpuChannelManager::OnEstablishChannel(int client_id, int share_client_id) {
IPC::ChannelHandle channel_handle;
+ gfx::GLShareGroup* share_group = NULL;
+ if (share_client_id) {
+ GpuChannel* share_channel = gpu_channels_[share_client_id];
+ DCHECK(share_channel);
+ share_group = share_channel->share_group();
+ }
+
scoped_refptr<GpuChannel> channel = new GpuChannel(this,
watchdog_,
- renderer_id,
+ share_group,
+ client_id,
false);
if (channel->Init(io_message_loop_, shutdown_event_)) {
- gpu_channels_[renderer_id] = channel;
+ gpu_channels_[client_id] = channel;
channel_handle.name = channel->GetChannelName();
#if defined(OS_POSIX)
@@ -109,12 +117,12 @@ void GpuChannelManager::OnCloseChannel(
void GpuChannelManager::OnCreateViewCommandBuffer(
gfx::PluginWindowHandle window,
int32 render_view_id,
- int32 renderer_id,
+ int32 client_id,
const GPUCreateCommandBufferConfig& init_params) {
DCHECK(render_view_id);
int32 route_id = MSG_ROUTING_NONE;
- GpuChannelMap::const_iterator iter = gpu_channels_.find(renderer_id);
+ GpuChannelMap::const_iterator iter = gpu_channels_.find(client_id);
if (iter != gpu_channels_.end()) {
iter->second->CreateViewCommandBuffer(
window, render_view_id, init_params, &route_id);
diff --git a/content/common/gpu/gpu_channel_manager.h b/content/common/gpu/gpu_channel_manager.h
index db0db36..f48c538 100644
--- a/content/common/gpu/gpu_channel_manager.h
+++ b/content/common/gpu/gpu_channel_manager.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -48,7 +48,7 @@ class GpuChannelManager : public IPC::Channel::Listener,
virtual ~GpuChannelManager();
// Remove the channel for a particular renderer.
- void RemoveChannel(int renderer_id);
+ void RemoveChannel(int client_id);
// Listener overrides.
virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
@@ -64,18 +64,18 @@ class GpuChannelManager : public IPC::Channel::Listener,
void AddRoute(int32 routing_id, IPC::Channel::Listener* listener);
void RemoveRoute(int32 routing_id);
- GpuChannel* LookupChannel(int32 renderer_id);
+ GpuChannel* LookupChannel(int32 client_id);
private:
// Message handlers.
- void OnEstablishChannel(int renderer_id);
+ void OnEstablishChannel(int client_id, int share_client_id);
void OnCloseChannel(const IPC::ChannelHandle& channel_handle);
void OnVisibilityChanged(
- int32 render_view_id, int32 renderer_id, bool visible);
+ int32 render_view_id, int32 client_id, bool visible);
void OnCreateViewCommandBuffer(
gfx::PluginWindowHandle window,
int32 render_view_id,
- int32 renderer_id,
+ int32 client_id,
const GPUCreateCommandBufferConfig& init_params);
void OnLoseAllContexts();
diff --git a/content/common/gpu/gpu_command_buffer_stub.cc b/content/common/gpu/gpu_command_buffer_stub.cc
index c27769c9..cb51128 100644
--- a/content/common/gpu/gpu_command_buffer_stub.cc
+++ b/content/common/gpu/gpu_command_buffer_stub.cc
@@ -30,7 +30,7 @@ GpuCommandBufferStub::GpuCommandBufferStub(
const std::vector<int32>& attribs,
gfx::GpuPreference gpu_preference,
int32 route_id,
- int32 renderer_id,
+ int32 client_id,
int32 render_view_id,
GpuWatchdog* watchdog,
bool software)
@@ -44,7 +44,7 @@ GpuCommandBufferStub::GpuCommandBufferStub(
route_id_(route_id),
software_(software),
last_flush_count_(0),
- renderer_id_(renderer_id),
+ client_id_(client_id),
render_view_id_(render_view_id),
parent_stub_for_initialization_(),
parent_texture_for_initialization_(0),
@@ -63,7 +63,7 @@ GpuCommandBufferStub::~GpuCommandBufferStub() {
GpuChannelManager* gpu_channel_manager = channel_->gpu_channel_manager();
gpu_channel_manager->Send(new GpuHostMsg_DestroyCommandBuffer(
- handle_, renderer_id_, render_view_id_));
+ handle_, client_id_, render_view_id_));
}
bool GpuCommandBufferStub::OnMessageReceived(const IPC::Message& message) {
@@ -196,7 +196,7 @@ void GpuCommandBufferStub::OnInitialize(
surface_ = ImageTransportSurface::CreateSurface(
channel_->gpu_channel_manager(),
render_view_id_,
- renderer_id_,
+ client_id_,
route_id_,
handle_);
} else {
diff --git a/content/common/gpu/gpu_command_buffer_stub.h b/content/common/gpu/gpu_command_buffer_stub.h
index b8cdc4e..8796181 100644
--- a/content/common/gpu/gpu_command_buffer_stub.h
+++ b/content/common/gpu/gpu_command_buffer_stub.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -49,7 +49,7 @@ class GpuCommandBufferStub
const std::vector<int32>& attribs,
gfx::GpuPreference gpu_preference,
int32 route_id,
- int32 renderer_id,
+ int32 client_id,
int32 render_view_id,
GpuWatchdog* watchdog,
bool software);
@@ -75,7 +75,7 @@ class GpuCommandBufferStub
gpu::GpuScheduler* scheduler() const { return scheduler_.get(); }
// Identifies the renderer process.
- int32 renderer_id() const { return renderer_id_; }
+ int32 client_id() const { return client_id_; }
// Identifies a particular renderer belonging to the same renderer process.
int32 render_view_id() const { return render_view_id_; }
@@ -148,7 +148,7 @@ class GpuCommandBufferStub
// The following two fields are used on Mac OS X to identify the window
// for the rendering results on the browser side.
- int32 renderer_id_;
+ int32 client_id_;
int32 render_view_id_;
scoped_ptr<gpu::CommandBufferService> command_buffer_;
diff --git a/content/common/gpu/gpu_messages.h b/content/common/gpu/gpu_messages.h
index e1bbca3..06f7d0f 100644
--- a/content/common/gpu/gpu_messages.h
+++ b/content/common/gpu/gpu_messages.h
@@ -34,7 +34,7 @@ IPC_STRUCT_BEGIN(GPUCreateCommandBufferConfig)
IPC_STRUCT_END()
IPC_STRUCT_BEGIN(GpuHostMsg_AcceleratedSurfaceNew_Params)
- IPC_STRUCT_MEMBER(int32, renderer_id)
+ IPC_STRUCT_MEMBER(int32, client_id)
IPC_STRUCT_MEMBER(int32, render_view_id)
IPC_STRUCT_MEMBER(int32, width)
IPC_STRUCT_MEMBER(int32, height)
@@ -47,7 +47,7 @@ IPC_STRUCT_BEGIN(GpuHostMsg_AcceleratedSurfaceNew_Params)
IPC_STRUCT_END()
IPC_STRUCT_BEGIN(GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params)
- IPC_STRUCT_MEMBER(int32, renderer_id)
+ IPC_STRUCT_MEMBER(int32, client_id)
IPC_STRUCT_MEMBER(int32, render_view_id)
IPC_STRUCT_MEMBER(uint64, surface_id)
IPC_STRUCT_MEMBER(int32, route_id)
@@ -59,7 +59,7 @@ IPC_STRUCT_BEGIN(GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params)
IPC_STRUCT_END()
IPC_STRUCT_BEGIN(GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params)
- IPC_STRUCT_MEMBER(int32, renderer_id)
+ IPC_STRUCT_MEMBER(int32, client_id)
IPC_STRUCT_MEMBER(int32, render_view_id)
IPC_STRUCT_MEMBER(uint64, surface_id)
IPC_STRUCT_MEMBER(int32, route_id)
@@ -73,7 +73,7 @@ IPC_STRUCT_BEGIN(GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params)
IPC_STRUCT_END()
IPC_STRUCT_BEGIN(GpuHostMsg_AcceleratedSurfaceRelease_Params)
- IPC_STRUCT_MEMBER(int32, renderer_id)
+ IPC_STRUCT_MEMBER(int32, client_id)
IPC_STRUCT_MEMBER(int32, render_view_id)
IPC_STRUCT_MEMBER(uint64, identifier)
IPC_STRUCT_MEMBER(int32, route_id)
@@ -131,12 +131,13 @@ IPC_ENUM_TRAITS(media::VideoDecodeAccelerator::Profile)
IPC_MESSAGE_CONTROL0(GpuMsg_Initialize)
// Tells the GPU process to create a new channel for communication with a
-// given renderer. The channel name is returned in a
-// GpuHostMsg_ChannelEstablished message. The renderer ID is passed so that
+// given client. The channel name is returned in a
+// GpuHostMsg_ChannelEstablished message. The client ID is passed so that
// the GPU process reuses an existing channel to that process if it exists.
// This ID is a unique opaque identifier generated by the browser process.
-IPC_MESSAGE_CONTROL1(GpuMsg_EstablishChannel,
- int /* renderer_id */)
+IPC_MESSAGE_CONTROL2(GpuMsg_EstablishChannel,
+ int /* client_id */,
+ int /* share_client_id */)
// Tells the GPU process to close the channel identified by IPC channel
// handle. If no channel can be identified, do nothing.
@@ -148,7 +149,7 @@ IPC_MESSAGE_CONTROL1(GpuMsg_CloseChannel,
IPC_MESSAGE_CONTROL4(GpuMsg_CreateViewCommandBuffer,
gfx::PluginWindowHandle, /* compositing_surface */
int32, /* render_view_id */
- int32, /* renderer_id */
+ int32, /* client_id */
GPUCreateCommandBufferConfig /* init_params */)
// Tells the GPU process to create a context for collecting graphics card
@@ -214,7 +215,7 @@ IPC_MESSAGE_CONTROL1(GpuHostMsg_CommandBufferCreated,
IPC_MESSAGE_CONTROL3(GpuHostMsg_DestroyCommandBuffer,
gfx::PluginWindowHandle, /* view */
int32, /* render_view_id */
- int32 /* renderer_id */)
+ int32 /* client_id */)
// Response from GPU to a GpuMsg_CollectGraphicsInfo.
IPC_MESSAGE_CONTROL1(GpuHostMsg_GraphicsInfoCollected,
@@ -229,7 +230,7 @@ IPC_MESSAGE_CONTROL3(GpuHostMsg_OnLogMessage,
// Resize the window that is being drawn into. It's important that this
// resize be synchronized with the swapping of the front and back buffers.
IPC_MESSAGE_CONTROL4(GpuHostMsg_ResizeView,
- int32 /* renderer_id */,
+ int32 /* client_id */,
int32 /* render_view_id */,
int32 /* route_id */,
gfx::Size /* size */)
diff --git a/content/common/gpu/image_transport_surface.cc b/content/common/gpu/image_transport_surface.cc
index d1939f2..12b05e5 100644
--- a/content/common/gpu/image_transport_surface.cc
+++ b/content/common/gpu/image_transport_surface.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -23,13 +23,13 @@ ImageTransportSurface::~ImageTransportSurface() {
ImageTransportHelper::ImageTransportHelper(ImageTransportSurface* surface,
GpuChannelManager* manager,
int32 render_view_id,
- int32 renderer_id,
+ int32 client_id,
int32 command_buffer_id,
gfx::PluginWindowHandle handle)
: surface_(surface),
manager_(manager),
render_view_id_(render_view_id),
- renderer_id_(renderer_id),
+ client_id_(client_id),
command_buffer_id_(command_buffer_id),
handle_(handle) {
route_id_ = manager_->GenerateRouteID();
@@ -72,7 +72,7 @@ bool ImageTransportHelper::OnMessageReceived(const IPC::Message& message) {
void ImageTransportHelper::SendAcceleratedSurfaceRelease(
GpuHostMsg_AcceleratedSurfaceRelease_Params params) {
- params.renderer_id = renderer_id_;
+ params.client_id = client_id_;
params.render_view_id = render_view_id_;
params.route_id = route_id_;
manager_->Send(new GpuHostMsg_AcceleratedSurfaceRelease(params));
@@ -80,7 +80,7 @@ void ImageTransportHelper::SendAcceleratedSurfaceRelease(
void ImageTransportHelper::SendAcceleratedSurfaceNew(
GpuHostMsg_AcceleratedSurfaceNew_Params params) {
- params.renderer_id = renderer_id_;
+ params.client_id = client_id_;
params.render_view_id = render_view_id_;
params.route_id = route_id_;
#if defined(OS_MACOSX)
@@ -91,7 +91,7 @@ void ImageTransportHelper::SendAcceleratedSurfaceNew(
void ImageTransportHelper::SendAcceleratedSurfaceBuffersSwapped(
GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params params) {
- params.renderer_id = renderer_id_;
+ params.client_id = client_id_;
params.render_view_id = render_view_id_;
params.route_id = route_id_;
#if defined(OS_MACOSX)
@@ -102,7 +102,7 @@ void ImageTransportHelper::SendAcceleratedSurfaceBuffersSwapped(
void ImageTransportHelper::SendAcceleratedSurfacePostSubBuffer(
GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params params) {
- params.renderer_id = renderer_id_;
+ params.client_id = client_id_;
params.render_view_id = render_view_id_;
params.route_id = route_id_;
#if defined(OS_MACOSX)
@@ -112,7 +112,7 @@ void ImageTransportHelper::SendAcceleratedSurfacePostSubBuffer(
}
void ImageTransportHelper::SendResizeView(const gfx::Size& size) {
- manager_->Send(new GpuHostMsg_ResizeView(renderer_id_,
+ manager_->Send(new GpuHostMsg_ResizeView(client_id_,
render_view_id_,
route_id_,
size));
@@ -169,7 +169,7 @@ void ImageTransportHelper::Resize(gfx::Size size) {
}
void ImageTransportHelper::SetSwapInterval() {
- GpuChannel* channel = manager_->LookupChannel(renderer_id_);
+ GpuChannel* channel = manager_->LookupChannel(client_id_);
if (!channel)
return;
@@ -189,7 +189,7 @@ bool ImageTransportHelper::MakeCurrent() {
}
gpu::GpuScheduler* ImageTransportHelper::Scheduler() {
- GpuChannel* channel = manager_->LookupChannel(renderer_id_);
+ GpuChannel* channel = manager_->LookupChannel(client_id_);
if (!channel)
return NULL;
@@ -202,7 +202,7 @@ gpu::GpuScheduler* ImageTransportHelper::Scheduler() {
}
gpu::gles2::GLES2Decoder* ImageTransportHelper::Decoder() {
- GpuChannel* channel = manager_->LookupChannel(renderer_id_);
+ GpuChannel* channel = manager_->LookupChannel(client_id_);
if (!channel)
return NULL;
@@ -217,13 +217,13 @@ gpu::gles2::GLES2Decoder* ImageTransportHelper::Decoder() {
PassThroughImageTransportSurface::PassThroughImageTransportSurface(
GpuChannelManager* manager,
int32 render_view_id,
- int32 renderer_id,
+ int32 client_id,
int32 command_buffer_id,
gfx::GLSurface* surface) : GLSurfaceAdapter(surface) {
helper_.reset(new ImageTransportHelper(this,
manager,
render_view_id,
- renderer_id,
+ client_id,
command_buffer_id,
gfx::kNullPluginWindow));
}
diff --git a/content/common/gpu/image_transport_surface.h b/content/common/gpu/image_transport_surface.h
index a34ae33..8801ba2 100644
--- a/content/common/gpu/image_transport_surface.h
+++ b/content/common/gpu/image_transport_surface.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -67,7 +67,7 @@ class ImageTransportSurface {
static scoped_refptr<gfx::GLSurface>
CreateSurface(GpuChannelManager* manager,
int32 render_view_id,
- int32 renderer_id,
+ int32 client_id,
int32 command_buffer_id,
gfx::PluginWindowHandle handle);
private:
@@ -80,7 +80,7 @@ class ImageTransportHelper : public IPC::Channel::Listener {
ImageTransportHelper(ImageTransportSurface* surface,
GpuChannelManager* manager,
int32 render_view_id,
- int32 renderer_id,
+ int32 client_id,
int32 command_buffer_id,
gfx::PluginWindowHandle handle);
virtual ~ImageTransportHelper();
@@ -132,7 +132,7 @@ class ImageTransportHelper : public IPC::Channel::Listener {
GpuChannelManager* manager_;
int32 render_view_id_;
- int32 renderer_id_;
+ int32 client_id_;
int32 command_buffer_id_;
int32 route_id_;
gfx::PluginWindowHandle handle_;
@@ -148,7 +148,7 @@ class PassThroughImageTransportSurface
public:
PassThroughImageTransportSurface(GpuChannelManager* manager,
int32 render_view_id,
- int32 renderer_id,
+ int32 client_id,
int32 command_buffer_id,
gfx::GLSurface* surface);
virtual ~PassThroughImageTransportSurface();
diff --git a/content/common/gpu/image_transport_surface_linux.cc b/content/common/gpu/image_transport_surface_linux.cc
index 87a197d..405de37 100644
--- a/content/common/gpu/image_transport_surface_linux.cc
+++ b/content/common/gpu/image_transport_surface_linux.cc
@@ -62,7 +62,7 @@ class EGLImageTransportSurface
public:
EGLImageTransportSurface(GpuChannelManager* manager,
int32 render_view_id,
- int32 renderer_id,
+ int32 client_id,
int32 command_buffer_id);
// gfx::GLSurface implementation
@@ -113,7 +113,7 @@ class GLXImageTransportSurface
public:
GLXImageTransportSurface(GpuChannelManager* manager,
int32 render_view_id,
- int32 renderer_id,
+ int32 client_id,
int32 command_buffer_id);
// gfx::GLSurface implementation:
@@ -169,7 +169,7 @@ class OSMesaImageTransportSurface : public ImageTransportSurface,
public:
OSMesaImageTransportSurface(GpuChannelManager* manager,
int32 render_view_id,
- int32 renderer_id,
+ int32 client_id,
int32 command_buffer_id);
// gfx::GLSurface implementation:
@@ -245,7 +245,7 @@ EGLAcceleratedSurface::~EGLAcceleratedSurface() {
EGLImageTransportSurface::EGLImageTransportSurface(
GpuChannelManager* manager,
int32 render_view_id,
- int32 renderer_id,
+ int32 client_id,
int32 command_buffer_id)
: gfx::PbufferGLSurfaceEGL(false, gfx::Size(1, 1)),
fbo_id_(0),
@@ -253,7 +253,7 @@ EGLImageTransportSurface::EGLImageTransportSurface(
helper_.reset(new ImageTransportHelper(this,
manager,
render_view_id,
- renderer_id,
+ client_id,
command_buffer_id,
gfx::kNullPluginWindow));
}
@@ -424,7 +424,7 @@ void EGLImageTransportSurface::OnResizeViewACK() {
GLXImageTransportSurface::GLXImageTransportSurface(
GpuChannelManager* manager,
int32 render_view_id,
- int32 renderer_id,
+ int32 client_id,
int32 command_buffer_id)
: gfx::NativeViewGLSurfaceGLX(),
dummy_parent_(0),
@@ -435,7 +435,7 @@ GLXImageTransportSurface::GLXImageTransportSurface(
helper_.reset(new ImageTransportHelper(this,
manager,
render_view_id,
- renderer_id,
+ client_id,
command_buffer_id,
gfx::kNullPluginWindow));
}
@@ -645,14 +645,14 @@ void GLXImageTransportSurface::OnResizeViewACK() {
OSMesaImageTransportSurface::OSMesaImageTransportSurface(
GpuChannelManager* manager,
int32 render_view_id,
- int32 renderer_id,
+ int32 client_id,
int32 command_buffer_id)
: gfx::GLSurfaceOSMesa(OSMESA_RGBA, gfx::Size(1, 1)),
size_(gfx::Size(1, 1)) {
helper_.reset(new ImageTransportHelper(this,
manager,
render_view_id,
- renderer_id,
+ client_id,
command_buffer_id,
gfx::kNullPluginWindow));
}
@@ -794,7 +794,7 @@ gfx::Size OSMesaImageTransportSurface::GetSize() {
scoped_refptr<gfx::GLSurface> ImageTransportSurface::CreateSurface(
GpuChannelManager* manager,
int32 render_view_id,
- int32 renderer_id,
+ int32 client_id,
int32 command_buffer_id,
gfx::PluginWindowHandle handle) {
scoped_refptr<gfx::GLSurface> surface;
@@ -803,19 +803,19 @@ scoped_refptr<gfx::GLSurface> ImageTransportSurface::CreateSurface(
case gfx::kGLImplementationDesktopGL:
surface = new GLXImageTransportSurface(manager,
render_view_id,
- renderer_id,
+ client_id,
command_buffer_id);
break;
case gfx::kGLImplementationEGLGLES2:
surface = new EGLImageTransportSurface(manager,
render_view_id,
- renderer_id,
+ client_id,
command_buffer_id);
break;
case gfx::kGLImplementationOSMesaGL:
surface = new OSMesaImageTransportSurface(manager,
render_view_id,
- renderer_id,
+ client_id,
command_buffer_id);
break;
default:
@@ -829,7 +829,7 @@ scoped_refptr<gfx::GLSurface> ImageTransportSurface::CreateSurface(
surface = new PassThroughImageTransportSurface(manager,
render_view_id,
- renderer_id,
+ client_id,
command_buffer_id,
surface.get());
#endif
diff --git a/content/common/gpu/image_transport_surface_mac.cc b/content/common/gpu/image_transport_surface_mac.cc
index 5bcadc4..47662db 100644
--- a/content/common/gpu/image_transport_surface_mac.cc
+++ b/content/common/gpu/image_transport_surface_mac.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -25,7 +25,7 @@ class IOSurfaceImageTransportSurface : public gfx::NoOpGLSurfaceCGL,
public:
IOSurfaceImageTransportSurface(GpuChannelManager* manager,
int32 render_view_id,
- int32 renderer_id,
+ int32 client_id,
int32 command_buffer_id,
gfx::PluginWindowHandle handle);
@@ -80,7 +80,7 @@ class TransportDIBImageTransportSurface : public gfx::NoOpGLSurfaceCGL,
public:
TransportDIBImageTransportSurface(GpuChannelManager* manager,
int32 render_view_id,
- int32 renderer_id,
+ int32 client_id,
int32 command_buffer_id,
gfx::PluginWindowHandle handle);
@@ -144,7 +144,7 @@ void AddIntegerValue(CFMutableDictionaryRef dictionary,
IOSurfaceImageTransportSurface::IOSurfaceImageTransportSurface(
GpuChannelManager* manager,
int32 render_view_id,
- int32 renderer_id,
+ int32 client_id,
int32 command_buffer_id,
gfx::PluginWindowHandle handle)
: gfx::NoOpGLSurfaceCGL(gfx::Size(1, 1)),
@@ -156,7 +156,7 @@ IOSurfaceImageTransportSurface::IOSurfaceImageTransportSurface(
helper_.reset(new ImageTransportHelper(this,
manager,
render_view_id,
- renderer_id,
+ client_id,
command_buffer_id,
handle));
@@ -372,7 +372,7 @@ void IOSurfaceImageTransportSurface::OnResize(gfx::Size size) {
TransportDIBImageTransportSurface::TransportDIBImageTransportSurface(
GpuChannelManager* manager,
int32 render_view_id,
- int32 renderer_id,
+ int32 client_id,
int32 command_buffer_id,
gfx::PluginWindowHandle handle)
: gfx::NoOpGLSurfaceCGL(gfx::Size(1, 1)),
@@ -382,7 +382,7 @@ TransportDIBImageTransportSurface::TransportDIBImageTransportSurface(
helper_.reset(new ImageTransportHelper(this,
manager,
render_view_id,
- renderer_id,
+ client_id,
command_buffer_id,
handle));
@@ -583,7 +583,7 @@ void TransportDIBImageTransportSurface::OnResize(gfx::Size size) {
scoped_refptr<gfx::GLSurface> ImageTransportSurface::CreateSurface(
GpuChannelManager* manager,
int32 render_view_id,
- int32 renderer_id,
+ int32 client_id,
int32 command_buffer_id,
gfx::PluginWindowHandle handle) {
scoped_refptr<gfx::GLSurface> surface;
@@ -595,13 +595,13 @@ scoped_refptr<gfx::GLSurface> ImageTransportSurface::CreateSurface(
if (!io_surface_support) {
surface = new TransportDIBImageTransportSurface(manager,
render_view_id,
- renderer_id,
+ client_id,
command_buffer_id,
handle);
} else {
surface = new IOSurfaceImageTransportSurface(manager,
render_view_id,
- renderer_id,
+ client_id,
command_buffer_id,
handle);
}
diff --git a/content/common/gpu/image_transport_surface_win.cc b/content/common/gpu/image_transport_surface_win.cc
index f5177f1..cd5c8b7 100644
--- a/content/common/gpu/image_transport_surface_win.cc
+++ b/content/common/gpu/image_transport_surface_win.cc
@@ -32,7 +32,7 @@ class PbufferImageTransportSurface
public:
PbufferImageTransportSurface(GpuChannelManager* manager,
int32 render_view_id,
- int32 renderer_id,
+ int32 client_id,
int32 command_buffer_id);
// gfx::GLSurface implementation
@@ -71,7 +71,7 @@ class PbufferImageTransportSurface
PbufferImageTransportSurface::PbufferImageTransportSurface(
GpuChannelManager* manager,
int32 render_view_id,
- int32 renderer_id,
+ int32 client_id,
int32 command_buffer_id)
: GLSurfaceAdapter(new gfx::PbufferGLSurfaceEGL(false,
gfx::Size(1, 1))),
@@ -79,7 +79,7 @@ PbufferImageTransportSurface::PbufferImageTransportSurface(
helper_.reset(new ImageTransportHelper(this,
manager,
render_view_id,
- renderer_id,
+ client_id,
command_buffer_id,
gfx::kNullPluginWindow));
}
@@ -187,7 +187,7 @@ void PbufferImageTransportSurface::OnResize(gfx::Size size) {
scoped_refptr<gfx::GLSurface> ImageTransportSurface::CreateSurface(
GpuChannelManager* manager,
int32 render_view_id,
- int32 renderer_id,
+ int32 client_id,
int32 command_buffer_id,
gfx::PluginWindowHandle handle) {
scoped_refptr<gfx::GLSurface> surface;
@@ -201,7 +201,7 @@ scoped_refptr<gfx::GLSurface> ImageTransportSurface::CreateSurface(
strstr(extensions, "EGL_ANGLE_surface_d3d_texture_2d_share_handle")) {
surface = new PbufferImageTransportSurface(manager,
render_view_id,
- renderer_id,
+ client_id,
command_buffer_id);
}
}
@@ -213,7 +213,7 @@ scoped_refptr<gfx::GLSurface> ImageTransportSurface::CreateSurface(
surface = new PassThroughImageTransportSurface(manager,
render_view_id,
- renderer_id,
+ client_id,
command_buffer_id,
surface.get());
}