-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
flutter/engine
#24688Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectc: performanceRelates to speed or footprint issues (see "perf:" labels)Relates to speed or footprint issues (see "perf:" labels)e: web_htmlHTML rendering backend for WebHTML rendering backend for Webengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.platform-webWeb applications specificallyWeb applications specificallyteam-webOwned by Web platform teamOwned by Web platform teamtriaged-webTriaged by Web platform teamTriaged by Web platform team
Description
Current PathRef.getRRect() reconstructs the RRect from the verbs. However, at the time the path is constructed we already have the RRect object, and we record that the path is an RRect using the fIsRRect field. We destroy this information and rebuild it again later in _getRRect(). Instead, we could store the original RRect and use it both as the "path is rrect" signal and as a fast way to get the RRect object. Pseudo-code (the devil's in the detail):
BEFORE:
// Field
bool fIsRRect = false;
// Check if RRect
if (fIsRRect)
// Declare that the path is no a simple RRect
fIsRRect = false;
// Declare the the path is a simple RRect
fIsRRect = true;
AFTER:
// Field
RRect? asRRect;
// Check if RRect
if (asRRect != null)
// Declare that the path is no a simple RRect
asRRect = null;
// Declare the the path is a simple RRect
asRRect = rrectPassedToPathAddRRect;
Then PathRef._getRRect() can be removed entirely, or used for detection of RRects created using lower-level path operations rather than addRRect.
Metadata
Metadata
Assignees
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectc: performanceRelates to speed or footprint issues (see "perf:" labels)Relates to speed or footprint issues (see "perf:" labels)e: web_htmlHTML rendering backend for WebHTML rendering backend for Webengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.platform-webWeb applications specificallyWeb applications specificallyteam-webOwned by Web platform teamOwned by Web platform teamtriaged-webTriaged by Web platform teamTriaged by Web platform team