Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editable elements are a repaint boundary #396

Merged
merged 2 commits into from
Aug 16, 2024

Conversation

amantoux
Copy link
Member

Closes #394

Copy link

codecov bot commented Aug 10, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 87.93%. Comparing base (b31e126) to head (bd64013).
Report is 6 commits behind head on master.

Files Patch % Lines
packages/fleather/lib/src/rendering/editor.dart 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #396      +/-   ##
==========================================
- Coverage   87.94%   87.93%   -0.01%     
==========================================
  Files          61       61              
  Lines       10311    10312       +1     
==========================================
  Hits         9068     9068              
- Misses       1243     1244       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@amantoux amantoux force-pushed the fix/cursor_blink_gpu_intensive branch from 5c56b1c to 9798d06 Compare August 10, 2024 18:13
@amantoux amantoux requested a review from Amir-P August 10, 2024 18:16
@amantoux amantoux changed the title EditableTextLine is a repaint boundary Editable elements are a repaint boundaris Aug 11, 2024
@amantoux amantoux changed the title Editable elements are a repaint boundaris Editable elements are a repaint boundaries Aug 12, 2024
@amantoux
Copy link
Member Author

@Amir-P can you please review?

@amantoux amantoux changed the title Editable elements are a repaint boundaries Editable elements are a repaint boundary Aug 13, 2024
Copy link
Member

@Amir-P Amir-P left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! LGTM overall. I just had a question and left you in the comments. PTAL.

Also here are the performance results against master (from the tool added in #384):

Analyzing tests for scrolling
Average Frame Build Time: Target: 57.08 Reference: 58.51
90th Percentile Frame Build Time: Target: 65.83 Reference: 62.51
90th Percentile Frame Build Time: Target: 68.48 Reference: 66.92
Average GPU Frame Time: Target: 0.00 Reference: 0.00
Performance tests found no regression

Analyzing tests for editing
Average Frame Build Time: Target: 430.64 Reference: 712.07
90th Percentile Frame Build Time: Target: 434.68 Reference: 715.65
90th Percentile Frame Build Time: Target: 435.07 Reference: 716.17
Average GPU Frame Time: Target: 0.00 Reference: 0.00
Performance tests found no regression

@@ -861,6 +861,7 @@ class RenderEditor extends RenderEditableContainerBox
_floatingCursorRect = null;
_cursorController.setFloatingCursorTextPosition(null);
}
markNeedsPaint();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've experiment with and without this line and saw no changes. Can you explain why it was added? And maybe add a test for that so we don't forget in the future?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The floating cursor stay until the next tap or edit action
In the video, notice the floating cursor that remains after releasing the floating cursor

Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-08-16.at.18.23.14.mp4

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then I guess no need for a test. It would be really hard to test it I guess.

Copy link
Member

@Amir-P Amir-P left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@Amir-P Amir-P merged commit 7b21eef into master Aug 16, 2024
3 of 4 checks passed
@Amir-P Amir-P deleted the fix/cursor_blink_gpu_intensive branch August 16, 2024 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The blinking cursor in the Fleather editor is causing severe heating of the phone.
2 participants