Repository navigation
Raster cache hints on PaintingContext should assert that _currentLayer is not null #92722
Description
Activity
- addedframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.P2Important issues not at the top of the work listImportant issues not at the top of the work list
on Oct 29, 2021 @dnfield Hey dnfield! I'd like to take this one if you're cool with that.
I see
_currentLayergets asserted inside ofget canvasandget _isRecording. Are you wanting to additionally add_currentLayeras a parameter toPaintingContextand assert it there?Or are you wanting to assert
_currentLayerinside of_startRecording()?Let me know if I'm way off base with what I'm assuming you want to be done.
Reacted by Dan FieldI think for now we should assert that the canvas has been accessed before setting these flags.
The setIsComplex and will change flags
Yes, although at that point we should be able to use a
!instead of?.There's still a larger problem here though - setting these hints only affects the current layer being painted, and will get lost if additional layers get appended :\
- addedteam-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework team
on Jul 8, 2023 - added a commit that references this issue
on Jul 20, 2023 - added a commit that references this issue
on Jul 31, 2023 This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.- locked as resolved and limited conversation to collaborators
on Aug 3, 2023


_currentLayer gets set when you first access the canvas.
If it's null, the hint will silently not get set.
Alternatively, we should just _startRecording when the hint(s) are set.