mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Linux: Add OSR use_external_begin_frame support (see issue #1006)
This commit is contained in:
committed by
Marshall Greenblatt
parent
531df6eaba
commit
a48e072076
@ -46,7 +46,7 @@ std::unique_ptr<CefBrowserPlatformDelegateNative> CreateNativeDelegate(
|
|||||||
window_info, background_color);
|
window_info, background_color);
|
||||||
#elif defined(OS_LINUX)
|
#elif defined(OS_LINUX)
|
||||||
return std::make_unique<CefBrowserPlatformDelegateNativeLinux>(
|
return std::make_unique<CefBrowserPlatformDelegateNativeLinux>(
|
||||||
window_info, background_color);
|
window_info, background_color, use_external_begin_frame);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,11 +41,12 @@ long GetSystemUptime() {
|
|||||||
|
|
||||||
CefBrowserPlatformDelegateNativeLinux::CefBrowserPlatformDelegateNativeLinux(
|
CefBrowserPlatformDelegateNativeLinux::CefBrowserPlatformDelegateNativeLinux(
|
||||||
const CefWindowInfo& window_info,
|
const CefWindowInfo& window_info,
|
||||||
SkColor background_color)
|
SkColor background_color,
|
||||||
|
bool use_external_begin_frame)
|
||||||
: CefBrowserPlatformDelegateNative(window_info,
|
: CefBrowserPlatformDelegateNative(window_info,
|
||||||
background_color,
|
background_color,
|
||||||
false,
|
false,
|
||||||
false),
|
use_external_begin_frame),
|
||||||
host_window_created_(false),
|
host_window_created_(false),
|
||||||
window_widget_(nullptr),
|
window_widget_(nullptr),
|
||||||
window_x11_(nullptr) {}
|
window_x11_(nullptr) {}
|
||||||
|
@ -14,7 +14,8 @@ class CefBrowserPlatformDelegateNativeLinux
|
|||||||
: public CefBrowserPlatformDelegateNative {
|
: public CefBrowserPlatformDelegateNative {
|
||||||
public:
|
public:
|
||||||
CefBrowserPlatformDelegateNativeLinux(const CefWindowInfo& window_info,
|
CefBrowserPlatformDelegateNativeLinux(const CefWindowInfo& window_info,
|
||||||
SkColor background_color);
|
SkColor background_color,
|
||||||
|
bool use_external_begin_frame);
|
||||||
|
|
||||||
// CefBrowserPlatformDelegate methods:
|
// CefBrowserPlatformDelegate methods:
|
||||||
void BrowserDestroyed(CefBrowserHostImpl* browser) override;
|
void BrowserDestroyed(CefBrowserHostImpl* browser) override;
|
||||||
|
@ -1323,6 +1323,9 @@ void CefRenderWidgetHostViewOSR::SendExternalBeginFrame() {
|
|||||||
DCHECK(begin_frame_args.IsValid());
|
DCHECK(begin_frame_args.IsValid());
|
||||||
begin_frame_number_++;
|
begin_frame_number_++;
|
||||||
|
|
||||||
|
if (render_widget_host_)
|
||||||
|
render_widget_host_->ProgressFlingIfNeeded(frame_time);
|
||||||
|
|
||||||
if (renderer_compositor_frame_sink_) {
|
if (renderer_compositor_frame_sink_) {
|
||||||
GetCompositor()->context_factory_private()->IssueExternalBeginFrame(
|
GetCompositor()->context_factory_private()->IssueExternalBeginFrame(
|
||||||
GetCompositor(), begin_frame_args);
|
GetCompositor(), begin_frame_args);
|
||||||
|
Reference in New Issue
Block a user