[LayoutNG] Improvements in using DrawingRecorder in PaintTextChild
This patch improves the logic in PaintTextChild so that: 1. Move DrawingRecorder code after the check of ShouldPaintTextFragment and have_selection. This matches to InlineTextBoxPainter logic order, avoiding instantiation of DrawingRecorder if nothing are painted. 2. Check LayoutObject::IsSelected before ComputeLayoutSelectionStatus. This matches to legacy InlineTextBoxPainter, avoiding a few unnecessary function calls when there is no selection on the LayoutObject. These are not the primary goal of issue 936024, but found during the review and has positive impacts on blink_perf: https://pinpoint-dot-chromeperf.appspot.com/job/1184c765340000 Bug: 936024 Change-Id: Idda53c9f41476d6024c6f5855594b3bd7dd35418 Reviewed-on: https://chromium-review.googlesource.com/c/1487432Reviewed-by:Xianzhu Wang <wangxianzhu@chromium.org> Commit-Queue: Koji Ishii <kojii@chromium.org> Cr-Commit-Position: refs/heads/master@{#635626}
Showing
Please register or sign in to comment