Only emit image painting events in debug & profile modes. (#118872)
* Only emit image painting events in debug & profile modes. These events were being emitted in release mode, which was showing up in the profiler for my app as taking up a noticeable amount of build time (still well within the frame budget, but this code was near the top of the list). * Review comment
This commit is contained in:
parent
426cdd90cd
commit
83c3a61e3f
@ -599,7 +599,7 @@ void paintImage({
|
||||
return true;
|
||||
}());
|
||||
// Avoid emitting events that are the same as those emitted in the last frame.
|
||||
if (!_lastFrameImageSizeInfo.contains(sizeInfo)) {
|
||||
if (!kReleaseMode && !_lastFrameImageSizeInfo.contains(sizeInfo)) {
|
||||
final ImageSizeInfo? existingSizeInfo = _pendingImageSizeInfo[sizeInfo.source];
|
||||
if (existingSizeInfo == null || existingSizeInfo.displaySizeInBytes < sizeInfo.displaySizeInBytes) {
|
||||
_pendingImageSizeInfo[sizeInfo.source!] = sizeInfo;
|
||||
|
Loading…
x
Reference in New Issue
Block a user