Remove extraneous includes from texture.h.#111481
Conversation
0d995cb to
7c4c5ef
Compare
7c4c5ef to
985e617
Compare
| virtual int screen_get_dpi(int p_screen = SCREEN_OF_MAIN_WINDOW) const = 0; | ||
| virtual float screen_get_scale(int p_screen = SCREEN_OF_MAIN_WINDOW) const; | ||
| virtual float screen_get_max_scale() const { | ||
| float scale = 1.f; |
There was a problem hiding this comment.
That seems unrelated to the include change.
There was a problem hiding this comment.
Ah well I just read the OP :P
A change to rendering_server.h which is required because of a shadowing warning in SCU builds.... (maybe we should disable shadowing warnings in SCU builds?)
You meant display_server.h, and yeah that makes sense.
There was a problem hiding this comment.
For historical purposes I took the liberty to edit the PR's description to match.
|
|
||
| #include "editor/inspector/editor_inspector.h" | ||
| #include "editor/plugins/editor_plugin.h" | ||
| #include "scene/resources/gradient.h" |
There was a problem hiding this comment.
Why the missing includes are added to the header, instead of forward-declared?
There was a problem hiding this comment.
Because they were also fully included previously (i think), and adding them as forward declarations might require more includes elsewhere. I'm trying to keep efforts focused on removing the most impactful includes.
Mickeon
left a comment
There was a problem hiding this comment.
I looked at every file here, just checking if the new includes made sense.
|
Thanks! |
One of the top contributors to compile time is
texture.h, through its extraneous includes that lead to e.g.rendering_server.h,os.h,engine.h, andcamera_server.h.Almost all of them can be removed without trade-off, because
texture.hwasn't actually using them.By removing them, both the fresh compile cost should go down, as should recompile cost when changing in any areas related to the files above.
The main cascading changes are:
rendering_server.hincludes to texture source filesgradient.hincludes to texture header filesdisplay_server.hwhich is required because of a shadowing warning in SCU builds.... (maybe we should disable shadowing warnings in SCU builds?)