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

Unified Diff: trunk/src/content/browser/compositor/gpu_process_transport_factory.cc

Issue 163433008: Revert 251207 "Use gpu::Mailbox instead of std:string in IPCs" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 10 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: trunk/src/content/browser/compositor/gpu_process_transport_factory.cc
===================================================================
--- trunk/src/content/browser/compositor/gpu_process_transport_factory.cc (revision 251280)
+++ trunk/src/content/browser/compositor/gpu_process_transport_factory.cc (working copy)
@@ -29,7 +29,6 @@
#include "content/common/gpu/gpu_process_launch_causes.h"
#include "gpu/GLES2/gl2extchromium.h"
#include "gpu/command_buffer/client/gles2_interface.h"
-#include "gpu/command_buffer/common/mailbox.h"
#include "third_party/khronos/GLES2/gl2.h"
#include "ui/compositor/compositor.h"
#include "ui/compositor/compositor_constants.h"
@@ -114,27 +113,29 @@
device_scale_factor,
texture_id) {}
- virtual void Consume(const gpu::Mailbox& mailbox,
+ virtual void Consume(const std::string& mailbox_name,
const gfx::Size& new_size) OVERRIDE {
- mailbox_ = mailbox;
- if (mailbox.IsZero())
+ DCHECK(mailbox_name.size() == GL_MAILBOX_SIZE_CHROMIUM);
+ mailbox_name_ = mailbox_name;
+ if (mailbox_name.empty())
return;
DCHECK(provider_ && texture_id_);
GLES2Interface* gl = provider_->ContextGL();
gl->BindTexture(GL_TEXTURE_2D, texture_id_);
- gl->ConsumeTextureCHROMIUM(GL_TEXTURE_2D, mailbox.name);
+ gl->ConsumeTextureCHROMIUM(
+ GL_TEXTURE_2D, reinterpret_cast<const GLbyte*>(mailbox_name.c_str()));
size_ = new_size;
gl->ShallowFlushCHROMIUM();
}
- virtual gpu::Mailbox Produce() OVERRIDE { return mailbox_; }
+ virtual std::string Produce() OVERRIDE { return mailbox_name_; }
protected:
virtual ~ImageTransportClientTexture() {}
private:
- gpu::Mailbox mailbox_;
+ std::string mailbox_name_;
DISALLOW_COPY_AND_ASSIGN(ImageTransportClientTexture);
};

Powered by Google App Engine
This is Rietveld 408576698