| 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 1a0563a66601d2bde050edc000ea200c2a3db6ee..3bc713a32f9588c3c020ac10a7276828a577532d 100644
|
| --- a/content/browser/renderer_host/render_widget_host_view_aura.cc
|
| +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
| @@ -288,10 +288,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();
|
| @@ -309,7 +306,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;
|
| @@ -1162,7 +1159,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
|
| @@ -1172,7 +1169,7 @@ bool RenderWidgetHostViewAura::SwapBuffersPrepare(
|
| last_swapped_surface_size_ = surface_rect.size();
|
| }
|
|
|
| - if (ShouldSkipFrame(surface_rect.size()) || mailbox_name.empty()) {
|
| + if (ShouldSkipFrame(surface_rect.size()) || mailbox_name.IsZero()) {
|
| skipped_damage_.op(RectToSkIRect(damage_rect), SkRegion::kUnion_Op);
|
| ack_callback.Run(true, scoped_refptr<ui::Texture>());
|
| return false;
|
| @@ -1269,16 +1266,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);
|
|
|