diff options
author | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-23 21:29:21 +0000 |
---|---|---|
committer | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-23 21:29:21 +0000 |
commit | 3f50ec4bb2a006f9285053b3877a7b9cd634da0a (patch) | |
tree | 38f28684bc24c9062dd81ff86a1d8b7ea9b08593 /content/common | |
parent | 4a225032c9eef31b2afbd36249f7ca949095b08e (diff) | |
download | chromium_src-3f50ec4bb2a006f9285053b3877a7b9cd634da0a.zip chromium_src-3f50ec4bb2a006f9285053b3877a7b9cd634da0a.tar.gz chromium_src-3f50ec4bb2a006f9285053b3877a7b9cd634da0a.tar.bz2 |
base::Bind: Random remaining cleanups.
BUG=none
TEST=none
R=groby,csilv,ajwong
Review URL: http://codereview.chromium.org/9035012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115737 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common')
-rw-r--r-- | content/common/gpu/transport_texture.cc | 10 | ||||
-rw-r--r-- | content/common/gpu/transport_texture.h | 10 |
2 files changed, 11 insertions, 9 deletions
diff --git a/content/common/gpu/transport_texture.cc b/content/common/gpu/transport_texture.cc index ab65b49..3084549 100644 --- a/content/common/gpu/transport_texture.cc +++ b/content/common/gpu/transport_texture.cc @@ -24,10 +24,10 @@ TransportTexture::~TransportTexture() { void TransportTexture::CreateTextures( int n, int width, int height, Format format, std::vector<int>* textures, - Task* done_task) { + const base::Closure& callback) { output_textures_ = textures; - DCHECK(!create_task_.get()); - create_task_.reset(done_task); + DCHECK(create_callback_.is_null()); + create_callback_ = callback; bool ret = sender_->Send(new GpuTransportTextureHostMsg_CreateTextures( host_id_, n, width, height, static_cast<int>(format))); @@ -102,7 +102,7 @@ void TransportTexture::OnTexturesCreated(const std::vector<int>& textures) { } // Notify user that textures are ready. - create_task_->Run(); - create_task_.reset(); + create_callback_.Run(); + create_callback_.Reset(); output_textures_ = NULL; } diff --git a/content/common/gpu/transport_texture.h b/content/common/gpu/transport_texture.h index ae941e9..9f13ec4 100644 --- a/content/common/gpu/transport_texture.h +++ b/content/common/gpu/transport_texture.h @@ -47,10 +47,12 @@ class TransportTexture : public IPC::Channel::Listener { virtual ~TransportTexture(); // Create a set of textures of specified size and format. They will be - // stored in |textures| and |done_task| will be called. + // stored in |textures| and |callback| will be called. // Textures IDs stored in |textures| are in the system GL context. void CreateTextures(int n, int width, int height, Format format, - std::vector<int>* textures, Task* done_task); + std::vector<int>* textures, + const base::Closure& callback); + // Release all textures that have previously been allocated. void ReleaseTextures(); @@ -86,8 +88,8 @@ class TransportTexture : public IPC::Channel::Listener { // Output pointer to write generated textures. std::vector<int>* output_textures_; - // Task that gets called when textures are generated. - scoped_ptr<Task> create_task_; + // Callback that gets called when textures are generated. + base::Closure create_callback_; // Mapping between service (GPU) IDs to client (Renderer) IDs. TextureMap texture_map_; |