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

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

Issue 12440005: Use gpu::Mailbox in IPCs instead of std::string (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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/render_widget_host_view_android.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc
index ce705823df6f30f6f542adfdfbcf654c4facdddc..c1b33781754cba47677c6c7cb4baa59a91f96da6 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.cc
+++ b/content/browser/renderer_host/render_widget_host_view_android.cc
@@ -40,7 +40,7 @@ namespace content {
namespace {
void InsertSyncPointAndAckForGpu(
- int gpu_host_id, int route_id, const std::string& return_mailbox) {
+ int gpu_host_id, int route_id, const gpu::Mailbox& return_mailbox) {
uint32 sync_point =
ImageTransportFactoryAndroid::GetInstance()->InsertSyncPoint();
AcceleratedSurfaceMsg_BufferPresented_Params ack_params;
@@ -504,26 +504,13 @@ void RenderWidgetHostViewAndroid::AcceleratedSurfaceBuffersSwapped(
int gpu_host_id) {
NOTREACHED() << "Deprecated. Use --composite-to-mailbox.";
- if (params.mailbox_name.empty())
+ if (params.mailbox_name.IsZero())
return;
- std::string return_mailbox;
- if (!current_mailbox_.IsZero()) {
- return_mailbox.assign(
- reinterpret_cast<const char*>(current_mailbox_.name),
- sizeof(current_mailbox_.name));
- }
-
base::Closure callback = base::Bind(&InsertSyncPointAndAckForGpu,
gpu_host_id, params.route_id,
- return_mailbox);
-
- gpu::Mailbox mailbox;
- std::copy(params.mailbox_name.data(),
- params.mailbox_name.data() + params.mailbox_name.length(),
- reinterpret_cast<char*>(mailbox.name));
-
- BuffersSwapped(mailbox, params.size, callback);
+ current_mailbox_);
+ BuffersSwapped(params.mailbox_name, params.size, callback);
}
void RenderWidgetHostViewAndroid::BuffersSwapped(
« no previous file with comments | « content/browser/renderer_host/image_transport_factory.cc ('k') | content/browser/renderer_host/render_widget_host_view_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698