| Index: content/browser/renderer_host/render_widget_host_view_aura.cc
|
| diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
| index 475d48912d6ef98af21d263c63546ad9279aa7db..b7d1ac15635d93308681efc819fd0b6c401a5487 100644
|
| --- a/content/browser/renderer_host/render_widget_host_view_aura.cc
|
| +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
| @@ -289,10 +289,7 @@ void SendCompositorFrameAck(
|
| ack.gl_frame_data.reset(new cc::GLFrameData());
|
| DCHECK(!texture_to_produce || !skip_frame);
|
| if (texture_to_produce) {
|
| - std::string mailbox_name = texture_to_produce->Produce();
|
| - std::copy(mailbox_name.data(),
|
| - mailbox_name.data() + mailbox_name.length(),
|
| - reinterpret_cast<char*>(ack.gl_frame_data->mailbox.name));
|
| + ack.gl_frame_data->mailbox = texture_to_produce->Produce();
|
| ack.gl_frame_data->size = texture_to_produce->size();
|
| ack.gl_frame_data->sync_point =
|
| content::ImageTransportFactory::GetInstance()->InsertSyncPoint();
|
| @@ -310,7 +307,7 @@ void SendCompositorFrameAck(
|
| void AcknowledgeBufferForGpu(
|
| int32 route_id,
|
| int gpu_host_id,
|
| - const std::string& received_mailbox,
|
| + const gpu::Mailbox& received_mailbox,
|
| bool skip_frame,
|
| const scoped_refptr<ui::Texture>& texture_to_produce) {
|
| AcceleratedSurfaceMsg_BufferPresented_Params ack;
|
| @@ -1163,7 +1160,7 @@ void RenderWidgetHostViewAura::UpdateExternalTexture() {
|
| bool RenderWidgetHostViewAura::SwapBuffersPrepare(
|
| const gfx::Rect& surface_rect,
|
| const gfx::Rect& damage_rect,
|
| - const std::string& mailbox_name,
|
| + const gpu::Mailbox& mailbox_name,
|
| const BufferPresentedCallback& ack_callback) {
|
| if (last_swapped_surface_size_ != surface_rect.size()) {
|
| // The surface could have shrunk since we skipped an update, in which
|
| @@ -1174,7 +1171,7 @@ bool RenderWidgetHostViewAura::SwapBuffersPrepare(
|
| }
|
|
|
| if (ShouldSkipFrame(ConvertSizeToDIP(this, surface_rect.size())) ||
|
| - mailbox_name.empty()) {
|
| + mailbox_name.IsZero()) {
|
| skipped_damage_.op(RectToSkIRect(damage_rect), SkRegion::kUnion_Op);
|
| ack_callback.Run(true, scoped_refptr<ui::Texture>());
|
| return false;
|
| @@ -1317,16 +1314,13 @@ void RenderWidgetHostViewAura::OnSwapCompositorFrame(
|
| ImageTransportFactory* factory = ImageTransportFactory::GetInstance();
|
| factory->WaitSyncPoint(frame->gl_frame_data->sync_point);
|
|
|
| - std::string mailbox_name(
|
| - reinterpret_cast<const char*>(frame->gl_frame_data->mailbox.name),
|
| - sizeof(frame->gl_frame_data->mailbox.name));
|
| BuffersSwapped(
|
| - frame->gl_frame_data->size, mailbox_name, ack_callback);
|
| + frame->gl_frame_data->size, frame->gl_frame_data->mailbox, ack_callback);
|
| }
|
|
|
| void RenderWidgetHostViewAura::BuffersSwapped(
|
| const gfx::Size& size,
|
| - const std::string& mailbox_name,
|
| + const gpu::Mailbox& mailbox_name,
|
| const BufferPresentedCallback& ack_callback) {
|
| scoped_refptr<ui::Texture> texture_to_return(current_surface_);
|
| const gfx::Rect surface_rect = gfx::Rect(gfx::Point(), size);
|
|
|