From 322cb0664bd573999f5c588cb8f46fea7a671d3a Mon Sep 17 00:00:00 2001 From: Cocos Robot <48829427+cocos-robot@users.noreply.github.com> Date: Wed, 23 Mar 2022 16:56:31 +0800 Subject: [PATCH] [ci skip][AUTO]: Automated clang-format update: b779f0a2e81e2dab3194eff8e850d5a8910c7c7a (#10459) (#10464) Co-authored-by: cocos-robot --- .../SkeletalAnimationUtils.h | 26 +++---- native/cocos/audio/AudioEngine.cpp | 6 +- native/cocos/audio/android/AudioEngine-inl.h | 2 +- .../cocos/audio/android/AudioPlayerProvider.h | 4 +- native/cocos/audio/apple/AudioEngine-inl.h | 2 +- native/cocos/audio/oalsoft/AudioEngine-soft.h | 4 +- native/cocos/base/Scheduler.h | 4 +- native/cocos/base/std/container/map.h | 2 +- .../cocos/base/std/container/unordered_map.h | 9 ++- .../cocos/bindings/event/EventDispatcher.cpp | 2 +- native/cocos/bindings/event/EventDispatcher.h | 2 +- native/cocos/bindings/jswrapper/jsc/Base.h | 2 +- native/cocos/bindings/jswrapper/v8/Base.h | 2 +- native/cocos/bindings/jswrapper/v8/Object.cpp | 2 +- .../bindings/manual/jsb_conversions_spec.h | 2 +- native/cocos/bindings/manual/jsb_platform.h | 2 +- .../bindings/manual/jsb_xmlhttprequest.cpp | 2 +- native/cocos/core/DataView.h | 2 +- native/cocos/core/Types.h | 2 +- .../core/animation/SkeletalAnimationUtils.cpp | 2 +- native/cocos/core/assets/Font.h | 18 ++--- native/cocos/core/assets/Material.h | 2 +- native/cocos/core/builtin/DebugInfos.h | 2 +- .../cocos/core/builtin/ShaderSourceAssembly.h | 2 +- native/cocos/core/event/CallbacksInvoker.h | 2 +- native/cocos/network/Downloader-curl.cpp | 8 +-- native/cocos/network/Downloader-java.cpp | 2 +- native/cocos/network/Downloader-java.h | 4 +- native/cocos/network/DownloaderImpl.h | 2 +- native/cocos/network/SocketIO.h | 2 +- native/cocos/network/WebSocketServer.h | 2 +- native/cocos/physics/physx/PhysXUtils.h | 2 +- native/cocos/platform/FileUtils.h | 2 +- native/cocos/platform/java/jni/JniHelper.h | 2 +- native/cocos/primitive/Transform.cpp | 4 +- native/cocos/profiler/GameStats.h | 4 +- native/cocos/renderer/core/ProgramLib.h | 2 +- .../cocos/renderer/frame-graph/Blackboard.h | 2 +- .../frame-graph/DevicePassResourceTable.h | 2 +- .../renderer/frame-graph/ResourceAllocator.h | 4 +- native/cocos/renderer/gfx-base/GFXQueryPool.h | 10 +-- .../renderer/gfx-gles2/GLES2Commands.cpp | 2 +- .../renderer/gfx-gles2/GLES2GPUObjects.h | 52 +++++++------- .../renderer/gfx-gles3/GLES3Commands.cpp | 2 +- .../renderer/gfx-gles3/GLES3GPUObjects.h | 68 +++++++++---------- .../gfx-metal/MTLRenderCommandEncoder.h | 48 ++++++------- native/cocos/renderer/gfx-metal/MTLShader.h | 12 ++-- native/cocos/renderer/pipeline/Define.cpp | 2 +- native/cocos/renderer/pipeline/Define.h | 2 +- .../pipeline/GlobalDescriptorSetManager.h | 20 +++--- .../renderer/pipeline/PipelineSceneData.h | 60 ++++++++-------- .../cocos/renderer/pipeline/RenderPipeline.h | 12 ++-- 52 files changed, 220 insertions(+), 221 deletions(-) diff --git a/native/cocos/3d/skeletal-animation/SkeletalAnimationUtils.h b/native/cocos/3d/skeletal-animation/SkeletalAnimationUtils.h index 16153daaee..ec772dac24 100644 --- a/native/cocos/3d/skeletal-animation/SkeletalAnimationUtils.h +++ b/native/cocos/3d/skeletal-animation/SkeletalAnimationUtils.h @@ -60,14 +60,14 @@ struct IInternalJointAnimInfo { class IJointTextureHandle { public: - uint32_t pixelOffset{0}; - uint32_t refCount{0}; - uint64_t clipHash{0}; - uint64_t skeletonHash{0}; - bool readyToBeDeleted{false}; - ITextureBufferHandle handle; + uint32_t pixelOffset{0}; + uint32_t refCount{0}; + uint64_t clipHash{0}; + uint64_t skeletonHash{0}; + bool readyToBeDeleted{false}; + ITextureBufferHandle handle; ccstd::unordered_map> bounds; - cc::optional> animInfos; + cc::optional> animInfos; static IJointTextureHandle *createJoinTextureHandle() { return new IJointTextureHandle(); @@ -114,12 +114,12 @@ public: private: // const IInternalJointAnimInfo &createAnimInfos(Skeleton *skeleton, AnimationClip *clip, Node *skinningRoot); // TODO(xwx): AnimationClip not define - gfx::Device * _device{nullptr}; - IntrusivePtr _pool; + gfx::Device * _device{nullptr}; + IntrusivePtr _pool; ccstd::unordered_map _textureBuffers; - uint32_t _formatSize{0}; - uint32_t _pixelsPerJoint{0}; - IntrusivePtr _customPool; + uint32_t _formatSize{0}; + uint32_t _pixelsPerJoint{0}; + IntrusivePtr _customPool; ccstd::unordered_map _chunkIdxMap; // hash -> chunkIdx CC_DISALLOW_COPY_MOVE_ASSIGN(JointTexturePool); @@ -147,7 +147,7 @@ public: private: ccstd::unordered_map _pool; // pre node - gfx::Device * _device{nullptr}; + gfx::Device * _device{nullptr}; CC_DISALLOW_COPY_MOVE_ASSIGN(JointAnimationInfo); }; diff --git a/native/cocos/audio/AudioEngine.cpp b/native/cocos/audio/AudioEngine.cpp index 0b9a951598..c39fd43bf1 100644 --- a/native/cocos/audio/AudioEngine.cpp +++ b/native/cocos/audio/AudioEngine.cpp @@ -62,10 +62,10 @@ const float AudioEngine::TIME_UNKNOWN = -1.0F; ccstd::unordered_map> AudioEngine::sAudioPathIDMap; //profileName,ProfileHelper ccstd::unordered_map AudioEngine::sAudioPathProfileHelperMap; -unsigned int AudioEngine::sMaxInstances = MAX_AUDIOINSTANCES; -AudioEngine::ProfileHelper * AudioEngine::sDefaultProfileHelper = nullptr; +unsigned int AudioEngine::sMaxInstances = MAX_AUDIOINSTANCES; +AudioEngine::ProfileHelper * AudioEngine::sDefaultProfileHelper = nullptr; ccstd::unordered_map AudioEngine::sAudioIDInfoMap; -AudioEngineImpl * AudioEngine::sAudioEngineImpl = nullptr; +AudioEngineImpl * AudioEngine::sAudioEngineImpl = nullptr; float AudioEngine::sVolumeFactor = 1.0F; uint32_t AudioEngine::sOnPauseListenerID = 0; diff --git a/native/cocos/audio/android/AudioEngine-inl.h b/native/cocos/audio/android/AudioEngine-inl.h index cb9e52f306..ae0dc13025 100644 --- a/native/cocos/audio/android/AudioEngine-inl.h +++ b/native/cocos/audio/android/AudioEngine-inl.h @@ -28,9 +28,9 @@ #include #include #include -#include "base/std/container/unordered_map.h" #include "base/RefCounted.h" #include "base/Utils.h" +#include "base/std/container/unordered_map.h" #define MAX_AUDIOINSTANCES 13 diff --git a/native/cocos/audio/android/AudioPlayerProvider.h b/native/cocos/audio/android/AudioPlayerProvider.h index cb90afe62e..147ffdeb85 100644 --- a/native/cocos/audio/android/AudioPlayerProvider.h +++ b/native/cocos/audio/android/AudioPlayerProvider.h @@ -100,7 +100,7 @@ private: ICallerThreadUtils *_callerThreadUtils; ccstd::unordered_map _pcmCache; - std::mutex _pcmCacheMutex; + std::mutex _pcmCacheMutex; struct PreloadCallbackParam { PreloadCallback callback; @@ -108,7 +108,7 @@ private: }; ccstd::unordered_map> _preloadCallbackMap; - std::mutex _preloadCallbackMutex; + std::mutex _preloadCallbackMutex; std::mutex _preloadWaitMutex; std::condition_variable _preloadWaitCond; diff --git a/native/cocos/audio/apple/AudioEngine-inl.h b/native/cocos/audio/apple/AudioEngine-inl.h index 9241412498..c93af6f722 100644 --- a/native/cocos/audio/apple/AudioEngine-inl.h +++ b/native/cocos/audio/apple/AudioEngine-inl.h @@ -80,7 +80,7 @@ private: //audioID,AudioInfo ccstd::unordered_map _audioPlayers; - std::mutex _threadMutex; + std::mutex _threadMutex; bool _lazyInitLoop; diff --git a/native/cocos/audio/oalsoft/AudioEngine-soft.h b/native/cocos/audio/oalsoft/AudioEngine-soft.h index 366ffb93e7..30cb2ad662 100644 --- a/native/cocos/audio/oalsoft/AudioEngine-soft.h +++ b/native/cocos/audio/oalsoft/AudioEngine-soft.h @@ -26,9 +26,9 @@ #pragma once -#include "base/std/container/unordered_map.h" #include "audio/oalsoft/AudioCache.h" #include "audio/oalsoft/AudioPlayer.h" +#include "base/std/container/unordered_map.h" #include "cocos/base/RefCounted.h" namespace cc { @@ -75,7 +75,7 @@ private: //audioID,AudioInfo ccstd::unordered_map _audioPlayers; - std::mutex _threadMutex; + std::mutex _threadMutex; bool _lazyInitLoop; diff --git a/native/cocos/base/Scheduler.h b/native/cocos/base/Scheduler.h index 7aec24fd27..539b86a86c 100644 --- a/native/cocos/base/Scheduler.h +++ b/native/cocos/base/Scheduler.h @@ -289,8 +289,8 @@ private: // Used for "selectors with interval" ccstd::unordered_map _hashForTimers; - struct HashTimerEntry * _currentTarget = nullptr; - bool _currentTargetSalvaged = false; + struct HashTimerEntry * _currentTarget = nullptr; + bool _currentTargetSalvaged = false; // If true unschedule will not remove anything from a hash. Elements will only be marked for deletion. bool _updateHashLocked = false; diff --git a/native/cocos/base/std/container/map.h b/native/cocos/base/std/container/map.h index b76be537e8..430eee8638 100644 --- a/native/cocos/base/std/container/map.h +++ b/native/cocos/base/std/container/map.h @@ -34,6 +34,6 @@ using std::map; namespace pmr { template > -using map = std::map>>; +using map = std::map>>; } } // namespace ccstd diff --git a/native/cocos/base/std/container/unordered_map.h b/native/cocos/base/std/container/unordered_map.h index 4d802b23f4..fa337857d7 100644 --- a/native/cocos/base/std/container/unordered_map.h +++ b/native/cocos/base/std/container/unordered_map.h @@ -34,11 +34,10 @@ using std::unordered_map; namespace pmr { template < -class Key, -class T, -class Hash = std::hash, -class Pred = std::equal_to> + class Key, + class T, + class Hash = std::hash, + class Pred = std::equal_to> using unordered_map = std::unordered_map>>; } } // namespace ccstd - diff --git a/native/cocos/bindings/event/EventDispatcher.cpp b/native/cocos/bindings/event/EventDispatcher.cpp index 011781ba78..69e441a7e3 100644 --- a/native/cocos/bindings/event/EventDispatcher.cpp +++ b/native/cocos/bindings/event/EventDispatcher.cpp @@ -45,7 +45,7 @@ bool inited = false; namespace cc { ccstd::unordered_map EventDispatcher::listeners; -uint32_t EventDispatcher::hashListenerId = 1; +uint32_t EventDispatcher::hashListenerId = 1; bool EventDispatcher::initialized() { return inited && se::ScriptEngine::getInstance()->isValid(); diff --git a/native/cocos/bindings/event/EventDispatcher.h b/native/cocos/bindings/event/EventDispatcher.h index b1d55fd489..1eb3d25989 100644 --- a/native/cocos/bindings/event/EventDispatcher.h +++ b/native/cocos/bindings/event/EventDispatcher.h @@ -301,7 +301,7 @@ private: struct Node * next = nullptr; }; static ccstd::unordered_map listeners; - static uint32_t hashListenerId; //simple increment hash + static uint32_t hashListenerId; //simple increment hash }; } // end of namespace cc diff --git a/native/cocos/bindings/jswrapper/jsc/Base.h b/native/cocos/bindings/jswrapper/jsc/Base.h index f4e8840655..55dc55e4a5 100644 --- a/native/cocos/bindings/jswrapper/jsc/Base.h +++ b/native/cocos/bindings/jswrapper/jsc/Base.h @@ -31,8 +31,8 @@ #include #include #include -#include "base/std/container/unordered_map.h" #include +#include "base/std/container/unordered_map.h" #include diff --git a/native/cocos/bindings/jswrapper/v8/Base.h b/native/cocos/bindings/jswrapper/v8/Base.h index 61fbdf0c59..5d4cc7c888 100644 --- a/native/cocos/bindings/jswrapper/v8/Base.h +++ b/native/cocos/bindings/jswrapper/v8/Base.h @@ -40,8 +40,8 @@ #include #include #include -#include "base/std/container/unordered_map.h" #include "../PrivateObject.h" +#include "base/std/container/unordered_map.h" #include "HelperMacros.h" diff --git a/native/cocos/bindings/jswrapper/v8/Object.cpp b/native/cocos/bindings/jswrapper/v8/Object.cpp index 51cf3240db..8982d18476 100644 --- a/native/cocos/bindings/jswrapper/v8/Object.cpp +++ b/native/cocos/bindings/jswrapper/v8/Object.cpp @@ -28,11 +28,11 @@ #include "v8/HelperMacros.h" #if SCRIPT_ENGINE_TYPE == SCRIPT_ENGINE_V8 - #include "base/std/container/unordered_map.h" #include "../MappingUtils.h" #include "Class.h" #include "ScriptEngine.h" #include "Utils.h" + #include "base/std/container/unordered_map.h" #include #include diff --git a/native/cocos/bindings/manual/jsb_conversions_spec.h b/native/cocos/bindings/manual/jsb_conversions_spec.h index 5437df58d9..dc3ce05aaf 100644 --- a/native/cocos/bindings/manual/jsb_conversions_spec.h +++ b/native/cocos/bindings/manual/jsb_conversions_spec.h @@ -21,9 +21,9 @@ #pragma once -#include "base/std/container/unordered_map.h" #include "base/Ptr.h" #include "base/Value.h" +#include "base/std/container/unordered_map.h" #include "bindings/jswrapper/SeApi.h" #include "cocos/base/Any.h" #include "cocos/base/Optional.h" diff --git a/native/cocos/bindings/manual/jsb_platform.h b/native/cocos/bindings/manual/jsb_platform.h index eddd3051fc..e214117624 100644 --- a/native/cocos/bindings/manual/jsb_platform.h +++ b/native/cocos/bindings/manual/jsb_platform.h @@ -31,5 +31,5 @@ namespace se { class Object; } -bool register_platform_bindings(se::Object *obj); // NOLINT[readability-identifier-naming] +bool register_platform_bindings(se::Object *obj); // NOLINT[readability-identifier-naming] const ccstd::unordered_map &getFontFamilyNameMap(); diff --git a/native/cocos/bindings/manual/jsb_xmlhttprequest.cpp b/native/cocos/bindings/manual/jsb_xmlhttprequest.cpp index 379097cb38..7e975a86d6 100644 --- a/native/cocos/bindings/manual/jsb_xmlhttprequest.cpp +++ b/native/cocos/bindings/manual/jsb_xmlhttprequest.cpp @@ -35,8 +35,8 @@ #include #include #include -#include "base/std/container/unordered_map.h" #include "base/Config.h" +#include "base/std/container/unordered_map.h" #include "cocos/base/Data.h" #include "cocos/base/DeferredReleasePool.h" #include "cocos/bindings/jswrapper/SeApi.h" diff --git a/native/cocos/core/DataView.h b/native/cocos/core/DataView.h index 35647a3aef..f9eb9b7591 100644 --- a/native/cocos/core/DataView.h +++ b/native/cocos/core/DataView.h @@ -75,7 +75,7 @@ public: using UInt8Reader = uint8_t (DataView::*)(uint32_t) const; using ReaderVariant = cc::variant; static ccstd::unordered_map intReaderMap; - int32_t readInt(ReaderVariant &readerVariant, uint32_t offset); + int32_t readInt(ReaderVariant &readerVariant, uint32_t offset); using IntWritter = void (DataView::*)(uint32_t, uint32_t); static ccstd::unordered_map intWritterMap; diff --git a/native/cocos/core/Types.h b/native/cocos/core/Types.h index c2f48eef0f..5916949704 100644 --- a/native/cocos/core/Types.h +++ b/native/cocos/core/Types.h @@ -26,8 +26,8 @@ #pragma once #include -#include "base/std/container/unordered_map.h" #include +#include "base/std/container/unordered_map.h" #include "cocos/base/Optional.h" #include diff --git a/native/cocos/core/animation/SkeletalAnimationUtils.cpp b/native/cocos/core/animation/SkeletalAnimationUtils.cpp index ce254f5f42..feb1421091 100644 --- a/native/cocos/core/animation/SkeletalAnimationUtils.cpp +++ b/native/cocos/core/animation/SkeletalAnimationUtils.cpp @@ -29,7 +29,7 @@ namespace cc { namespace { -ccstd::vector stack; //cjh TODO: how to release ? +ccstd::vector stack; //cjh TODO: how to release ? ccstd::unordered_map pool; } // namespace diff --git a/native/cocos/core/assets/Font.h b/native/cocos/core/assets/Font.h index a5980b7536..182ecac994 100644 --- a/native/cocos/core/assets/Font.h +++ b/native/cocos/core/assets/Font.h @@ -116,14 +116,14 @@ public: protected: virtual void doInit(const FontFaceInfo &info) = 0; - Font * _font{nullptr}; - uint32_t _fontSize{1U}; - uint32_t _lineHeight{0U}; + Font * _font{nullptr}; + uint32_t _fontSize{1U}; + uint32_t _lineHeight{0U}; ccstd::unordered_map _glyphs; ccstd::unordered_map _kernings; - ccstd::vector _textures; - uint32_t _textureWidth{0U}; - uint32_t _textureHeight{0U}; + ccstd::vector _textures; + uint32_t _textureWidth{0U}; + uint32_t _textureHeight{0U}; }; /** @@ -149,9 +149,9 @@ public: protected: void load(const std::string &path); - FontType _type{FontType::INVALID}; - std::string _path; - ccstd::vector _data; + FontType _type{FontType::INVALID}; + std::string _path; + ccstd::vector _data; ccstd::unordered_map _faces; }; diff --git a/native/cocos/core/assets/Material.h b/native/cocos/core/assets/Material.h index 498495a3d3..c574f382c8 100644 --- a/native/cocos/core/assets/Material.h +++ b/native/cocos/core/assets/Material.h @@ -26,8 +26,8 @@ #pragma once #include -#include "base/std/container/unordered_map.h" #include "base/Ptr.h" +#include "base/std/container/unordered_map.h" #include "cocos/base/Optional.h" #include "cocos/base/Variant.h" #include "core/assets/EffectAsset.h" diff --git a/native/cocos/core/builtin/DebugInfos.h b/native/cocos/core/builtin/DebugInfos.h index 4871ecfca6..be74cf08b6 100644 --- a/native/cocos/core/builtin/DebugInfos.h +++ b/native/cocos/core/builtin/DebugInfos.h @@ -25,8 +25,8 @@ #pragma once -#include "base/std/container/unordered_map.h" #include +#include "base/std/container/unordered_map.h" namespace cc { diff --git a/native/cocos/core/builtin/ShaderSourceAssembly.h b/native/cocos/core/builtin/ShaderSourceAssembly.h index 75cc7a3977..b5de630e1f 100644 --- a/native/cocos/core/builtin/ShaderSourceAssembly.h +++ b/native/cocos/core/builtin/ShaderSourceAssembly.h @@ -26,8 +26,8 @@ #pragma once #include -#include "base/std/container/unordered_map.h" #include "base/StringUtil.h" +#include "base/std/container/unordered_map.h" #include "base/std/container/vector.h" namespace cc { diff --git a/native/cocos/core/event/CallbacksInvoker.h b/native/cocos/core/event/CallbacksInvoker.h index 24429ee7b2..e6906a483c 100644 --- a/native/cocos/core/event/CallbacksInvoker.h +++ b/native/cocos/core/event/CallbacksInvoker.h @@ -286,7 +286,7 @@ public: private: ccstd::unordered_map _callbackTable; - static CallbackInfoBase::ID cbIDCounter; + static CallbackInfoBase::ID cbIDCounter; }; template diff --git a/native/cocos/network/Downloader-curl.cpp b/native/cocos/network/Downloader-curl.cpp index 6c4201bd1e..23b4e7f6cc 100644 --- a/native/cocos/network/Downloader-curl.cpp +++ b/native/cocos/network/Downloader-curl.cpp @@ -414,11 +414,11 @@ private: auto thisThreadId = std::this_thread::get_id(); uint32_t countOfMaxProcessingTasks = this->hints.countOfMaxProcessingTasks; // init curl content - CURLM * curlmHandle = curl_multi_init(); + CURLM * curlmHandle = curl_multi_init(); ccstd::unordered_map coTaskMap; - int runningHandles = 0; - CURLMcode mcode = CURLM_OK; - int rc = 0; // select return code + int runningHandles = 0; + CURLMcode mcode = CURLM_OK; + int rc = 0; // select return code do { // check the thread should exit or not diff --git a/native/cocos/network/Downloader-java.cpp b/native/cocos/network/Downloader-java.cpp index 352eecb9ff..ea9281673f 100644 --- a/native/cocos/network/Downloader-java.cpp +++ b/native/cocos/network/Downloader-java.cpp @@ -44,7 +44,7 @@ #define JNI_DOWNLOADER(FUNC) JNI_METHOD1(ORG_DOWNLOADER_CLASS_NAME, FUNC) ccstd::unordered_map sDownloaderMap; -std::mutex sDownloaderMutex; +std::mutex sDownloaderMutex; static void insertDownloaderJava(int id, cc::network::DownloaderJava *downloaderPtr) { std::lock_guard guard(sDownloaderMutex); diff --git a/native/cocos/network/Downloader-java.h b/native/cocos/network/Downloader-java.h index 1bd9208500..41eb80024e 100644 --- a/native/cocos/network/Downloader-java.h +++ b/native/cocos/network/Downloader-java.h @@ -49,8 +49,8 @@ public: void onFinishImpl(int taskId, int errCode, const char *errStr, const ccstd::vector &data); protected: - int _id; - _jobject * _impl; + int _id; + _jobject * _impl; ccstd::unordered_map _taskMap; }; } // namespace network diff --git a/native/cocos/network/DownloaderImpl.h b/native/cocos/network/DownloaderImpl.h index f8dc0f532d..f581c41466 100644 --- a/native/cocos/network/DownloaderImpl.h +++ b/native/cocos/network/DownloaderImpl.h @@ -29,8 +29,8 @@ #include #include #include -#include "base/std/container/unordered_map.h" #include "base/Macros.h" +#include "base/std/container/unordered_map.h" #include "base/std/container/vector.h" //#define CC_DOWNLOADER_DEBUG diff --git a/native/cocos/network/SocketIO.h b/native/cocos/network/SocketIO.h index 9406bc807a..5e871111b0 100644 --- a/native/cocos/network/SocketIO.h +++ b/native/cocos/network/SocketIO.h @@ -29,9 +29,9 @@ #include #include -#include "base/std/container/unordered_map.h" #include "base/Macros.h" #include "base/RefMap.h" +#include "base/std/container/unordered_map.h" /** * @addtogroup network diff --git a/native/cocos/network/WebSocketServer.h b/native/cocos/network/WebSocketServer.h index 0705852785..2a741e4f89 100644 --- a/native/cocos/network/WebSocketServer.h +++ b/native/cocos/network/WebSocketServer.h @@ -270,7 +270,7 @@ private: lws_context *_ctx = nullptr; uv_async_t _async = {0}; - mutable std::mutex _connsMtx; + mutable std::mutex _connsMtx; ccstd::unordered_map> _conns; // Attention: do not reference **this** in callbacks diff --git a/native/cocos/physics/physx/PhysXUtils.h b/native/cocos/physics/physx/PhysXUtils.h index 203951c2fa..97b5338e4b 100644 --- a/native/cocos/physics/physx/PhysXUtils.h +++ b/native/cocos/physics/physx/PhysXUtils.h @@ -25,8 +25,8 @@ #pragma once -#include "base/std/container/unordered_map.h" #include "base/Macros.h" +#include "base/std/container/unordered_map.h" #include "base/std/container/vector.h" #include "math/Vec3.h" #include "math/Vec4.h" diff --git a/native/cocos/platform/FileUtils.h b/native/cocos/platform/FileUtils.h index 617c016555..36cb92a719 100644 --- a/native/cocos/platform/FileUtils.h +++ b/native/cocos/platform/FileUtils.h @@ -27,10 +27,10 @@ #include #include -#include "base/std/container/unordered_map.h" #include "base/Data.h" #include "base/Macros.h" #include "base/Value.h" +#include "base/std/container/unordered_map.h" #include "base/std/container/vector.h" namespace cc { diff --git a/native/cocos/platform/java/jni/JniHelper.h b/native/cocos/platform/java/jni/JniHelper.h index ea75a8a6de..ff8b7b5c18 100644 --- a/native/cocos/platform/java/jni/JniHelper.h +++ b/native/cocos/platform/java/jni/JniHelper.h @@ -30,9 +30,9 @@ #include #include #include -#include "base/std/container/unordered_map.h" #include "base/Log.h" #include "base/Macros.h" +#include "base/std/container/unordered_map.h" #include "base/std/container/vector.h" #include "math/Vec3.h" diff --git a/native/cocos/primitive/Transform.cpp b/native/cocos/primitive/Transform.cpp index 9d8fe7dcad..151347ae78 100644 --- a/native/cocos/primitive/Transform.cpp +++ b/native/cocos/primitive/Transform.cpp @@ -101,8 +101,8 @@ IGeometry wireframed(IGeometry &geometry) { } // const offsets = [ [ 0, 1 ], [ 1, 2 ], [ 2, 0 ] ]; - ccstd::vector> offsets{{0, 1}, {1, 2}, {2, 0}}; - ccstd::vector lines; + ccstd::vector> offsets{{0, 1}, {1, 2}, {2, 0}}; + ccstd::vector lines; ccstd::unordered_map lineIDs; for (uint32_t i = 0; i < indices->size(); i += 3) { for (uint32_t k = 0; k < 3; ++k) { diff --git a/native/cocos/profiler/GameStats.h b/native/cocos/profiler/GameStats.h index 2b74c974ce..4981ef3339 100644 --- a/native/cocos/profiler/GameStats.h +++ b/native/cocos/profiler/GameStats.h @@ -29,9 +29,9 @@ #include #include #include -#include "base/std/container/unordered_map.h" #include #include "base/StringUtil.h" +#include "base/std/container/unordered_map.h" namespace cc { @@ -170,7 +170,7 @@ struct CoreStats { struct MemoryStats { // memory stats - std::mutex mutex; + std::mutex mutex; ccstd::unordered_map memories; inline void update(const std::string &name, uint64_t value) { diff --git a/native/cocos/renderer/core/ProgramLib.h b/native/cocos/renderer/core/ProgramLib.h index 8ad28e2ee5..51ba1d788f 100644 --- a/native/cocos/renderer/core/ProgramLib.h +++ b/native/cocos/renderer/core/ProgramLib.h @@ -29,8 +29,8 @@ #include #include #include -#include "base/std/container/unordered_map.h" #include "base/RefVector.h" +#include "base/std/container/unordered_map.h" #include "cocos/base/Optional.h" #include "core/Types.h" #include "core/assets/EffectAsset.h" diff --git a/native/cocos/renderer/frame-graph/Blackboard.h b/native/cocos/renderer/frame-graph/Blackboard.h index 21908abc17..f55617dd1b 100644 --- a/native/cocos/renderer/frame-graph/Blackboard.h +++ b/native/cocos/renderer/frame-graph/Blackboard.h @@ -25,9 +25,9 @@ #pragma once -#include "base/std/container/unordered_map.h" #include "Handle.h" #include "base/Macros.h" +#include "base/std/container/unordered_map.h" namespace cc { namespace framegraph { diff --git a/native/cocos/renderer/frame-graph/DevicePassResourceTable.h b/native/cocos/renderer/frame-graph/DevicePassResourceTable.h index 49406768a8..9a82137bfa 100644 --- a/native/cocos/renderer/frame-graph/DevicePassResourceTable.h +++ b/native/cocos/renderer/frame-graph/DevicePassResourceTable.h @@ -25,10 +25,10 @@ #pragma once -#include "base/std/container/unordered_map.h" #include "Handle.h" #include "RenderTargetAttachment.h" #include "Resource.h" +#include "base/std/container/unordered_map.h" namespace cc { namespace framegraph { diff --git a/native/cocos/renderer/frame-graph/ResourceAllocator.h b/native/cocos/renderer/frame-graph/ResourceAllocator.h index 7d37770aaf..81e784291f 100644 --- a/native/cocos/renderer/frame-graph/ResourceAllocator.h +++ b/native/cocos/renderer/frame-graph/ResourceAllocator.h @@ -26,8 +26,8 @@ #pragma once #include -#include "base/std/container/unordered_map.h" #include "base/memory/Memory.h" +#include "base/std/container/unordered_map.h" #include "gfx-base/GFXDef.h" namespace cc { @@ -57,7 +57,7 @@ private: ccstd::unordered_map> _pool{}; ccstd::unordered_map _ages{}; - uint64_t _age{0}; + uint64_t _age{0}; }; ////////////////////////////////////////////////////////////////////////// diff --git a/native/cocos/renderer/gfx-base/GFXQueryPool.h b/native/cocos/renderer/gfx-base/GFXQueryPool.h index 35dbb67135..de2580a979 100644 --- a/native/cocos/renderer/gfx-base/GFXQueryPool.h +++ b/native/cocos/renderer/gfx-base/GFXQueryPool.h @@ -27,8 +27,8 @@ #include #include -#include "base/std/container/unordered_map.h" #include "GFXObject.h" +#include "base/std/container/unordered_map.h" namespace cc { namespace gfx { @@ -64,10 +64,10 @@ protected: virtual void doInit(const QueryPoolInfo &info) = 0; virtual void doDestroy() = 0; - QueryType _type{QueryType::OCCLUSION}; - uint32_t _maxQueryObjects{0}; - bool _forceWait{true}; - std::mutex _mutex; + QueryType _type{QueryType::OCCLUSION}; + uint32_t _maxQueryObjects{0}; + bool _forceWait{true}; + std::mutex _mutex; ccstd::unordered_map _results; }; diff --git a/native/cocos/renderer/gfx-gles2/GLES2Commands.cpp b/native/cocos/renderer/gfx-gles2/GLES2Commands.cpp index bd8906a07a..30f753e699 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2Commands.cpp +++ b/native/cocos/renderer/gfx-gles2/GLES2Commands.cpp @@ -1091,7 +1091,7 @@ void cmdFuncGLES2CreateShader(GLES2Device *device, GLES2GPUShader *gpuShader) { ccstd::vector glActiveSamplerTextures; ccstd::vector glActiveSamplerLocations; const GLESBindingMapping & bindingMappings = device->bindingMappings(); - ccstd::unordered_map & texUnitCacheMap = device->stateCache()->texUnitCacheMap; + ccstd::unordered_map & texUnitCacheMap = device->stateCache()->texUnitCacheMap; // sampler bindings in the flexible set comes strictly after buffer bindings // so we need to subtract the buffer count for these samplers diff --git a/native/cocos/renderer/gfx-gles2/GLES2GPUObjects.h b/native/cocos/renderer/gfx-gles2/GLES2GPUObjects.h index 0ce64a594e..f6619a4439 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2GPUObjects.h +++ b/native/cocos/renderer/gfx-gles2/GLES2GPUObjects.h @@ -247,12 +247,12 @@ struct GLES2GPUAttribute { using GLES2GPUAttributeList = ccstd::vector; struct GLES2GPUInputAssembler { - AttributeList attributes; - GLES2GPUBufferList gpuVertexBuffers; - GLES2GPUBuffer * gpuIndexBuffer = nullptr; - GLES2GPUBuffer * gpuIndirectBuffer = nullptr; - GLES2GPUAttributeList glAttribs; - GLenum glIndexType = 0; + AttributeList attributes; + GLES2GPUBufferList gpuVertexBuffers; + GLES2GPUBuffer * gpuIndexBuffer = nullptr; + GLES2GPUBuffer * gpuIndirectBuffer = nullptr; + GLES2GPUAttributeList glAttribs; + GLenum glIndexType = 0; ccstd::unordered_map glVAOs; }; @@ -391,27 +391,27 @@ struct GLES2ObjectCache { class GLES2GPUStateCache { public: - GLuint glArrayBuffer = 0; - GLuint glElementArrayBuffer = 0; - GLuint glUniformBuffer = 0; - GLuint glVAO = 0; - uint32_t texUint = 0; - ccstd::vector glTextures; - GLuint glProgram = 0; - ccstd::vector glEnabledAttribLocs; - ccstd::vector glCurrentAttribLocs; - GLuint glFramebuffer = 0; - GLuint glRenderbuffer = 0; - GLuint glReadFBO = 0; - Viewport viewport; - Rect scissor; - RasterizerState rs; - DepthStencilState dss; - BlendState bs; - bool isCullFaceEnabled = true; - bool isStencilTestEnabled = false; + GLuint glArrayBuffer = 0; + GLuint glElementArrayBuffer = 0; + GLuint glUniformBuffer = 0; + GLuint glVAO = 0; + uint32_t texUint = 0; + ccstd::vector glTextures; + GLuint glProgram = 0; + ccstd::vector glEnabledAttribLocs; + ccstd::vector glCurrentAttribLocs; + GLuint glFramebuffer = 0; + GLuint glRenderbuffer = 0; + GLuint glReadFBO = 0; + Viewport viewport; + Rect scissor; + RasterizerState rs; + DepthStencilState dss; + BlendState bs; + bool isCullFaceEnabled = true; + bool isStencilTestEnabled = false; ccstd::unordered_map texUnitCacheMap; - GLES2ObjectCache gfxStateCache; + GLES2ObjectCache gfxStateCache; void initialize(size_t texUnits, size_t vertexAttributes) { glTextures.resize(texUnits, 0U); diff --git a/native/cocos/renderer/gfx-gles3/GLES3Commands.cpp b/native/cocos/renderer/gfx-gles3/GLES3Commands.cpp index 5babe5eea2..94f6de3553 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3Commands.cpp +++ b/native/cocos/renderer/gfx-gles3/GLES3Commands.cpp @@ -1219,7 +1219,7 @@ void cmdFuncGLES3CreateShader(GLES3Device *device, GLES3GPUShader *gpuShader) { ccstd::vector glActiveSamplerTextures; ccstd::vector glActiveSamplerLocations; const GLESBindingMapping & bindingMappings = device->bindingMappings(); - ccstd::unordered_map & texUnitCacheMap = device->stateCache()->texUnitCacheMap; + ccstd::unordered_map & texUnitCacheMap = device->stateCache()->texUnitCacheMap; // sampler bindings in the flexible set comes strictly after buffer bindings // so we need to subtract the buffer count for these samplers diff --git a/native/cocos/renderer/gfx-gles3/GLES3GPUObjects.h b/native/cocos/renderer/gfx-gles3/GLES3GPUObjects.h index 08a3a1fab4..bec7cb31ed 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3GPUObjects.h +++ b/native/cocos/renderer/gfx-gles3/GLES3GPUObjects.h @@ -299,12 +299,12 @@ struct GLES3GPUAttribute { using GLES3GPUAttributeList = ccstd::vector; struct GLES3GPUInputAssembler { - AttributeList attributes; - GLES3GPUBufferList gpuVertexBuffers; - GLES3GPUBuffer * gpuIndexBuffer = nullptr; - GLES3GPUBuffer * gpuIndirectBuffer = nullptr; - GLES3GPUAttributeList glAttribs; - GLenum glIndexType = 0; + AttributeList attributes; + GLES3GPUBufferList gpuVertexBuffers; + GLES3GPUBuffer * gpuIndexBuffer = nullptr; + GLES3GPUBuffer * gpuIndirectBuffer = nullptr; + GLES3GPUAttributeList glAttribs; + GLenum glIndexType = 0; ccstd::unordered_map glVAOs; }; @@ -455,35 +455,35 @@ struct GLES3ObjectCache { class GLES3GPUStateCache final { public: - GLuint glArrayBuffer = 0; - GLuint glElementArrayBuffer = 0; - GLuint glUniformBuffer = 0; - ccstd::vector glBindUBOs; - ccstd::vector glBindUBOOffsets; - GLuint glShaderStorageBuffer = 0; - ccstd::vector glBindSSBOs; - ccstd::vector glBindSSBOOffsets; - GLuint glDispatchIndirectBuffer = 0; - GLuint glVAO = 0; - uint32_t texUint = 0; - ccstd::vector glTextures; - ccstd::vector glImages; - ccstd::vector glSamplers; - GLuint glProgram = 0; - ccstd::vector glEnabledAttribLocs; - ccstd::vector glCurrentAttribLocs; - GLuint glReadFramebuffer = 0; - GLuint glDrawFramebuffer = 0; - GLuint glRenderbuffer = 0; - Viewport viewport; - Rect scissor; - RasterizerState rs; - DepthStencilState dss; - BlendState bs; - bool isCullFaceEnabled = true; - bool isStencilTestEnabled = false; + GLuint glArrayBuffer = 0; + GLuint glElementArrayBuffer = 0; + GLuint glUniformBuffer = 0; + ccstd::vector glBindUBOs; + ccstd::vector glBindUBOOffsets; + GLuint glShaderStorageBuffer = 0; + ccstd::vector glBindSSBOs; + ccstd::vector glBindSSBOOffsets; + GLuint glDispatchIndirectBuffer = 0; + GLuint glVAO = 0; + uint32_t texUint = 0; + ccstd::vector glTextures; + ccstd::vector glImages; + ccstd::vector glSamplers; + GLuint glProgram = 0; + ccstd::vector glEnabledAttribLocs; + ccstd::vector glCurrentAttribLocs; + GLuint glReadFramebuffer = 0; + GLuint glDrawFramebuffer = 0; + GLuint glRenderbuffer = 0; + Viewport viewport; + Rect scissor; + RasterizerState rs; + DepthStencilState dss; + BlendState bs; + bool isCullFaceEnabled = true; + bool isStencilTestEnabled = false; ccstd::unordered_map texUnitCacheMap; - GLES3ObjectCache gfxStateCache; + GLES3ObjectCache gfxStateCache; void initialize(size_t texUnits, size_t imageUnits, size_t uboBindings, size_t ssboBindings, size_t vertexAttributes) { glBindUBOs.resize(uboBindings, 0U); diff --git a/native/cocos/renderer/gfx-metal/MTLRenderCommandEncoder.h b/native/cocos/renderer/gfx-metal/MTLRenderCommandEncoder.h index 0ace5efd8c..17483cf4e0 100644 --- a/native/cocos/renderer/gfx-metal/MTLRenderCommandEncoder.h +++ b/native/cocos/renderer/gfx-metal/MTLRenderCommandEncoder.h @@ -28,11 +28,11 @@ #import #import #import -#include "base/std/container/unordered_map.h" #include "MTLCommandEncoder.h" #include "MTLStd.h" #include "MTLUtils.h" #include "base/Macros.h" +#include "base/std/container/unordered_map.h" #include "math/Math.h" namespace cc { @@ -276,29 +276,29 @@ public: } protected: - bool _isViewportSet = false; - bool _isScissorRectSet = false; - bool _isCullModeSet = false; - bool _isFrontFacingWinding = false; - bool _isTriangleFillModeSet = false; - bool _isDepthClipModeSet = false; - bool _isDepthBiasSet = false; - bool _isBlendColorSet = false; - id _mtlEncoder = nil; - id _pipelineState = nil; - id _depthStencilState = nil; - uint _frontReferenceValue = UINT_MAX; - uint _backReferenceValue = UINT_MAX; - float _depthBias = 0.f; - float _clamp = 0.f; - float _slope = 0.f; - MTLCullMode _cullMode = MTLCullModeNone; - MTLWinding _frontFacingWinding = MTLWindingClockwise; - CC_UNUSED MTLDepthClipMode _depthClipMode = MTLDepthClipModeClip; - MTLTriangleFillMode _triangleFillMode = MTLTriangleFillModeFill; - Viewport _viewport; - Rect _scissorRect; - Color _blendColor; + bool _isViewportSet = false; + bool _isScissorRectSet = false; + bool _isCullModeSet = false; + bool _isFrontFacingWinding = false; + bool _isTriangleFillModeSet = false; + bool _isDepthClipModeSet = false; + bool _isDepthBiasSet = false; + bool _isBlendColorSet = false; + id _mtlEncoder = nil; + id _pipelineState = nil; + id _depthStencilState = nil; + uint _frontReferenceValue = UINT_MAX; + uint _backReferenceValue = UINT_MAX; + float _depthBias = 0.f; + float _clamp = 0.f; + float _slope = 0.f; + MTLCullMode _cullMode = MTLCullModeNone; + MTLWinding _frontFacingWinding = MTLWindingClockwise; + CC_UNUSED MTLDepthClipMode _depthClipMode = MTLDepthClipModeClip; + MTLTriangleFillMode _triangleFillMode = MTLTriangleFillModeFill; + Viewport _viewport; + Rect _scissorRect; + Color _blendColor; ccstd::unordered_map _vertexBufferMap; ccstd::unordered_map _fragmentBufferMap; ccstd::unordered_map> _vertexTextureMap; diff --git a/native/cocos/renderer/gfx-metal/MTLShader.h b/native/cocos/renderer/gfx-metal/MTLShader.h index 920ceed6fe..593baaadec 100644 --- a/native/cocos/renderer/gfx-metal/MTLShader.h +++ b/native/cocos/renderer/gfx-metal/MTLShader.h @@ -42,11 +42,11 @@ public: CCMTLShader &operator=(const CCMTLShader &) = delete; CCMTLShader &operator=(CCMTLShader &&) = delete; - inline id getVertMTLFunction() const { return _vertFunction; } - inline id getFragmentMTLFunction() const { return _fragFunction; } - inline id getComputeMTLFunction() const { return _cmptFunction; } + inline id getVertMTLFunction() const { return _vertFunction; } + inline id getFragmentMTLFunction() const { return _fragFunction; } + inline id getComputeMTLFunction() const { return _cmptFunction; } inline const ccstd::unordered_map &getFragmentSamplerBindings() const { return _mtlFragmentSamplerBindings; } - inline const CCMTLGPUShader * gpuShader() const { return _gpuShader; } + inline const CCMTLGPUShader * gpuShader() const { return _gpuShader; } uint getAvailableBufferBindingIndex(ShaderStageFlagBit stage, uint stream); @@ -80,8 +80,8 @@ protected: NSMutableDictionary> *_specializedFragFuncs = nil; ccstd::unordered_map _mtlFragmentSamplerBindings; - ccstd::vector _availableVertexBufferBindingIndex; - ccstd::vector _availableFragmentBufferBindingIndex; + ccstd::vector _availableVertexBufferBindingIndex; + ccstd::vector _availableFragmentBufferBindingIndex; CCMTLGPUShader *_gpuShader = nullptr; diff --git a/native/cocos/renderer/pipeline/Define.cpp b/native/cocos/renderer/pipeline/Define.cpp index b421b555b2..754be6a565 100644 --- a/native/cocos/renderer/pipeline/Define.cpp +++ b/native/cocos/renderer/pipeline/Define.cpp @@ -523,7 +523,7 @@ bool supportsR32FloatTexture(gfx::Device *device) { } static ccstd::unordered_map phases; //cjh how to clear this global variable when exiting game? -static uint32_t phaseNum = 0; +static uint32_t phaseNum = 0; uint getPhaseID(const String &phaseName) { auto iter = phases.find(phaseName); diff --git a/native/cocos/renderer/pipeline/Define.h b/native/cocos/renderer/pipeline/Define.h index 56a9a26ef5..9d5c9f7666 100644 --- a/native/cocos/renderer/pipeline/Define.h +++ b/native/cocos/renderer/pipeline/Define.h @@ -465,7 +465,7 @@ struct CC_DLL UBOShadow { }; struct CC_DLL DescriptorSetLayoutInfos { - gfx::DescriptorSetLayoutBindingList bindings; + gfx::DescriptorSetLayoutBindingList bindings; ccstd::unordered_map blocks; ccstd::unordered_map samplers; ccstd::unordered_map storeImages; diff --git a/native/cocos/renderer/pipeline/GlobalDescriptorSetManager.h b/native/cocos/renderer/pipeline/GlobalDescriptorSetManager.h index 9cdd917bcb..cbd87717e6 100644 --- a/native/cocos/renderer/pipeline/GlobalDescriptorSetManager.h +++ b/native/cocos/renderer/pipeline/GlobalDescriptorSetManager.h @@ -46,10 +46,10 @@ public: ~GlobalDSManager() = default; inline ccstd::unordered_map getDescriptorSetMap() const { return _descriptorSetMap; } - inline gfx::Sampler * getLinearSampler() const { return _linearSampler; } - inline gfx::Sampler * getPointSampler() const { return _pointSampler; } - inline gfx::DescriptorSetLayout * getDescriptorSetLayout() const { return _descriptorSetLayout; } - inline gfx::DescriptorSet * getGlobalDescriptorSet() const { return _globalDescriptorSet; } + inline gfx::Sampler * getLinearSampler() const { return _linearSampler; } + inline gfx::Sampler * getPointSampler() const { return _pointSampler; } + inline gfx::DescriptorSetLayout * getDescriptorSetLayout() const { return _descriptorSetLayout; } + inline gfx::DescriptorSet * getGlobalDescriptorSet() const { return _globalDescriptorSet; } void activate(gfx::Device *device); void bindBuffer(uint binding, gfx::Buffer *buffer); @@ -62,13 +62,13 @@ public: static void setDescriptorSetLayout(); private: - gfx::Device * _device = nullptr; - gfx::Sampler * _linearSampler = nullptr; - gfx::Sampler * _pointSampler = nullptr; - IntrusivePtr _descriptorSetLayout; - gfx::DescriptorSet * _globalDescriptorSet = nullptr; + gfx::Device * _device = nullptr; + gfx::Sampler * _linearSampler = nullptr; + gfx::Sampler * _pointSampler = nullptr; + IntrusivePtr _descriptorSetLayout; + gfx::DescriptorSet * _globalDescriptorSet = nullptr; ccstd::unordered_map _descriptorSetMap{}; - ccstd::vector _shadowUBOs; + ccstd::vector _shadowUBOs; }; } // namespace pipeline diff --git a/native/cocos/renderer/pipeline/PipelineSceneData.h b/native/cocos/renderer/pipeline/PipelineSceneData.h index 70c68ae56f..373daca4b5 100644 --- a/native/cocos/renderer/pipeline/PipelineSceneData.h +++ b/native/cocos/renderer/pipeline/PipelineSceneData.h @@ -55,37 +55,37 @@ public: virtual void updatePipelineSceneData() {} - inline void setShadowFramebuffer(const scene::Light *light, gfx::Framebuffer *framebuffer) { _shadowFrameBufferMap.emplace(light, framebuffer); } + inline void setShadowFramebuffer(const scene::Light *light, gfx::Framebuffer *framebuffer) { _shadowFrameBufferMap.emplace(light, framebuffer); } inline const ccstd::unordered_map &getShadowFramebufferMap() const { return _shadowFrameBufferMap; } - inline const RenderObjectList & getRenderObjects() const { return _renderObjects; } - inline const RenderObjectList & getDirShadowObjects() const { return _dirShadowObjects; } - inline void setRenderObjects(RenderObjectList &&ro) { _renderObjects = std::forward(ro); } - inline void setDirShadowObjects(RenderObjectList &&ro) { _dirShadowObjects = std::forward(ro); } - inline const RenderObjectList & isCastShadowObjects() const { return _castShadowObjects; } - inline void setCastShadowObjects(RenderObjectList &&ro) { _castShadowObjects = std::forward(ro); } - inline const ccstd::vector & getValidPunctualLights() const { return _validPunctualLights; } - inline void setValidPunctualLights(ccstd::vector &&validPunctualLights) { _validPunctualLights = std::forward>(validPunctualLights); } - inline bool isHDR() const { return _isHDR; } - inline void setHDR(bool val) { _isHDR = val; } - inline scene::Shadows * getShadows() const { return _shadow; } - inline scene::Ambient * getAmbient() const { return _ambient; } - inline scene::Skybox * getSkybox() const { return _skybox; } - inline scene::Fog * getFog() const { return _fog; } - inline scene::Octree * getOctree() const { return _octree; } - inline gfx::InputAssembler * getOcclusionQueryInputAssembler() const { return _occlusionQueryInputAssembler; } - inline scene::Pass * getOcclusionQueryPass() const { return _occlusionQueryPass; } - inline gfx::Shader * getOcclusionQueryShader() const { return _occlusionQueryShader; } - inline const ccstd::vector> & getGeometryRendererMaterials() const { return _geometryRendererMaterials; } - inline const ccstd::vector & getGeometryRendererPasses() const { return _geometryRendererPasses; } - inline const ccstd::vector & getGeometryRendererShaders() const { return _geometryRendererShaders; } - inline scene::Pass * getDebugRendererPass() const { return _debugRendererPass; } - inline gfx::Shader * getDebugRendererShader() const { return _debugRendererShader; } - inline void addRenderObject(RenderObject &&obj) { _renderObjects.emplace_back(obj); } - inline void clearRenderObjects() { _renderObjects.clear(); } - inline void addValidPunctualLight(scene::Light *light) { _validPunctualLights.emplace_back(light); } - inline void clearValidPunctualLights() { _validPunctualLights.clear(); } - inline float getShadingScale() const { return _shadingScale; } - inline void setShadingScale(float val) { _shadingScale = val; } + inline const RenderObjectList & getRenderObjects() const { return _renderObjects; } + inline const RenderObjectList & getDirShadowObjects() const { return _dirShadowObjects; } + inline void setRenderObjects(RenderObjectList &&ro) { _renderObjects = std::forward(ro); } + inline void setDirShadowObjects(RenderObjectList &&ro) { _dirShadowObjects = std::forward(ro); } + inline const RenderObjectList & isCastShadowObjects() const { return _castShadowObjects; } + inline void setCastShadowObjects(RenderObjectList &&ro) { _castShadowObjects = std::forward(ro); } + inline const ccstd::vector & getValidPunctualLights() const { return _validPunctualLights; } + inline void setValidPunctualLights(ccstd::vector &&validPunctualLights) { _validPunctualLights = std::forward>(validPunctualLights); } + inline bool isHDR() const { return _isHDR; } + inline void setHDR(bool val) { _isHDR = val; } + inline scene::Shadows * getShadows() const { return _shadow; } + inline scene::Ambient * getAmbient() const { return _ambient; } + inline scene::Skybox * getSkybox() const { return _skybox; } + inline scene::Fog * getFog() const { return _fog; } + inline scene::Octree * getOctree() const { return _octree; } + inline gfx::InputAssembler * getOcclusionQueryInputAssembler() const { return _occlusionQueryInputAssembler; } + inline scene::Pass * getOcclusionQueryPass() const { return _occlusionQueryPass; } + inline gfx::Shader * getOcclusionQueryShader() const { return _occlusionQueryShader; } + inline const ccstd::vector> & getGeometryRendererMaterials() const { return _geometryRendererMaterials; } + inline const ccstd::vector & getGeometryRendererPasses() const { return _geometryRendererPasses; } + inline const ccstd::vector & getGeometryRendererShaders() const { return _geometryRendererShaders; } + inline scene::Pass * getDebugRendererPass() const { return _debugRendererPass; } + inline gfx::Shader * getDebugRendererShader() const { return _debugRendererShader; } + inline void addRenderObject(RenderObject &&obj) { _renderObjects.emplace_back(obj); } + inline void clearRenderObjects() { _renderObjects.clear(); } + inline void addValidPunctualLight(scene::Light *light) { _validPunctualLights.emplace_back(light); } + inline void clearValidPunctualLights() { _validPunctualLights.clear(); } + inline float getShadingScale() const { return _shadingScale; } + inline void setShadingScale(float val) { _shadingScale = val; } scene::Pass *getOcclusionQueryPass(); diff --git a/native/cocos/renderer/pipeline/RenderPipeline.h b/native/cocos/renderer/pipeline/RenderPipeline.h index ae58478e4a..8acbc0f718 100644 --- a/native/cocos/renderer/pipeline/RenderPipeline.h +++ b/native/cocos/renderer/pipeline/RenderPipeline.h @@ -26,9 +26,9 @@ #pragma once #include -#include "base/std/container/unordered_map.h" #include "Define.h" #include "base/CoreStd.h" +#include "base/std/container/unordered_map.h" #include "core/assets/Asset.h" #include "frame-graph/FrameGraph.h" #include "frame-graph/Handle.h" @@ -146,13 +146,13 @@ protected: // has not initBuiltinRes, // create temporary default Texture to binding sampler2d - uint _width{0}; - uint _height{0}; - gfx::Buffer * _quadIB{nullptr}; - ccstd::vector _quadVB; + uint _width{0}; + uint _height{0}; + gfx::Buffer * _quadIB{nullptr}; + ccstd::vector _quadVB; ccstd::unordered_map> _quadIA; - framegraph::FrameGraph _fg; + framegraph::FrameGraph _fg; ccstd::unordered_map _renderPasses; // use cluster culling or not