bool BufferStateLayer::willPresentCurrentTransaction() const {
// Returns true if the most recent Transaction applied to CurrentState will be presented.
return (getSidebandStreamChanged() || getAutoRefresh() ||
(mDrawingState.modified &&
(mDrawingState.buffer != nullptr || mDrawingState.bgColorLayer != nullptr)));
}
mDrawingState.modified
是 true 说明有属性变更,包括 buffer。buffer
非空,或 bgColorLayer
非空,则返回 true。