upgrades offscreen rendering to latest chromium

This commit is contained in:
Gellert Hegyi 2017-10-19 21:04:21 +02:00 committed by Cheng Zhao
parent c9b7fc2922
commit 5d79dbc9a1
5 changed files with 29 additions and 28 deletions

View file

@ -84,12 +84,16 @@ void OffScreenOutputDevice::SetActive(bool active, bool paint) {
return;
active_ = active;
if (active_ && paint)
if (!active_ && !pending_damage_rect_.IsEmpty() && paint)
OnPaint(gfx::Rect(viewport_pixel_size_));
}
void OffScreenOutputDevice::OnPaint(const gfx::Rect& damage_rect) {
gfx::Rect rect = damage_rect;
if (!pending_damage_rect_.IsEmpty()) {
rect.Union(pending_damage_rect_);
pending_damage_rect_.SetRect(0, 0, 0, 0);
}
rect.Intersect(gfx::Rect(viewport_pixel_size_));
if (rect.IsEmpty())