diff options
author | reveman@chromium.org <reveman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-18 05:15:50 +0000 |
---|---|---|
committer | reveman@chromium.org <reveman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-18 05:15:50 +0000 |
commit | f4ba36512524dc3150261942ec9a89b4dfb7364a (patch) | |
tree | e9f7e293728188a158b4156a03eb713f5eeebada /content/common/gpu/gpu_channel_manager.h | |
parent | fcb0f644c83064a695588aa74d755aff74a51286 (diff) | |
download | chromium_src-f4ba36512524dc3150261942ec9a89b4dfb7364a.zip chromium_src-f4ba36512524dc3150261942ec9a89b4dfb7364a.tar.gz chromium_src-f4ba36512524dc3150261942ec9a89b4dfb7364a.tar.bz2 |
gpu: Add support for GLX_EXT_texture_from_pixmap extension.
Implement CHROMIUM_texture_from_image. This extension behaves just like
EXT_texture_from_pixmap but uses chromium specific image identifiers rather
than platform specific pixmap IDs.
Add IPC message for creating an image identifier using a
gfx::PluginWindowHandle. Each GPU channel maintains a different set of
images and deleting an image will cause the internal image representation
to be freed once it's no longer bound to a texture.
BUG=132342
TEST=gpu_unittests --gtest_filter=TextureInfoTest.GetLevelImage:GLES2DecoderTest.BindTexImage2DCHROMIUM:GLES2DecoderTest.ReleaseTexImage2DCHROMIUM and manual
Review URL: https://chromiumcodereview.appspot.com/10543125
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162654 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common/gpu/gpu_channel_manager.h')
-rw-r--r-- | content/common/gpu/gpu_channel_manager.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/content/common/gpu/gpu_channel_manager.h b/content/common/gpu/gpu_channel_manager.h index b256a56..78b5079 100644 --- a/content/common/gpu/gpu_channel_manager.h +++ b/content/common/gpu/gpu_channel_manager.h @@ -5,6 +5,7 @@ #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" @@ -96,6 +97,16 @@ 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); @@ -106,6 +117,13 @@ 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(); @@ -118,7 +136,6 @@ 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_; @@ -127,6 +144,7 @@ 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); }; |