Add support for shared texture and external BeginFrame in OSR mode (issue #1006)

- Add CefWindowInfo::shared_texture_enabled and
  CefRenderHandler::OnAcceleratedPaint for shared texture support. Currently
  only supported on Windows (D3D11).
- Add CefWindowInfo::external_begin_frame_enabled and
  CefBrowserHost::SendExternalBeginFrame for external begin frame support.
This commit is contained in:
Greg Wessels
2018-07-02 19:46:03 -05:00
committed by Marshall Greenblatt
parent 09afa3a843
commit 713eebcafc
43 changed files with 2339 additions and 156 deletions

View File

@ -1156,6 +1156,24 @@ void CefBrowserHostImpl::Invalidate(PaintElementType type) {
platform_delegate_->Invalidate(type);
}
void CefBrowserHostImpl::SendExternalBeginFrame() {
if (!IsWindowless()) {
NOTREACHED() << "Window rendering is not disabled";
return;
}
if (!CEF_CURRENTLY_ON_UIT()) {
CEF_POST_TASK(
CEF_UIT, base::Bind(&CefBrowserHostImpl::SendExternalBeginFrame, this));
return;
}
if (!web_contents() || !platform_delegate_)
return;
platform_delegate_->SendExternalBeginFrame();
}
void CefBrowserHostImpl::SendKeyEvent(const CefKeyEvent& event) {
if (!CEF_CURRENTLY_ON_UIT()) {
CEF_POST_TASK(CEF_UIT, base::BindOnce(&CefBrowserHostImpl::SendKeyEvent,