Skip to content

Apple libcurl replacement#169

Merged
CedricGuillemet merged 16 commits into
BabylonJS:masterfrom
CedricGuillemet:httpreqApple
Mar 25, 2020
Merged

Apple libcurl replacement#169
CedricGuillemet merged 16 commits into
BabylonJS:masterfrom
CedricGuillemet:httpreqApple

Conversation

@CedricGuillemet

@CedricGuillemet CedricGuillemet commented Mar 5, 2020

Copy link
Copy Markdown
Collaborator

ios build down from 22min to 3
macos down from 10min to 2

@CedricGuillemet CedricGuillemet marked this pull request as ready for review March 5, 2020 17:47
Comment thread Apps/Playground/iOS/LibNativeBridge.mm Outdated
Comment thread Apps/Playground/iOS/LibNativeBridge.mm Outdated
Comment thread Dependencies/BabylonNativeUtils/Source/NetworkUtils.mm
Comment thread Dependencies/BabylonNativeUtils/Source/NetworkUtils.mm
Comment thread Plugins/XMLHttpRequest/Include/Babylon/XMLHttpRequestApple.h
Comment thread Apps/Playground/iOS/LibNativeBridge.mm Outdated
Comment thread Apps/Playground/iOS/LibNativeBridge.mm Outdated
"Include/Babylon/NetworkUtils.h"
"Include/Babylon/TicketedCollection.h"
"Source/NetworkUtils.cpp")
if(APPLE)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I'm a little iffy about the platform-specific guards we have in here. I know they're inevitable in certain cases, but we really ended up with a ton of them before the plugin refactor (many of which we still have), and for me it felt pretty messy. Can we look for alternatives for how to minimize these, at least within scenarios where we have duplicated code, as below?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

best alternative is to have specific plugin/project per platform IMHO. instead of guards we would have more cmakelists.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be fine with that. Is this just a temporary workaround, then? If so, can we associate an issue with it?

assert(resources.uniform_buffers.size() == 1);
const spirv_cross::Resource& uniformBuffer = resources.uniform_buffers[0];
#if (BGFX_CONFIG_RENDERER_METAL)
#if __APPLE__

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change? The comment below indicates that the guarded behavior is specific to Metal, not Apple; is that incorrect?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BGFX_CONFIG_RENDERER_METAL not defined. APPLE is the only define that I've found to make the guard.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: We should probably associate this with the rendering engine somewhere down the line, since this could cause problems if somebody doesn't use the default runtime for the platform (i.e., GL or MoltenVK or whatever).

Comment thread Plugins/XMLHttpRequest/CMakeLists.txt
Comment thread Apps/Playground/iOS/LibNativeBridge.mm Outdated
std::unique_ptr<InputManager::InputBuffer> inputBuffer{};



Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Why the lines? Is this an Objective-C style thing?

"Include/Babylon/NetworkUtils.h"
"Include/Babylon/TicketedCollection.h"
"Source/NetworkUtils.cpp")
if(APPLE)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be fine with that. Is this just a temporary workaround, then? If so, can we associate an issue with it?

assert(resources.uniform_buffers.size() == 1);
const spirv_cross::Resource& uniformBuffer = resources.uniform_buffers[0];
#if (BGFX_CONFIG_RENDERER_METAL)
#if __APPLE__

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: We should probably associate this with the rendering engine somewhere down the line, since this could cause problems if somebody doesn't use the default runtime for the platform (i.e., GL or MoltenVK or whatever).

Comment thread Dependencies/napi/include/napi/env.h Outdated
@syntheticmagus syntheticmagus self-requested a review March 24, 2020 18:30

@syntheticmagus syntheticmagus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pending the renaming stuff, and preferably with issues to track some of the temporary workaround bits we want to clean up later, looks good to me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants