Merge ui::ContextFactoryPrivate with ui::ContextFactory

https://chromium-review.googlesource.com/c/chromium/src/+/2047728
This commit is contained in:
deepak1556
2020-03-01 00:15:42 -08:00
parent 937988e6ce
commit 176876f243
3 changed files with 2 additions and 9 deletions

View File

@@ -211,11 +211,9 @@ OffScreenRenderWidgetHostView::OffScreenRenderWidgetHostView(
GetRootLayer()->SetFillsBoundsOpaquely(opaque);
GetRootLayer()->SetColor(background_color_);
ui::ContextFactoryPrivate* context_factory_private =
content::GetContextFactoryPrivate();
ui::ContextFactory* context_factory = content::GetContextFactory();
compositor_ = std::make_unique<ui::Compositor>(
context_factory_private->AllocateFrameSinkId(),
content::GetContextFactory(), context_factory_private,
context_factory->AllocateFrameSinkId(), context_factory,
base::ThreadTaskRunnerHandle::Get(), false /* enable_pixel_canvas */,
false /* use_external_begin_frame_control */);
compositor_->SetAcceleratedWidget(gfx::kNullAcceleratedWidget);

View File

@@ -19,7 +19,6 @@ class ViewsDelegateMac : public views::ViewsDelegate {
views::Widget::InitParams* params,
views::internal::NativeWidgetDelegate* delegate) override;
ui::ContextFactory* GetContextFactory() override;
ui::ContextFactoryPrivate* GetContextFactoryPrivate() override;
private:
DISALLOW_COPY_AND_ASSIGN(ViewsDelegateMac);

View File

@@ -36,8 +36,4 @@ ui::ContextFactory* ViewsDelegateMac::GetContextFactory() {
return content::GetContextFactory();
}
ui::ContextFactoryPrivate* ViewsDelegateMac::GetContextFactoryPrivate() {
return content::GetContextFactoryPrivate();
}
} // namespace electron