| Index: content/browser/renderer_host/image_transport_factory.cc
|
| ===================================================================
|
| --- content/browser/renderer_host/image_transport_factory.cc (revision 186756)
|
| +++ content/browser/renderer_host/image_transport_factory.cc (working copy)
|
| @@ -162,23 +162,32 @@
|
| host_context->createTexture()) {
|
| }
|
|
|
| - virtual void Consume(const gpu::Mailbox& mailbox_name,
|
| + virtual void Consume(const std::string& mailbox_name,
|
| const gfx::Size& new_size) OVERRIDE {
|
| + DCHECK(mailbox_name.size() == GL_MAILBOX_SIZE_CHROMIUM);
|
| + mailbox_name_ = mailbox_name;
|
| + if (mailbox_name.empty())
|
| + return;
|
| +
|
| DCHECK(host_context_ && texture_id_);
|
| - mailbox_name_ = mailbox_name;
|
| host_context_->bindTexture(GL_TEXTURE_2D, texture_id_);
|
| - host_context_->consumeTextureCHROMIUM(GL_TEXTURE_2D, mailbox_name.name);
|
| + host_context_->consumeTextureCHROMIUM(
|
| + GL_TEXTURE_2D,
|
| + reinterpret_cast<const signed char*>(mailbox_name.c_str()));
|
| size_ = new_size;
|
| host_context_->shallowFlushCHROMIUM();
|
| }
|
|
|
| - virtual gpu::Mailbox Produce() OVERRIDE {
|
| - DCHECK(!mailbox_name_.IsZero());
|
| - DCHECK(host_context_ && texture_id_);
|
| - host_context_->bindTexture(GL_TEXTURE_2D, texture_id_);
|
| - host_context_->produceTextureCHROMIUM(GL_TEXTURE_2D, mailbox_name_.name);
|
| - gpu::Mailbox name;
|
| - std::swap(mailbox_name_, name);
|
| + virtual std::string Produce() OVERRIDE {
|
| + std::string name;
|
| + if (!mailbox_name_.empty()) {
|
| + DCHECK(host_context_ && texture_id_);
|
| + host_context_->bindTexture(GL_TEXTURE_2D, texture_id_);
|
| + host_context_->produceTextureCHROMIUM(
|
| + GL_TEXTURE_2D,
|
| + reinterpret_cast<const signed char*>(mailbox_name_.c_str()));
|
| + mailbox_name_.swap(name);
|
| + }
|
| return name;
|
| }
|
|
|
| @@ -186,7 +195,7 @@
|
| virtual ~ImageTransportClientTexture() {}
|
|
|
| private:
|
| - gpu::Mailbox mailbox_name_;
|
| + std::string mailbox_name_;
|
| DISALLOW_COPY_AND_ASSIGN(ImageTransportClientTexture);
|
| };
|
|
|
|
|
| Property changes on: content/browser/renderer_host/image_transport_factory.cc
|
| ___________________________________________________________________
|
| Deleted: svn:mergeinfo
|
|
|
|
|