mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
added checks for painting_ when setting the outputdevice to active state and removed show/hide from start/stoppainting since during testing they caused transparent frames to appear when a window was set to paint again after stopping
This commit is contained in:
@@ -1354,10 +1354,8 @@ void WebContents::StartPainting() {
|
||||
|
||||
auto* osr_rwhv = static_cast<OffScreenRenderWidgetHostView*>(
|
||||
web_contents()->GetRenderWidgetHostView());
|
||||
if (osr_rwhv) {
|
||||
osr_rwhv->Show();
|
||||
if (osr_rwhv)
|
||||
osr_rwhv->SetPainting(true);
|
||||
}
|
||||
}
|
||||
|
||||
void WebContents::StopPainting() {
|
||||
@@ -1366,10 +1364,8 @@ void WebContents::StopPainting() {
|
||||
|
||||
auto* osr_rwhv = static_cast<OffScreenRenderWidgetHostView*>(
|
||||
web_contents()->GetRenderWidgetHostView());
|
||||
if (osr_rwhv) {
|
||||
if (osr_rwhv)
|
||||
osr_rwhv->SetPainting(false);
|
||||
osr_rwhv->Hide();
|
||||
}
|
||||
}
|
||||
|
||||
bool WebContents::IsPainting() const {
|
||||
|
||||
Reference in New Issue
Block a user