DescriptionThis CL fixes a more general issue in Views that had a quick fix
that landed here: https://codereview.chromium.org/1460733002/
The general problem is that the layer owned by a parent View can
become dirty/stale when a child view is painting to it's own layer.
This CL fixes the problem by scheduling paints on the parent view
when it may be dirty.
BUG=551492, 546683
TEST=ViewLayerTest.NoCrashWhenParentlessViewSchedulesPaintOnParent
ViewLayerTest.ScheduledRectsInParentAfterSchedulingPaint
ViewLayerTest.ParentPaintWhenSwitchingPaintToLayerFromFalseToTrue
ViewLayerTest.NoParentPaintWhenSwitchingPaintToLayerFromTrueToTrue
Committed: https://crrev.com/c8761106916aac604f30fb2223cdbfb2bd3ffda3
Cr-Commit-Position: refs/heads/master@{#367536}
Patch Set 1 #Patch Set 2 : Fixed the diff base. #Patch Set 3 : Removed parent()->SchedulePaint() from ToolbarButton::AddInkDropLayer(). #
Total comments: 3
Patch Set 4 : Changed View to schedule a parent paint only when paint to layer, or fills bounds opaquely changed. #
Total comments: 4
Patch Set 5 : Added ViewTests that confirm a paint was scheduled on the parent. #Patch Set 6 : Added ViewLayerTests to check paints scheduled on the parent. #
Total comments: 4
Patch Set 7 : Moved SchedulePaintOnParent() call to CreateLayer(). #Patch Set 8 : Changed doc comment in View::CreateLayer(). #
Messages
Total messages: 27 (10 generated)
|