Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1583)

Unified Diff: content/browser/renderer_host/image_transport_factory.cc

Issue 12612005: Revert 186627 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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
« no previous file with comments | « content/browser/gpu/gpu_process_host_ui_shim.cc ('k') | content/browser/renderer_host/render_widget_host_view_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698