mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-02-23 15:37:51 +01:00
macOS: Fix incorrect OSR compositor resize in OnSwapCompositorFrame (issue #2065)
This commit is contained in:
parent
1ad8ea0d64
commit
e6bc7f43c2
@ -696,8 +696,11 @@ void CefRenderWidgetHostViewOSR::OnSwapCompositorFrame(
|
|||||||
// The compositor will draw directly to the SoftwareOutputDevice which
|
// The compositor will draw directly to the SoftwareOutputDevice which
|
||||||
// then calls OnPaint.
|
// then calls OnPaint.
|
||||||
#if defined(OS_MACOSX)
|
#if defined(OS_MACOSX)
|
||||||
browser_compositor_->SwapCompositorFrame(output_surface_id,
|
// We would normally call BrowserCompositorMac::SwapCompositorFrame,
|
||||||
std::move(frame));
|
// however it contains compositor resize logic that we don't want.
|
||||||
|
// Consequently we instead call the SwapDelegatedFrame method directly.
|
||||||
|
browser_compositor_->GetDelegatedFrameHost()->SwapDelegatedFrame(
|
||||||
|
output_surface_id, std::move(frame));
|
||||||
#else
|
#else
|
||||||
delegated_frame_host_->SwapDelegatedFrame(output_surface_id,
|
delegated_frame_host_->SwapDelegatedFrame(output_surface_id,
|
||||||
std::move(frame));
|
std::move(frame));
|
||||||
@ -717,8 +720,11 @@ void CefRenderWidgetHostViewOSR::OnSwapCompositorFrame(
|
|||||||
damage_rect.Intersect(gfx::Rect(frame_size));
|
damage_rect.Intersect(gfx::Rect(frame_size));
|
||||||
|
|
||||||
#if defined(OS_MACOSX)
|
#if defined(OS_MACOSX)
|
||||||
browser_compositor_->SwapCompositorFrame(output_surface_id,
|
// We would normally call BrowserCompositorMac::SwapCompositorFrame,
|
||||||
std::move(frame));
|
// however it contains compositor resize logic that we don't want.
|
||||||
|
// Consequently we instead call the SwapDelegatedFrame method directly.
|
||||||
|
browser_compositor_->GetDelegatedFrameHost()->SwapDelegatedFrame(
|
||||||
|
output_surface_id, std::move(frame));
|
||||||
#else
|
#else
|
||||||
delegated_frame_host_->SwapDelegatedFrame(output_surface_id,
|
delegated_frame_host_->SwapDelegatedFrame(output_surface_id,
|
||||||
std::move(frame));
|
std::move(frame));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user