-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bugfix/merged optimizations #578
Changes from all commits
737df0a
c65df0f
2074653
50da5a7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -127,6 +127,7 @@ class GLThread constructor( | |||
hasFinishedSinceDirty = true | ||||
finishDuration = System.currentTimeMillis() - finishDuration | ||||
} | ||||
val finishDuration = System.currentTimeMillis() - preFinish | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The variable - val finishDuration = System.currentTimeMillis() - preFinish Remove the redeclaration of Committable suggestion
Suggested change
|
||||
|
||||
try { | ||||
if (finishDuration < BREAK_RENDER_INTERVAL) { | ||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -164,8 +164,9 @@ class Tiled2dMapSource : | |
void onVisibleTilesChanged(const std::vector<VisibleTilesLayer> &pyramid, int keepZoomLevelOffset = 0); | ||
|
||
private: | ||
void performLoadingTask(Tiled2dMapTileInfo tile, size_t loaderIndex); | ||
void onStableTriggerNewTileLoading(uint64_t updateId); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The method Please add documentation to explain the purpose and usage of this method. |
||
|
||
void performLoadingTask(Tiled2dMapTileInfo tile, size_t loaderIndex); | ||
|
||
void updateTileMasks(); | ||
|
||
|
@@ -181,11 +182,14 @@ class Tiled2dMapSource : | |
|
||
std::unordered_map<size_t, std::map<Tiled2dMapTileInfo, ErrorInfo>> errorTiles; | ||
std::optional<long long> nextDelayTaskExecution; | ||
std::vector<PrioritizedTiled2dMapTileInfo> pendingTilesToLoad; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The member Please add documentation to explain the purpose and usage of this member. |
||
|
||
std::unordered_set<Tiled2dMapTileInfo> notFoundTiles; | ||
|
||
std::string layerName; | ||
|
||
uint64_t currentNewTilesUpdateId = 0; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The member Please add documentation to explain the purpose and usage of this member. |
||
const static int64_t PENDING_NEW_TILE_DEBOUNCE_MS = 200; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The constant Please add documentation to explain the purpose and usage of this constant. |
||
}; | ||
|
||
#include "Tiled2dMapSourceImpl.h" |
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -654,7 +654,8 @@ class ValueEvaluator { | |||||||
} | ||||||||
|
||||||||
if (isZoomDependent || (isStateDependant && !context.featureStateManager->empty())) { | ||||||||
return value->evaluateOr(context, defaultValue); | ||||||||
auto result = value->evaluateOr(context, defaultValue); | ||||||||
return result; | ||||||||
Comment on lines
+657
to
+658
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The - auto result = value->evaluateOr(context, defaultValue);
- return result;
+ return value->evaluateOr(context, defaultValue); Committable suggestion
Suggested change
|
||||||||
} | ||||||||
|
||||||||
auto identifier = context.feature->identifier; | ||||||||
|
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -58,6 +58,8 @@ class Tiled2dMapVectorSymbolObject { | |||
|
||||
void removeFromCache(); | ||||
|
||||
void removeFromCache(); | ||||
|
||||
Comment on lines
+61
to
+62
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Duplicate - void removeFromCache(); Remove the duplicate method definition to prevent compilation errors. Committable suggestion
Suggested change
|
||||
struct SymbolObjectInstanceCounts { int icons, textCharacters, stretchedIcons; }; | ||||
|
||||
const SymbolObjectInstanceCounts getInstanceCounts() const; | ||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The conditional block for generating OpenGL buffers only if they haven't been generated before is a good practice to avoid redundant operations. However, there is no corresponding flag set to
true
forglDataBuffersGenerated
after the buffers are generated. This could lead to the buffers not being generated at all ifglDataBuffersGenerated
is not properly initialized tofalse
.