[Code health] Pass FloatSize to CSSPaintDefinition::Paint
Right now the CSSPaintDefinition::Paint takes a IntSize which is the container size with subpixel snapping. At this moment there are two type cast: 1. The call site of the CSSPaintDefinition::Paint converts a FloatSize to IntSize 2. Inside the CSSPaintDefinition::Paint, GetSpecifiedSize is called which type casts the IntSize to float and uses it. This CL cleans it up by passing a FloatSize. That is, the Paint function takes a FloatSize such that type casting can be avoided at the GetSpecifiedSize. When we need to use the subpixel snapped size in the Paint function, we then conver the FloatSize to an IntSize. This CL should not introduce any behavior change. Bug: None Change-Id: I1387145c03b60380a0e0a53f2686647a54327e71 Reviewed-on: https://chromium-review.googlesource.com/c/1286440Reviewed-by:Stephen McGruer <smcgruer@chromium.org> Reviewed-by:
Anders Ruud <andruud@chromium.org> Commit-Queue: Xida Chen <xidachen@chromium.org> Cr-Commit-Position: refs/heads/master@{#600770}
Showing
Please register or sign in to comment