Skip to content

Commit

Permalink
Linux: Add OSR use_external_begin_frame support (see issue chromiumem…
Browse files Browse the repository at this point in the history
  • Loading branch information
tonttu authored and magreenblatt committed Mar 18, 2019
1 parent eef2fcc commit 2ff59af
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion libcef/browser/browser_platform_delegate_create.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ std::unique_ptr<CefBrowserPlatformDelegateNative> CreateNativeDelegate(
window_info, background_color);
#elif defined(OS_LINUX)
return std::make_unique<CefBrowserPlatformDelegateNativeLinux>(
window_info, background_color);
window_info, background_color, use_external_begin_frame);
#endif
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,12 @@ long GetSystemUptime() {

CefBrowserPlatformDelegateNativeLinux::CefBrowserPlatformDelegateNativeLinux(
const CefWindowInfo& window_info,
SkColor background_color)
SkColor background_color,
bool use_external_begin_frame)
: CefBrowserPlatformDelegateNative(window_info,
background_color,
false,
false),
use_external_begin_frame),
host_window_created_(false),
window_widget_(nullptr),
window_x11_(nullptr) {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ class CefBrowserPlatformDelegateNativeLinux
: public CefBrowserPlatformDelegateNative {
public:
CefBrowserPlatformDelegateNativeLinux(const CefWindowInfo& window_info,
SkColor background_color);
SkColor background_color,
bool use_external_begin_frame);

// CefBrowserPlatformDelegate methods:
void BrowserDestroyed(CefBrowserHostImpl* browser) override;
Expand Down
3 changes: 3 additions & 0 deletions libcef/browser/osr/render_widget_host_view_osr.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1323,6 +1323,9 @@ void CefRenderWidgetHostViewOSR::SendExternalBeginFrame() {
DCHECK(begin_frame_args.IsValid());
begin_frame_number_++;

if (render_widget_host_)
render_widget_host_->ProgressFlingIfNeeded(frame_time);

if (renderer_compositor_frame_sink_) {
GetCompositor()->context_factory_private()->IssueExternalBeginFrame(
GetCompositor(), begin_frame_args);
Expand Down

0 comments on commit 2ff59af

Please sign in to comment.