Merge pull request #8628 from Spacetech/master

Implement invalidate for non-offscreen mode
This commit is contained in:
Kevin Sawicki 2017-02-14 11:41:16 -08:00 committed by GitHub
commit 9be42db8d5
7 changed files with 23 additions and 6 deletions

View file

@ -1500,13 +1500,16 @@ int WebContents::GetFrameRate() const {
}
void WebContents::Invalidate() {
if (!IsOffScreen())
return;
auto* osr_rwhv = static_cast<OffScreenRenderWidgetHostView*>(
if (IsOffScreen()) {
auto* osr_rwhv = static_cast<OffScreenRenderWidgetHostView*>(
web_contents()->GetRenderWidgetHostView());
if (osr_rwhv)
osr_rwhv->Invalidate();
if (osr_rwhv)
osr_rwhv->Invalidate();
} else {
const auto owner_window = owner_window();
if (owner_window)
owner_window->Invalidate();
}
}
void WebContents::SetZoomLevel(double level) {