[FCP++] Simplify reactivation logic in TextPaint, ImagePaint
The design of FCP++ have several containers that store the node ids of objects. In case the size of them will grow unlimitedly, we set a cap for these containers. The original implementation uses a counter to count the number of nodes. As a better approach, we can use the sum of the sizes of the containers for the same purpose. The original implementation uses "recorded_node_count_ > kTextNodeNumberLimit" as a condition. The condition was still checked each time after the condition has been met. As A better approach, we can have "is_recording_" flag to indicate whether the container still accepts new entries. Bug: 869924 Change-Id: Ifc03e5f782e16bab65f6f024d9f73974051ca421 Reviewed-on: https://chromium-review.googlesource.com/c/1349477 Commit-Queue: Liquan (Max) Gǔ <maxlg@chromium.org> Reviewed-by:Steve Kobes <skobes@chromium.org> Cr-Commit-Position: refs/heads/master@{#611849}
Showing
Please register or sign in to comment