Merge revision 526 changes:

- Invalidate the entire scroll rect when using off-screen rendering mode (issue #469).

git-svn-id: https://chromiumembedded.googlecode.com/svn/branches/963@528 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2012-03-13 15:09:34 +00:00
parent 9ba4603109
commit 542e115b9b
2 changed files with 56 additions and 8 deletions

View File

@@ -289,10 +289,11 @@ void WebWidgetHost::DidScrollRect(int dx, int dy, const gfx::Rect& clip_rect) {
DCHECK(dx || dy);
// Invalidate and re-paint the entire scroll rect if:
// 1. We're in a state where we cannot draw into the view right now, or
// 2. The rect is being scrolled by more than the size of the view, or
// 3. The scroll rect intersects the current paint region.
if (!canvas_.get() || layouting_ || painting_ ||
// 1. Window rendering is disabled, or
// 2. We're in a state where we cannot draw into the view right now, or
// 3. The rect is being scrolled by more than the size of the view, or
// 4. The scroll rect intersects the current paint region.
if (!view_ || !canvas_.get() || layouting_ || painting_ ||
abs(dx) >= clip_rect.width() || abs(dy) >= clip_rect.height() ||
paint_rgn_.intersects(convertToSkiaRect(clip_rect))) {
DidInvalidateRect(clip_rect);