fixes paint toggling

This commit is contained in:
gellert 2016-07-31 22:05:36 +02:00
parent 0098d5bca7
commit 1cd1c5e01c
3 changed files with 27 additions and 207 deletions

View file

@ -70,8 +70,9 @@ void OffScreenOutputDevice::SetActive(bool active) {
return;
active_ = active;
if (!active_ && !pending_damage_rect_.IsEmpty())
OnPaint(pending_damage_rect_);
if (active_)
OnPaint(gfx::Rect(0, 0, viewport_pixel_size_.width(),
viewport_pixel_size_.height()));
}
void OffScreenOutputDevice::OnPaint(const gfx::Rect& damage_rect) {

View file

@ -839,6 +839,10 @@ void OffScreenRenderWidgetHostView::SetPainting(bool painting) {
if (begin_frame_timer_.get()) {
begin_frame_timer_->SetActive(painting);
}
if (software_output_device_) {
software_output_device_->SetActive(painting);
}
}
bool OffScreenRenderWidgetHostView::IsPainting() const {