Chromium Code Reviews| Index: content/browser/compositor/software_output_device_mac.mm |
| diff --git a/content/browser/compositor/software_output_device_mac.mm b/content/browser/compositor/software_output_device_mac.mm |
| index da190699d0374d36f7a01a6d3c1ba4f62162c8d5..36a6e541e4d26ace69cabd0cf3b23edd8ee015e3 100644 |
| --- a/content/browser/compositor/software_output_device_mac.mm |
| +++ b/content/browser/compositor/software_output_device_mac.mm |
| @@ -140,15 +140,19 @@ |
| if (io_result) |
| DLOG(ERROR) << "Failed to unlock IOSurface " << io_result; |
| } |
| - |
| canvas_.reset(); |
| - base::TimeTicks vsync_timebase; |
| - base::TimeDelta vsync_interval; |
| - ui::AcceleratedWidgetMacGotFrame( |
| - compositor_->widget(), 0, false, 0, io_surfaces_[current_index_], |
| - pixel_size_, scale_factor_, &vsync_timebase, &vsync_interval); |
| - if (!update_vsync_callback_.is_null()) |
| - update_vsync_callback_.Run(vsync_timebase, vsync_interval); |
| + |
| + ui::AcceleratedWidgetMac* widget = |
| + ui::AcceleratedWidgetMac::Get(compositor_->widget()); |
| + if (widget) { |
| + widget->GotIOSurfaceFrame(io_surfaces_[current_index_], pixel_size_, |
| + scale_factor_); |
| + base::TimeTicks vsync_timebase; |
| + base::TimeDelta vsync_interval; |
| + widget->GetVSyncParameters(&vsync_timebase, &vsync_interval); |
| + if (!update_vsync_callback_.is_null()) |
|
tapted
2016/05/27 00:33:19
does this need to be outside the if (widget) block
ccameron
2016/06/03 02:43:01
This is just updating vsync info, so it doesn't ne
|
| + update_vsync_callback_.Run(vsync_timebase, vsync_interval); |
| + } |
| current_index_ = !current_index_; |
| } |