зеркало из https://github.com/electron/electron.git
fixme: C70 removed DidReceiveCompositorFrame
(OSR relatied)
refs: 1de1ca906a
cc @brenca
This commit is contained in:
Родитель
74d1685523
Коммит
b6aae790cf
|
@ -58,16 +58,17 @@ gfx::Rect FrameSubscriber::GetDamageRect() {
|
|||
}
|
||||
}
|
||||
|
||||
void FrameSubscriber::DidReceiveCompositorFrame() {
|
||||
auto* view = web_contents()->GetRenderWidgetHostView();
|
||||
if (view == nullptr)
|
||||
return;
|
||||
// FIXME(MarshallOfSound): Removed in C70
|
||||
// void FrameSubscriber::DidReceiveCompositorFrame() {
|
||||
// auto* view = web_contents()->GetRenderWidgetHostView();
|
||||
// if (view == nullptr)
|
||||
// return;
|
||||
|
||||
view->CopyFromSurface(
|
||||
gfx::Rect(), view->GetViewBounds().size(),
|
||||
base::BindOnce(&FrameSubscriber::Done, weak_ptr_factory_.GetWeakPtr(),
|
||||
GetDamageRect()));
|
||||
}
|
||||
// view->CopyFromSurface(
|
||||
// gfx::Rect(), view->GetViewBounds().size(),
|
||||
// base::BindOnce(&FrameSubscriber::Done, weak_ptr_factory_.GetWeakPtr(),
|
||||
// GetDamageRect()));
|
||||
// }
|
||||
|
||||
void FrameSubscriber::Done(const gfx::Rect& damage, const SkBitmap& frame) {
|
||||
if (frame.drawsNothing())
|
||||
|
|
|
@ -33,7 +33,8 @@ class FrameSubscriber : public content::WebContentsObserver {
|
|||
|
||||
private:
|
||||
gfx::Rect GetDamageRect();
|
||||
void DidReceiveCompositorFrame() override;
|
||||
// FIXME(MarshallOfSound): Removed in C70
|
||||
// void DidReceiveCompositorFrame() override;
|
||||
void Done(const gfx::Rect& damage, const SkBitmap& frame);
|
||||
|
||||
v8::Isolate* isolate_;
|
||||
|
|
Загрузка…
Ссылка в новой задаче