forked from Pissandshittium/pissandshittium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use nine-patch resource for drawing Aura overlay scrollbar thumb.
This patch factors out the nine-patch generation from NinePatchLayer into a NinePatchGenerator and uses it to create a nine-patch scrollbar layer that can change size without a repaint. This is used only in the compositor. Scrollbars painted in Blink paint to the full required size. The new scrollbar type is implemented in OverlayScrollbarLayer and Impl. We add methods to NativeTheme to draw 9-patch versions of a theme part, currently implemented for the scrollbar thumb for overlays in NativeThemeAura. The NativeTheme provides two methods: NinePatchCanvasSize() returns the size of the smallest canvas onto which a nine patch part can be drawn. NinePatchAperture() returns the rect in the canvas, whose size is provided by the method above, which will be used as the middle patch in the resource. Resizing the part will stretch only the middle patch in both directions. This is used mainly for the thinning animation in Aura overlay scrollbars. We still need to repaint due to hover and pressed effects. Technically, we could avoid repainting on size changes too but this would require some additional work. BUG=669670 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Review-Url: https://codereview.chromium.org/2591863003 Cr-Commit-Position: refs/heads/master@{#454413}
- Loading branch information
Showing
45 changed files
with
1,692 additions
and
396 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.