diff options
Diffstat (limited to 'content')
-rw-r--r-- | content/browser/gpu/browser_gpu_channel_host_factory.cc | 66 | ||||
-rw-r--r-- | content/browser/gpu/browser_gpu_channel_host_factory.h | 14 | ||||
-rw-r--r-- | content/browser/gpu/gpu_process_host.cc | 43 | ||||
-rw-r--r-- | content/browser/gpu/gpu_process_host.h | 19 | ||||
-rw-r--r-- | content/common/gpu/client/gpu_channel_host.h | 7 | ||||
-rw-r--r-- | content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc | 5 | ||||
-rw-r--r-- | content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h | 3 | ||||
-rw-r--r-- | content/common/gpu/gpu_channel.cc | 38 | ||||
-rw-r--r-- | content/common/gpu/gpu_channel.h | 10 | ||||
-rw-r--r-- | content/common/gpu/gpu_channel_manager.cc | 87 | ||||
-rw-r--r-- | content/common/gpu/gpu_channel_manager.h | 20 | ||||
-rw-r--r-- | content/common/gpu/gpu_command_buffer_stub.cc | 2 | ||||
-rw-r--r-- | content/common/gpu/gpu_command_buffer_stub.h | 2 | ||||
-rw-r--r-- | content/common/gpu/gpu_messages.h | 17 | ||||
-rw-r--r-- | content/renderer/render_thread_impl.cc | 11 | ||||
-rw-r--r-- | content/renderer/render_thread_impl.h | 5 |
16 files changed, 1 insertions, 348 deletions
diff --git a/content/browser/gpu/browser_gpu_channel_host_factory.cc b/content/browser/gpu/browser_gpu_channel_host_factory.cc index 49717b4..11d7287 100644 --- a/content/browser/gpu/browser_gpu_channel_host_factory.cc +++ b/content/browser/gpu/browser_gpu_channel_host_factory.cc @@ -134,72 +134,6 @@ int32 BrowserGpuChannelHostFactory::CreateViewCommandBuffer( return request.route_id; } -void BrowserGpuChannelHostFactory::CreateImageOnIO( - gfx::PluginWindowHandle window, - int32 image_id, - const CreateImageCallback& callback) { - GpuProcessHost* host = GpuProcessHost::FromID(gpu_host_id_); - if (!host) { - ImageCreatedOnIO(callback, gfx::Size()); - return; - } - - host->CreateImage( - window, - gpu_client_id_, - image_id, - base::Bind(&BrowserGpuChannelHostFactory::ImageCreatedOnIO, callback)); -} - -// static -void BrowserGpuChannelHostFactory::ImageCreatedOnIO( - const CreateImageCallback& callback, const gfx::Size size) { - BrowserThread::PostTask( - BrowserThread::UI, - FROM_HERE, - base::Bind(&BrowserGpuChannelHostFactory::OnImageCreated, - callback, size)); -} - -// static -void BrowserGpuChannelHostFactory::OnImageCreated( - const CreateImageCallback& callback, const gfx::Size size) { - callback.Run(size); -} - -void BrowserGpuChannelHostFactory::CreateImage( - gfx::PluginWindowHandle window, - int32 image_id, - const CreateImageCallback& callback) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); - GetIOLoopProxy()->PostTask(FROM_HERE, base::Bind( - &BrowserGpuChannelHostFactory::CreateImageOnIO, - base::Unretained(this), - window, - image_id, - callback)); -} - -void BrowserGpuChannelHostFactory::DeleteImageOnIO( - int32 image_id, int32 sync_point) { - GpuProcessHost* host = GpuProcessHost::FromID(gpu_host_id_); - if (!host) { - return; - } - - host->DeleteImage(gpu_client_id_, image_id, sync_point); -} - -void BrowserGpuChannelHostFactory::DeleteImage( - int32 image_id, int32 sync_point) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); - GetIOLoopProxy()->PostTask(FROM_HERE, base::Bind( - &BrowserGpuChannelHostFactory::DeleteImageOnIO, - base::Unretained(this), - image_id, - sync_point)); -} - void BrowserGpuChannelHostFactory::EstablishGpuChannelOnIO( EstablishRequest* request) { GpuProcessHost* host = GpuProcessHost::FromID(gpu_host_id_); diff --git a/content/browser/gpu/browser_gpu_channel_host_factory.h b/content/browser/gpu/browser_gpu_channel_host_factory.h index 83140b3..13058e5 100644 --- a/content/browser/gpu/browser_gpu_channel_host_factory.h +++ b/content/browser/gpu/browser_gpu_channel_host_factory.h @@ -31,11 +31,6 @@ class BrowserGpuChannelHostFactory : public GpuChannelHostFactory { virtual int32 CreateViewCommandBuffer( int32 surface_id, const GPUCreateCommandBufferConfig& init_params) OVERRIDE; - virtual void CreateImage( - gfx::PluginWindowHandle window, - int32 image_id, - const CreateImageCallback& callback) OVERRIDE; - virtual void DeleteImage(int32 image_idu, int32 sync_point) OVERRIDE; virtual GpuChannelHost* EstablishGpuChannelSync( CauseForGpuLaunch cause_for_gpu_launch) OVERRIDE; @@ -67,15 +62,6 @@ class BrowserGpuChannelHostFactory : public GpuChannelHostFactory { int32 surface_id, const GPUCreateCommandBufferConfig& init_params); static void CommandBufferCreatedOnIO(CreateRequest* request, int32 route_id); - void CreateImageOnIO( - gfx::PluginWindowHandle window, - int32 image_id, - const CreateImageCallback& callback); - static void ImageCreatedOnIO( - const CreateImageCallback& callback, const gfx::Size size); - static void OnImageCreated( - const CreateImageCallback& callback, const gfx::Size size); - void DeleteImageOnIO(int32 image_id, int32 sync_point); void EstablishGpuChannelOnIO(EstablishRequest* request); void GpuChannelEstablishedOnIO( EstablishRequest* request, diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc index 618e014..b168118 100644 --- a/content/browser/gpu/gpu_process_host.cc +++ b/content/browser/gpu/gpu_process_host.cc @@ -478,7 +478,6 @@ bool GpuProcessHost::OnMessageReceived(const IPC::Message& message) { IPC_MESSAGE_HANDLER(GpuHostMsg_ChannelEstablished, OnChannelEstablished) IPC_MESSAGE_HANDLER(GpuHostMsg_CommandBufferCreated, OnCommandBufferCreated) IPC_MESSAGE_HANDLER(GpuHostMsg_DestroyCommandBuffer, OnDestroyCommandBuffer) - IPC_MESSAGE_HANDLER(GpuHostMsg_ImageCreated, OnImageCreated) #if defined(OS_MACOSX) IPC_MESSAGE_HANDLER(GpuHostMsg_AcceleratedSurfaceBuffersSwapped, OnAcceleratedSurfaceBuffersSwapped) @@ -567,33 +566,6 @@ void GpuProcessHost::CreateViewCommandBuffer( } } -void GpuProcessHost::CreateImage( - gfx::PluginWindowHandle window, - int client_id, - int image_id, - const CreateImageCallback& callback) { - TRACE_EVENT0("gpu", "GpuProcessHostUIShim::CreateImage"); - - DCHECK(CalledOnValidThread()); - - if (Send(new GpuMsg_CreateImage(window, client_id, image_id))) { - create_image_requests_.push(callback); - } else { - CreateImageError(callback, gfx::Size()); - } -} - -void GpuProcessHost::DeleteImage( - int client_id, - int image_id, - int sync_point) { - TRACE_EVENT0("gpu", "GpuProcessHostUIShim::DeleteImage"); - - DCHECK(CalledOnValidThread()); - - Send(new GpuMsg_DeleteImage(client_id, image_id, sync_point)); -} - void GpuProcessHost::OnInitialized(bool result) { UMA_HISTOGRAM_BOOLEAN("GPU.GPUProcessInitialized", result); } @@ -649,16 +621,6 @@ void GpuProcessHost::OnDestroyCommandBuffer(int32 surface_id) { #endif // defined(TOOLKIT_GTK) } -void GpuProcessHost::OnImageCreated(const gfx::Size size) { - TRACE_EVENT0("gpu", "GpuProcessHost::OnImageCreated"); - - if (!create_image_requests_.empty()) { - CreateImageCallback callback = create_image_requests_.front(); - create_image_requests_.pop(); - callback.Run(size); - } -} - #if defined(OS_MACOSX) void GpuProcessHost::OnAcceleratedSurfaceBuffersSwapped( const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params) { @@ -952,8 +914,3 @@ void GpuProcessHost::CreateCommandBufferError( const CreateCommandBufferCallback& callback, int32 route_id) { callback.Run(route_id); } - -void GpuProcessHost::CreateImageError( - const CreateImageCallback& callback, const gfx::Size size) { - callback.Run(size); -} diff --git a/content/browser/gpu/gpu_process_host.h b/content/browser/gpu/gpu_process_host.h index 1ecd7d3..f4b8341 100644 --- a/content/browser/gpu/gpu_process_host.h +++ b/content/browser/gpu/gpu_process_host.h @@ -20,7 +20,6 @@ #include "content/public/common/gpu_info.h" #include "ipc/ipc_sender.h" #include "ui/gfx/native_widget_types.h" -#include "ui/gfx/size.h" class GpuMainThread; struct GPUCreateCommandBufferConfig; @@ -50,8 +49,6 @@ class GpuProcessHost : public content::BrowserChildProcessHostDelegate, typedef base::Callback<void(int32)> CreateCommandBufferCallback; - typedef base::Callback<void(const gfx::Size)> CreateImageCallback; - static bool gpu_enabled() { return gpu_enabled_; } // Creates a new GpuProcessHost or gets an existing one, resulting in the @@ -93,16 +90,6 @@ class GpuProcessHost : public content::BrowserChildProcessHostDelegate, const GPUCreateCommandBufferConfig& init_params, const CreateCommandBufferCallback& callback); - // Tells the GPU process to create a new image using the given window. - void CreateImage( - gfx::PluginWindowHandle window, - int client_id, - int image_id, - const CreateImageCallback& callback); - - // Tells the GPU process to delete image. - void DeleteImage(int client_id, int image_id, int sync_point); - // Whether this GPU process is set up to use software rendering. bool software_rendering(); @@ -133,7 +120,6 @@ class GpuProcessHost : public content::BrowserChildProcessHostDelegate, void OnChannelEstablished(const IPC::ChannelHandle& channel_handle); void OnCommandBufferCreated(const int32 route_id); void OnDestroyCommandBuffer(int32 surface_id); - void OnImageCreated(const gfx::Size size); #if defined(OS_MACOSX) void OnAcceleratedSurfaceBuffersSwapped( @@ -160,8 +146,6 @@ class GpuProcessHost : public content::BrowserChildProcessHostDelegate, const content::GPUInfo& gpu_info); void CreateCommandBufferError(const CreateCommandBufferCallback& callback, int32 route_id); - void CreateImageError(const CreateImageCallback& callback, - const gfx::Size size); // The serial number of the GpuProcessHost / GpuProcessHostUIShim pair. int host_id_; @@ -173,9 +157,6 @@ class GpuProcessHost : public content::BrowserChildProcessHostDelegate, // The pending create command buffer requests we need to reply to. std::queue<CreateCommandBufferCallback> create_command_buffer_requests_; - // The pending create image requests we need to reply to. - std::queue<CreateImageCallback> create_image_requests_; - #if defined(TOOLKIT_GTK) // Encapsulates surfaces that we lock when creating view command buffers. // We release this lock once the command buffer (or associated GPU process) diff --git a/content/common/gpu/client/gpu_channel_host.h b/content/common/gpu/client/gpu_channel_host.h index e2567c6..2d10724 100644 --- a/content/common/gpu/client/gpu_channel_host.h +++ b/content/common/gpu/client/gpu_channel_host.h @@ -56,8 +56,6 @@ struct GpuListenerInfo { class CONTENT_EXPORT GpuChannelHostFactory { public: - typedef base::Callback<void(const gfx::Size)> CreateImageCallback; - virtual ~GpuChannelHostFactory() {} virtual bool IsMainThread() = 0; @@ -70,11 +68,6 @@ class CONTENT_EXPORT GpuChannelHostFactory { int32 surface_id, const GPUCreateCommandBufferConfig& init_params) = 0; virtual GpuChannelHost* EstablishGpuChannelSync( content::CauseForGpuLaunch) = 0; - virtual void CreateImage( - gfx::PluginWindowHandle window, - int32 image_id, - const CreateImageCallback& callback) = 0; - virtual void DeleteImage(int32 image_id, int32 sync_point) = 0; }; // Encapsulates an IPC channel between the client and one GPU process. diff --git a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc index 9a21f10..5abf63d 100644 --- a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc +++ b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc @@ -1557,11 +1557,6 @@ void WebGraphicsContext3DCommandBufferImpl::deleteVertexArrayOES( DELEGATE_TO_GL_1R(isVertexArrayOES, IsVertexArrayOES, WebGLId, WGC3Dboolean) DELEGATE_TO_GL_1(bindVertexArrayOES, BindVertexArrayOES, WebGLId) -DELEGATE_TO_GL_2(bindTexImage2DCHROMIUM, BindTexImage2DCHROMIUM, - WGC3Denum, WGC3Dint) -DELEGATE_TO_GL_2(releaseTexImage2DCHROMIUM, ReleaseTexImage2DCHROMIUM, - WGC3Denum, WGC3Dint) - GrGLInterface* WebGraphicsContext3DCommandBufferImpl::onCreateGrGLInterface() { return webkit_glue::CreateCommandBufferSkiaGLBinding(); } diff --git a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h index c8cde90..e2caa07 100644 --- a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h +++ b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h @@ -592,9 +592,6 @@ class WebGraphicsContext3DCommandBufferImpl virtual WGC3Dboolean isVertexArrayOES(WebGLId array); virtual void bindVertexArrayOES(WebGLId array); - virtual void bindTexImage2DCHROMIUM(WGC3Denum target, WGC3Dint image_id); - virtual void releaseTexImage2DCHROMIUM(WGC3Denum target, WGC3Dint image_id); - protected: virtual GrGLInterface* onCreateGrGLInterface(); diff --git a/content/common/gpu/gpu_channel.cc b/content/common/gpu/gpu_channel.cc index 106e922..43335d56 100644 --- a/content/common/gpu/gpu_channel.cc +++ b/content/common/gpu/gpu_channel.cc @@ -19,13 +19,11 @@ #include "content/common/gpu/gpu_messages.h" #include "content/common/gpu/sync_point_manager.h" #include "content/public/common/content_switches.h" -#include "gpu/command_buffer/service/image_manager.h" #include "gpu/command_buffer/service/mailbox_manager.h" #include "gpu/command_buffer/service/gpu_scheduler.h" #include "ipc/ipc_channel.h" #include "ipc/ipc_channel_proxy.h" #include "ui/gl/gl_context.h" -#include "ui/gl/gl_image.h" #include "ui/gl/gl_surface.h" #if defined(OS_POSIX) @@ -155,7 +153,6 @@ GpuChannel::GpuChannel(GpuChannelManager* gpu_channel_manager, client_id_(client_id), share_group_(share_group ? share_group : new gfx::GLShareGroup), mailbox_manager_(mailbox ? mailbox : new gpu::gles2::MailboxManager), - image_manager_(new gpu::gles2::ImageManager), watchdog_(watchdog), software_(software), handle_messages_scheduled_(false), @@ -326,7 +323,6 @@ void GpuChannel::CreateViewCommandBuffer( share_group, window, mailbox_manager_, - image_manager_, gfx::Size(), disallowed_features_, init_params.allowed_extensions, @@ -348,39 +344,6 @@ GpuCommandBufferStub* GpuChannel::LookupCommandBuffer(int32 route_id) { return stubs_.Lookup(route_id); } -void GpuChannel::CreateImage( - gfx::PluginWindowHandle window, - int32 image_id, - gfx::Size* size) { - TRACE_EVENT1("gpu", - "GpuChannel::CreateImage", - "image_id", - image_id); - - *size = gfx::Size(); - - if (image_manager_->LookupImage(image_id)) { - LOG(ERROR) << "CreateImage failed, image_id already in use."; - return; - } - - scoped_refptr<gfx::GLImage> image = gfx::GLImage::CreateGLImage(window); - if (!image) - return; - - image_manager_->AddImage(image.get(), image_id); - *size = image->GetSize(); -} - -void GpuChannel::DeleteImage(int32 image_id) { - TRACE_EVENT1("gpu", - "GpuChannel::DeleteImage", - "image_id", - image_id); - - image_manager_->RemoveImage(image_id); -} - void GpuChannel::LoseAllContexts() { gpu_channel_manager_->LoseAllContexts(); } @@ -515,7 +478,6 @@ void GpuChannel::OnCreateOffscreenCommandBuffer( share_group, gfx::GLSurfaceHandle(), mailbox_manager_.get(), - image_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 fc43820..867c4ce 100644 --- a/content/common/gpu/gpu_channel.h +++ b/content/common/gpu/gpu_channel.h @@ -39,9 +39,6 @@ class WaitableEvent; namespace gpu { struct RefCountedCounter; -namespace gles2 { -class ImageManager; -} } #if defined(OS_ANDROID) @@ -103,12 +100,6 @@ class GpuChannel : public IPC::Listener, const GPUCreateCommandBufferConfig& init_params, int32* route_id); - void CreateImage( - gfx::PluginWindowHandle window, - int32 image_id, - gfx::Size* size); - void DeleteImage(int32 image_id); - gfx::GLShareGroup* share_group() const { return share_group_.get(); } GpuCommandBufferStub* LookupCommandBuffer(int32 route_id); @@ -207,7 +198,6 @@ class GpuChannel : public IPC::Listener, scoped_refptr<gfx::GLShareGroup> share_group_; scoped_refptr<gpu::gles2::MailboxManager> mailbox_manager_; - scoped_refptr<gpu::gles2::ImageManager> image_manager_; #if defined(ENABLE_GPU) typedef IDMap<GpuCommandBufferStub, IDMapOwnPointer> StubMap; diff --git a/content/common/gpu/gpu_channel_manager.cc b/content/common/gpu/gpu_channel_manager.cc index 4b92daf..1da6aec 100644 --- a/content/common/gpu/gpu_channel_manager.cc +++ b/content/common/gpu/gpu_channel_manager.cc @@ -18,15 +18,6 @@ #include "ui/gl/gl_bindings.h" #include "ui/gl/gl_share_group.h" -GpuChannelManager::ImageOperation::ImageOperation( - int32 sync_point, base::Closure callback) - : sync_point(sync_point), - callback(callback) { -} - -GpuChannelManager::ImageOperation::~ImageOperation() { -} - GpuChannelManager::GpuChannelManager(ChildThread* gpu_child_thread, GpuWatchdog* watchdog, base::MessageLoopProxy* io_message_loop, @@ -51,7 +42,6 @@ GpuChannelManager::~GpuChannelManager() { default_offscreen_surface_->Destroy(); default_offscreen_surface_ = NULL; } - DCHECK(image_operations_.empty()); } gpu::gles2::ProgramCache* GpuChannelManager::program_cache() { @@ -105,8 +95,6 @@ bool GpuChannelManager::OnMessageReceived(const IPC::Message& msg) { IPC_MESSAGE_HANDLER(GpuMsg_CloseChannel, OnCloseChannel) IPC_MESSAGE_HANDLER(GpuMsg_CreateViewCommandBuffer, OnCreateViewCommandBuffer) - IPC_MESSAGE_HANDLER(GpuMsg_CreateImage, OnCreateImage) - IPC_MESSAGE_HANDLER(GpuMsg_DeleteImage, OnDeleteImage) IPC_MESSAGE_UNHANDLED(handled = false) IPC_END_MESSAGE_MAP_EX() return handled; @@ -181,81 +169,6 @@ void GpuChannelManager::OnCreateViewCommandBuffer( Send(new GpuHostMsg_CommandBufferCreated(route_id)); } -void GpuChannelManager::CreateImage( - gfx::PluginWindowHandle window, int32 client_id, int32 image_id) { - gfx::Size size; - - GpuChannelMap::const_iterator iter = gpu_channels_.find(client_id); - if (iter != gpu_channels_.end()) { - iter->second->CreateImage(window, image_id, &size); - } - - Send(new GpuHostMsg_ImageCreated(size)); -} - -void GpuChannelManager::OnCreateImage( - gfx::PluginWindowHandle window, int32 client_id, int32 image_id) { - DCHECK(image_id); - - if (image_operations_.empty()) { - CreateImage(window, client_id, image_id); - } else { - image_operations_.push_back( - new ImageOperation(0, base::Bind(&GpuChannelManager::CreateImage, - base::Unretained(this), - window, - client_id, - image_id))); - } -} - -void GpuChannelManager::DeleteImage(int32 client_id, int32 image_id) { - GpuChannelMap::const_iterator iter = gpu_channels_.find(client_id); - if (iter != gpu_channels_.end()) { - iter->second->DeleteImage(image_id); - } -} - -void GpuChannelManager::OnDeleteImage( - int32 client_id, int32 image_id, int32 sync_point) { - DCHECK(image_id); - - if (!sync_point && image_operations_.empty()) { - DeleteImage(client_id, image_id); - } else { - image_operations_.push_back( - new ImageOperation(sync_point, - base::Bind(&GpuChannelManager::DeleteImage, - base::Unretained(this), - client_id, - image_id))); - if (sync_point) { - sync_point_manager()->AddSyncPointCallback( - sync_point, - base::Bind(&GpuChannelManager::OnDeleteImageSyncPointRetired, - base::Unretained(this), - image_operations_.back())); - } - } -} - -void GpuChannelManager::OnDeleteImageSyncPointRetired( - ImageOperation* image_operation) { - // Mark operation as no longer having a pending sync point. - image_operation->sync_point = 0; - - // De-queue operations until we reach a pending sync point. - while (!image_operations_.empty()) { - // Check if operation has a pending sync point. - if (image_operations_.front()->sync_point) - return; - - image_operations_.front()->callback.Run(); - delete image_operations_.front(); - image_operations_.pop_front(); - } -} - void GpuChannelManager::LoseAllContexts() { MessageLoop::current()->PostTask( FROM_HERE, diff --git a/content/common/gpu/gpu_channel_manager.h b/content/common/gpu/gpu_channel_manager.h index 78b5079..b256a56 100644 --- a/content/common/gpu/gpu_channel_manager.h +++ b/content/common/gpu/gpu_channel_manager.h @@ -5,7 +5,6 @@ #ifndef CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_H_ #define CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_H_ -#include <deque> #include <vector> #include "base/hash_tables.h" @@ -97,16 +96,6 @@ class GpuChannelManager : public IPC::Listener, gfx::GLSurface* GetDefaultOffscreenSurface(); private: - struct ImageOperation { - ImageOperation(int32 sync_point, base::Closure callback); - ~ImageOperation(); - - int32 sync_point; - base::Closure callback; - }; - typedef base::hash_map<int, scoped_refptr<GpuChannel> > GpuChannelMap; - typedef std::deque<ImageOperation*> ImageOperationQueue; - // Message handlers. void OnEstablishChannel(int client_id, bool share_context); void OnCloseChannel(const IPC::ChannelHandle& channel_handle); @@ -117,13 +106,6 @@ class GpuChannelManager : public IPC::Listener, int32 render_view_id, int32 client_id, const GPUCreateCommandBufferConfig& init_params); - void CreateImage( - gfx::PluginWindowHandle window, int32 client_id, int32 image_id); - void OnCreateImage( - gfx::PluginWindowHandle window, int32 client_id, int32 image_id); - void DeleteImage(int32 client_id, int32 image_id); - void OnDeleteImage(int32 client_id, int32 image_id, int32 sync_point); - void OnDeleteImageSyncPointRetired(ImageOperation*); void OnLoseAllContexts(); @@ -136,6 +118,7 @@ class GpuChannelManager : public IPC::Listener, // These objects manage channels to individual renderer processes there is // one channel for each renderer process that has connected to this GPU // process. + typedef base::hash_map<int, scoped_refptr<GpuChannel> > GpuChannelMap; GpuChannelMap gpu_channels_; scoped_refptr<gfx::GLShareGroup> share_group_; scoped_refptr<gpu::gles2::MailboxManager> mailbox_manager_; @@ -144,7 +127,6 @@ class GpuChannelManager : public IPC::Listener, scoped_refptr<SyncPointManager> sync_point_manager_; scoped_ptr<gpu::gles2::ProgramCache> program_cache_; scoped_refptr<gfx::GLSurface> default_offscreen_surface_; - ImageOperationQueue image_operations_; DISALLOW_COPY_AND_ASSIGN(GpuChannelManager); }; diff --git a/content/common/gpu/gpu_command_buffer_stub.cc b/content/common/gpu/gpu_command_buffer_stub.cc index 32aa0dc..15418bd 100644 --- a/content/common/gpu/gpu_command_buffer_stub.cc +++ b/content/common/gpu/gpu_command_buffer_stub.cc @@ -102,7 +102,6 @@ GpuCommandBufferStub::GpuCommandBufferStub( GpuCommandBufferStub* share_group, const gfx::GLSurfaceHandle& handle, gpu::gles2::MailboxManager* mailbox_manager, - gpu::gles2::ImageManager* image_manager, const gfx::Size& size, const gpu::gles2::DisallowedFeatures& disallowed_features, const std::string& allowed_extensions, @@ -137,7 +136,6 @@ GpuCommandBufferStub::GpuCommandBufferStub( } else { context_group_ = new gpu::gles2::ContextGroup( mailbox_manager, - image_manager, new GpuCommandBufferMemoryTracker(channel), true); } diff --git a/content/common/gpu/gpu_command_buffer_stub.h b/content/common/gpu/gpu_command_buffer_stub.h index 2bb79b6c..98703d1 100644 --- a/content/common/gpu/gpu_command_buffer_stub.h +++ b/content/common/gpu/gpu_command_buffer_stub.h @@ -40,7 +40,6 @@ class GpuWatchdog; namespace gpu { namespace gles2 { -class ImageManager; class MailboxManager; } } @@ -100,7 +99,6 @@ class GpuCommandBufferStub GpuCommandBufferStub* share_group, const gfx::GLSurfaceHandle& handle, gpu::gles2::MailboxManager* mailbox_manager, - gpu::gles2::ImageManager* image_manager, const gfx::Size& size, const gpu::gles2::DisallowedFeatures& disallowed_features, const std::string& allowed_extensions, diff --git a/content/common/gpu/gpu_messages.h b/content/common/gpu/gpu_messages.h index e731d98..82af22c 100644 --- a/content/common/gpu/gpu_messages.h +++ b/content/common/gpu/gpu_messages.h @@ -238,19 +238,6 @@ IPC_MESSAGE_CONTROL4(GpuMsg_CreateViewCommandBuffer, int32, /* client_id */ GPUCreateCommandBufferConfig /* init_params */) -// Tells the GPU process to create a new image from a window. Images -// can be bound to textures using CHROMIUM_texture_from_image. -IPC_MESSAGE_CONTROL3(GpuMsg_CreateImage, - gfx::PluginWindowHandle, /* window */ - int32, /* client_id */ - int32 /* image_id */) - -// Tells the GPU process to delete image. -IPC_MESSAGE_CONTROL3(GpuMsg_DeleteImage, - int32, /* client_id */ - int32, /* image_id */ - int32 /* sync_point */) - // Tells the GPU process to create a context for collecting graphics card // information. IPC_MESSAGE_CONTROL0(GpuMsg_CollectGraphicsInfo) @@ -324,10 +311,6 @@ IPC_MESSAGE_CONTROL1(GpuHostMsg_CommandBufferCreated, IPC_MESSAGE_CONTROL1(GpuHostMsg_DestroyCommandBuffer, int32 /* surface_id */) -// Response from GPU to a GpuMsg_CreateImage message. -IPC_MESSAGE_CONTROL1(GpuHostMsg_ImageCreated, - gfx::Size /* size */) - // Response from GPU to a GpuMsg_CollectGraphicsInfo. IPC_MESSAGE_CONTROL1(GpuHostMsg_GraphicsInfoCollected, content::GPUInfo /* GPU logging stats */) diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc index 57af88c..81da444 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc @@ -963,17 +963,6 @@ int32 RenderThreadImpl::CreateViewCommandBuffer( return route_id; } -void RenderThreadImpl::CreateImage( - gfx::PluginWindowHandle window, - int32 image_id, - const CreateImageCallback& callback) { - NOTREACHED(); -} - -void RenderThreadImpl::DeleteImage(int32 image_id, int32 sync_point) { - NOTREACHED(); -} - void RenderThreadImpl::DoNotSuspendWebKitSharedTimer() { suspend_webkit_shared_timer_ = false; } diff --git a/content/renderer/render_thread_impl.h b/content/renderer/render_thread_impl.h index 4c08164..1e3d984 100644 --- a/content/renderer/render_thread_impl.h +++ b/content/renderer/render_thread_impl.h @@ -153,11 +153,6 @@ class CONTENT_EXPORT RenderThreadImpl : public content::RenderThread, virtual int32 CreateViewCommandBuffer( int32 surface_id, const GPUCreateCommandBufferConfig& init_params) OVERRIDE; - virtual void CreateImage( - gfx::PluginWindowHandle window, - int32 image_id, - const CreateImageCallback& callback) OVERRIDE; - virtual void DeleteImage(int32 image_id, int32 sync_point) OVERRIDE; // Synchronously establish a channel to the GPU plugin if not previously // established or if it has been lost (for example if the GPU plugin crashed). |