fix: pass IsScreen via parameter instead of sync IPC method (#27774)
This commit is contained in:
parent
1e4f67c197
commit
a0141f8d6c
5 changed files with 115 additions and 75 deletions
|
@ -90,10 +90,6 @@ void OffScreenHostDisplayClient::SetActive(bool active) {
|
|||
}
|
||||
}
|
||||
|
||||
void OffScreenHostDisplayClient::IsOffscreen(IsOffscreenCallback callback) {
|
||||
std::move(callback).Run(true);
|
||||
}
|
||||
|
||||
void OffScreenHostDisplayClient::CreateLayeredWindowUpdater(
|
||||
mojo::PendingReceiver<viz::mojom::LayeredWindowUpdater> receiver) {
|
||||
layered_window_updater_ =
|
||||
|
|
|
@ -55,8 +55,6 @@ class OffScreenHostDisplayClient : public viz::HostDisplayClient {
|
|||
void SetActive(bool active);
|
||||
|
||||
private:
|
||||
void IsOffscreen(IsOffscreenCallback callback) override;
|
||||
|
||||
#if defined(OS_MAC)
|
||||
void OnDisplayReceivedCALayerParams(
|
||||
const gfx::CALayerParams& ca_layer_params) override;
|
||||
|
|
|
@ -610,6 +610,10 @@ void OffScreenRenderWidgetHostView::ProxyViewDestroyed(
|
|||
Invalidate();
|
||||
}
|
||||
|
||||
bool OffScreenRenderWidgetHostView::IsOffscreen() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
std::unique_ptr<viz::HostDisplayClient>
|
||||
OffScreenRenderWidgetHostView::CreateHostDisplayClient(
|
||||
ui::Compositor* compositor) {
|
||||
|
|
|
@ -149,6 +149,7 @@ class OffScreenRenderWidgetHostView : public content::RenderWidgetHostViewBase,
|
|||
gfx::PointF* transformed_point) override;
|
||||
|
||||
// ui::CompositorDelegate:
|
||||
bool IsOffscreen() const override;
|
||||
std::unique_ptr<viz::HostDisplayClient> CreateHostDisplayClient(
|
||||
ui::Compositor* compositor) override;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue