зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1801095 - Don't expose webgl_-prefixed uniforms to webgl. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D164007
This commit is contained in:
Родитель
9e2432536e
Коммит
e335b58f95
|
@ -705,11 +705,6 @@ static bool IsWebglOutOfProcessEnabled() {
|
|||
return StaticPrefs::webgl_out_of_process();
|
||||
}
|
||||
|
||||
static inline bool StartsWith(const std::string& haystack,
|
||||
const std::string& needle) {
|
||||
return haystack.find(needle) == 0;
|
||||
}
|
||||
|
||||
bool ClientWebGLContext::CreateHostContext(const uvec2& requestedSize) {
|
||||
const auto pNotLost = std::make_shared<webgl::NotLostData>(*this);
|
||||
auto& notLost = *pNotLost;
|
||||
|
|
|
@ -2159,6 +2159,7 @@ webgl::LinkActiveInfo GetLinkActiveInfo(
|
|||
}();
|
||||
|
||||
const auto userName = fnUnmapName(mappedName);
|
||||
if (StartsWith(userName, "webgl_")) continue;
|
||||
|
||||
// -
|
||||
|
||||
|
|
|
@ -318,11 +318,6 @@ ShaderValidator::ValidateAndTranslate(const char* const source) const {
|
|||
return ret;
|
||||
}
|
||||
|
||||
template <size_t N>
|
||||
static bool StartsWith(const std::string& haystack, const char (&needle)[N]) {
|
||||
return haystack.compare(0, N - 1, needle) == 0;
|
||||
}
|
||||
|
||||
bool ShaderValidatorResults::CanLinkTo(const ShaderValidatorResults& vert,
|
||||
nsCString* const out_log) const {
|
||||
MOZ_ASSERT(mValid);
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include <limits>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <tuple>
|
||||
#include <type_traits>
|
||||
#include <unordered_map>
|
||||
|
@ -1184,6 +1185,13 @@ inline void Memcpy(const RangedPtr<T>* const destBegin,
|
|||
|
||||
// -
|
||||
|
||||
inline bool StartsWith(const std::string_view str,
|
||||
const std::string_view part) {
|
||||
return str.find(part) == 0;
|
||||
}
|
||||
|
||||
// -
|
||||
|
||||
namespace webgl {
|
||||
|
||||
// In theory, this number can be unbounded based on the driver. However, no
|
||||
|
|
Загрузка…
Ссылка в новой задаче