mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Fix OSR use_external_begin_frame support and update VSync setters (fixes issue #2618)
This commit is contained in:
committed by
Marshall Greenblatt
parent
941d53ebfd
commit
5623338662
@@ -406,7 +406,7 @@ CefRenderWidgetHostViewOSR::CefRenderWidgetHostViewOSR(
|
|||||||
context_factory_private->AllocateFrameSinkId(),
|
context_factory_private->AllocateFrameSinkId(),
|
||||||
content::GetContextFactory(), context_factory_private,
|
content::GetContextFactory(), context_factory_private,
|
||||||
base::ThreadTaskRunnerHandle::Get(), false /* enable_pixel_canvas */,
|
base::ThreadTaskRunnerHandle::Get(), false /* enable_pixel_canvas */,
|
||||||
use_external_begin_frame ? this : nullptr, use_external_begin_frame));
|
use_external_begin_frame ? this : nullptr));
|
||||||
compositor_->SetAcceleratedWidget(compositor_widget_);
|
compositor_->SetAcceleratedWidget(compositor_widget_);
|
||||||
|
|
||||||
// Tell the compositor to use shared textures if the client can handle
|
// Tell the compositor to use shared textures if the client can handle
|
||||||
@@ -694,7 +694,9 @@ void CefRenderWidgetHostViewOSR::SubmitCompositorFrame(
|
|||||||
// the frame rate to something other than the default of 60Hz.
|
// the frame rate to something other than the default of 60Hz.
|
||||||
if (sync_frame_rate_) {
|
if (sync_frame_rate_) {
|
||||||
if (frame_rate_threshold_us_ != 0) {
|
if (frame_rate_threshold_us_ != 0) {
|
||||||
// TODO(cef): Figure out how to set the VSync interval. See issue #2517.
|
GetCompositor()->SetDisplayVSyncParameters(
|
||||||
|
base::TimeTicks::Now(),
|
||||||
|
base::TimeDelta::FromMicroseconds(frame_rate_threshold_us_));
|
||||||
}
|
}
|
||||||
sync_frame_rate_ = false;
|
sync_frame_rate_ = false;
|
||||||
}
|
}
|
||||||
@@ -1731,7 +1733,9 @@ void CefRenderWidgetHostViewOSR::SetFrameRate() {
|
|||||||
frame_rate_threshold_us_ = 1000000 / frame_rate;
|
frame_rate_threshold_us_ = 1000000 / frame_rate;
|
||||||
|
|
||||||
if (compositor) {
|
if (compositor) {
|
||||||
// TODO(cef): Figure out how to set the VSync interval. See issue #2517.
|
compositor->vsync_manager()->UpdateVSyncParameters(
|
||||||
|
base::TimeTicks::Now(),
|
||||||
|
base::TimeDelta::FromMicroseconds(frame_rate_threshold_us_));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (copy_frame_generator_.get()) {
|
if (copy_frame_generator_.get()) {
|
||||||
|
Reference in New Issue
Block a user