mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-06-04 20:46:29 +03:00
Small micro optimizations.
This commit is contained in:
@@ -558,7 +558,7 @@ void Node::nodeDraw() {
|
||||
|
||||
matrixSet();
|
||||
|
||||
bool needsClipPlanes = isMeOrParentTreeScaledOrRotatedOrFrameBuffer();
|
||||
bool needsClipPlanes = isClipped() && isMeOrParentTreeScaledOrRotatedOrFrameBuffer();
|
||||
|
||||
clipStart( needsClipPlanes );
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ void SceneNode::draw() {
|
||||
matrixSet();
|
||||
|
||||
if ( NULL == mFrameBuffer || !usesInvalidation() || invalidated() ) {
|
||||
bool needsClipPlanes = isMeOrParentTreeScaledOrRotatedOrFrameBuffer();
|
||||
bool needsClipPlanes = isClipped() && isMeOrParentTreeScaledOrRotatedOrFrameBuffer();
|
||||
|
||||
clipStart( needsClipPlanes );
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <eepp/system/scopedop.hpp>
|
||||
#include <eepp/ui/doc/documentview.hpp>
|
||||
|
||||
#ifdef EE_DEBUG
|
||||
#if 0
|
||||
#define EE_VERIFY_STRUCTURAL_CONSISTENCY
|
||||
#endif
|
||||
|
||||
|
||||
@@ -204,7 +204,9 @@ bool SyntaxHighlighter::updateDirty( int visibleLinesCount ) {
|
||||
mMaxWantedLine = 0;
|
||||
} else {
|
||||
bool changed = false;
|
||||
Int64 max = eemax( 0LL, eemin( mFirstInvalidLine + visibleLinesCount, mMaxWantedLine ) );
|
||||
Int64 max =
|
||||
eemax( 0LL, eemin( eemin( mFirstInvalidLine + visibleLinesCount, mMaxWantedLine ),
|
||||
static_cast<Int64>( mDoc->linesCount() - 1 ) ) );
|
||||
|
||||
for ( Int64 index = mFirstInvalidLine; index <= max; index++ ) {
|
||||
SyntaxState state;
|
||||
|
||||
@@ -1063,7 +1063,8 @@ void UINode::nodeDraw() {
|
||||
|
||||
matrixSet();
|
||||
|
||||
bool needsClipPlanes = isMeOrParentTreeScaledOrRotatedOrFrameBuffer();
|
||||
bool needsClipPlanes =
|
||||
mClip.getClipType() != ClipType::None && isMeOrParentTreeScaledOrRotatedOrFrameBuffer();
|
||||
|
||||
smartClipStart( ClipType::BorderBox, needsClipPlanes );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user