fixme: C70 removed DidReceiveCompositorFrame

(OSR relatied)

refs: 1de1ca906a

cc @brenca
This commit is contained in:
Samuel Attard 2018-10-25 17:27:12 +11:00 committed by deepak1556
parent 74d1685523
commit b6aae790cf
2 changed files with 12 additions and 10 deletions

View file

@ -58,16 +58,17 @@ gfx::Rect FrameSubscriber::GetDamageRect() {
} }
} }
void FrameSubscriber::DidReceiveCompositorFrame() { // FIXME(MarshallOfSound): Removed in C70
auto* view = web_contents()->GetRenderWidgetHostView(); // void FrameSubscriber::DidReceiveCompositorFrame() {
if (view == nullptr) // auto* view = web_contents()->GetRenderWidgetHostView();
return; // if (view == nullptr)
// return;
view->CopyFromSurface( // view->CopyFromSurface(
gfx::Rect(), view->GetViewBounds().size(), // gfx::Rect(), view->GetViewBounds().size(),
base::BindOnce(&FrameSubscriber::Done, weak_ptr_factory_.GetWeakPtr(), // base::BindOnce(&FrameSubscriber::Done, weak_ptr_factory_.GetWeakPtr(),
GetDamageRect())); // GetDamageRect()));
} // }
void FrameSubscriber::Done(const gfx::Rect& damage, const SkBitmap& frame) { void FrameSubscriber::Done(const gfx::Rect& damage, const SkBitmap& frame) {
if (frame.drawsNothing()) if (frame.drawsNothing())

View file

@ -33,7 +33,8 @@ class FrameSubscriber : public content::WebContentsObserver {
private: private:
gfx::Rect GetDamageRect(); gfx::Rect GetDamageRect();
void DidReceiveCompositorFrame() override; // FIXME(MarshallOfSound): Removed in C70
// void DidReceiveCompositorFrame() override;
void Done(const gfx::Rect& damage, const SkBitmap& frame); void Done(const gfx::Rect& damage, const SkBitmap& frame);
v8::Isolate* isolate_; v8::Isolate* isolate_;