perf: add signal to invalidate buffers without doing layout (#5123)
This commit is contained in:
@@ -74,7 +74,8 @@ int MessageLayout::getWidth() const
|
||||
|
||||
// Layout
|
||||
// return true if redraw is required
|
||||
bool MessageLayout::layout(int width, float scale, MessageElementFlags flags)
|
||||
bool MessageLayout::layout(int width, float scale, MessageElementFlags flags,
|
||||
bool shouldInvalidateBuffer)
|
||||
{
|
||||
// BenchmarkGuard benchmark("MessageLayout::layout()");
|
||||
|
||||
@@ -108,6 +109,11 @@ bool MessageLayout::layout(int width, float scale, MessageElementFlags flags)
|
||||
|
||||
if (!layoutRequired)
|
||||
{
|
||||
if (shouldInvalidateBuffer)
|
||||
{
|
||||
this->invalidateBuffer();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user