| Index: trunk/src/content/common/gpu/texture_image_transport_surface.cc
|
| ===================================================================
|
| --- trunk/src/content/common/gpu/texture_image_transport_surface.cc (revision 251280)
|
| +++ trunk/src/content/common/gpu/texture_image_transport_surface.cc (working copy)
|
| @@ -218,7 +218,9 @@
|
| GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params params;
|
| params.size = backbuffer_size();
|
| params.scale_factor = scale_factor_;
|
| - params.mailbox = back_mailbox_;
|
| + params.mailbox_name.assign(
|
| + reinterpret_cast<const char*>(&back_mailbox_),
|
| + sizeof(back_mailbox_));
|
|
|
| glFlush();
|
|
|
| @@ -256,7 +258,9 @@
|
| params.y = y;
|
| params.width = width;
|
| params.height = height;
|
| - params.mailbox = back_mailbox_;
|
| + params.mailbox_name.assign(
|
| + reinterpret_cast<const char*>(&back_mailbox_),
|
| + sizeof(back_mailbox_));
|
|
|
| glFlush();
|
|
|
| @@ -290,17 +294,18 @@
|
| void TextureImageTransportSurface::OnBufferPresented(
|
| const AcceleratedSurfaceMsg_BufferPresented_Params& params) {
|
| if (params.sync_point == 0) {
|
| - BufferPresentedImpl(params.mailbox);
|
| + BufferPresentedImpl(params.mailbox_name);
|
| } else {
|
| helper_->manager()->sync_point_manager()->AddSyncPointCallback(
|
| params.sync_point,
|
| base::Bind(&TextureImageTransportSurface::BufferPresentedImpl,
|
| this,
|
| - params.mailbox));
|
| + params.mailbox_name));
|
| }
|
| }
|
|
|
| -void TextureImageTransportSurface::BufferPresentedImpl(const Mailbox& mailbox) {
|
| +void TextureImageTransportSurface::BufferPresentedImpl(
|
| + const std::string& mailbox_name) {
|
| DCHECK(is_swap_buffers_pending_);
|
| is_swap_buffers_pending_ = false;
|
|
|
| @@ -316,8 +321,11 @@
|
| DCHECK(backbuffer_.get());
|
|
|
| bool swap = true;
|
| - if (!mailbox.IsZero()) {
|
| - if (mailbox != back_mailbox_) {
|
| + if (!mailbox_name.empty()) {
|
| + DCHECK(mailbox_name.length() == GL_MAILBOX_SIZE_CHROMIUM);
|
| + if (!memcmp(mailbox_name.data(),
|
| + &back_mailbox_,
|
| + mailbox_name.length())) {
|
| // The browser has skipped the frame to unblock the GPU process, waiting
|
| // for one of the right size, and returned the back buffer, so don't swap.
|
| swap = false;
|
|
|