OSDN Git Service

Fix the repaint inval mechanism for layers - DO NOT MERGE
authorNicolas Roard <nicolasroard@google.com>
Wed, 7 Dec 2011 23:46:29 +0000 (15:46 -0800)
committerNicolas Roard <nicolasroard@google.com>
Thu, 8 Dec 2011 00:15:13 +0000 (16:15 -0800)
commit3d0d375adaf3c93bcafebdb15fa6675e463aa565
tree06dd0fdafe36c627b10de067e513ee3ce97a9a37
parentf288ebbc0f8b160082a78668df554a4ae7192e11
Fix the repaint inval mechanism for layers - DO NOT MERGE

We only keep the scrollable layers invalidating their entire area
instead of incurring this penalty for *all* layers.

Also remove unnecessary repaint when scrolling (we have the entire
content on the UI side already).

While the entire scrollable area will be invalidated and marked
as dirty, the existing code in PaintedSurface already only look at
the visible tiles of scrollable layers to consider the layer's content
as being ready to display, so the real world penalty (while far from
optimal) is limited.

Implementing the correct approach (only invalidating what really
changed on scrollable layers) would sadly be a lot more complex,
as currently webkit will *not* send us the repaint invals if they
are on a currently clipped area, as webkit's default behaviour
to implement scrolling of such element is to repaint them anyway...

bug:5721618

Change-Id: Ia470157c716fa1c557e4a196ba014296ad9e627a
Source/WebCore/platform/graphics/android/BaseTile.cpp
Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp
Source/WebCore/rendering/RenderLayer.cpp