mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:44:11 +02:00
Remove extra profiling
This commit is contained in:
parent
c2650c2b71
commit
097e75285a
3 changed files with 1 additions and 18 deletions
|
@ -15,7 +15,6 @@
|
|||
#include <QtCore/QByteArray>
|
||||
|
||||
#include <ktx/KTX.h>
|
||||
#include <Profile.h>
|
||||
|
||||
#include "GPULogging.h"
|
||||
|
||||
|
@ -243,7 +242,6 @@ uint16 KtxStorage::minAvailableMipLevel() const {
|
|||
}
|
||||
|
||||
void KtxStorage::assignMipData(uint16 level, const storage::StoragePointer& storage) {
|
||||
PROFILE_RANGE(app, __FUNCTION__)
|
||||
if (level != _minMipLevelAvailable - 1) {
|
||||
qWarning() << "Invalid level to be stored, expected: " << (_minMipLevelAvailable - 1) << ", got: " << level << " " << _filename.c_str();
|
||||
return;
|
||||
|
@ -285,7 +283,6 @@ void KtxStorage::assignMipData(uint16 level, const storage::StoragePointer& stor
|
|||
}
|
||||
|
||||
memcpy(imageData, storage->data(), storage->size());
|
||||
|
||||
_minMipLevelAvailable = level;
|
||||
if (_offsetToMinMipKV > 0) {
|
||||
auto minMipKeyData = fileData + ktx::KTX_HEADER_SIZE + _offsetToMinMipKV;
|
||||
|
@ -314,7 +311,6 @@ void Texture::setKtxBacking(const std::string& filename) {
|
|||
|
||||
|
||||
ktx::KTXUniquePointer Texture::serialize(const Texture& texture) {
|
||||
PROFILE_RANGE(app, __FUNCTION__)
|
||||
ktx::Header header;
|
||||
|
||||
// From texture format to ktx format description
|
||||
|
@ -457,7 +453,6 @@ TexturePointer Texture::unserialize(const std::string& ktxfile) {
|
|||
}
|
||||
|
||||
TexturePointer Texture::unserialize(const std::string& ktxfile, const ktx::KTXDescriptor& descriptor) {
|
||||
PROFILE_RANGE(app, __FUNCTION__)
|
||||
const auto& header = descriptor.header;
|
||||
|
||||
Format mipFormat = Format::COLOR_BGRA_32;
|
||||
|
|
|
@ -21,9 +21,8 @@
|
|||
#include <QtCore/QSaveFile>
|
||||
#include <QtCore/QStorageInfo>
|
||||
|
||||
#include <NumericalConstants.h>
|
||||
#include <PathUtils.h>
|
||||
#include <Profile.h>
|
||||
#include <NumericalConstants.h>
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#include <sys/utime.h>
|
||||
|
@ -88,7 +87,6 @@ FileCache::~FileCache() {
|
|||
}
|
||||
|
||||
void FileCache::initialize() {
|
||||
PROFILE_RANGE(app, __FUNCTION__)
|
||||
QDir dir(_dirpath.c_str());
|
||||
|
||||
if (dir.exists()) {
|
||||
|
@ -129,7 +127,6 @@ FilePointer FileCache::addFile(Metadata&& metadata, const std::string& filepath)
|
|||
}
|
||||
|
||||
FilePointer FileCache::writeFile(const char* data, File::Metadata&& metadata, bool overwrite) {
|
||||
PROFILE_RANGE(app, __FUNCTION__)
|
||||
assert(_initialized);
|
||||
|
||||
std::string filepath = getFilepath(metadata.key);
|
||||
|
@ -322,7 +319,6 @@ File::File(Metadata&& metadata, const std::string& filepath) :
|
|||
}
|
||||
|
||||
File::~File() {
|
||||
PROFILE_RANGE(app, __FUNCTION__)
|
||||
QFile file(getFilepath().c_str());
|
||||
if (file.exists() && !_shouldPersist) {
|
||||
qCInfo(file_cache, "Unlinked %s", getFilepath().c_str());
|
||||
|
@ -331,7 +327,6 @@ File::~File() {
|
|||
}
|
||||
|
||||
void File::touch() {
|
||||
PROFILE_RANGE(app, __FUNCTION__)
|
||||
utime(_filepath.c_str(), nullptr);
|
||||
_modified = std::max<int64_t>(QFileInfo(_filepath.c_str()).lastRead().toMSecsSinceEpoch(), _modified);
|
||||
}
|
|
@ -12,8 +12,6 @@
|
|||
#include <QtCore/QDebug>
|
||||
#include <QtCore/QLoggingCategory>
|
||||
|
||||
#include "../Profile.h"
|
||||
|
||||
Q_LOGGING_CATEGORY(storagelogging, "hifi.core.storage")
|
||||
|
||||
using namespace storage;
|
||||
|
@ -50,7 +48,6 @@ MemoryStorage::MemoryStorage(size_t size, const uint8_t* data) {
|
|||
}
|
||||
|
||||
StoragePointer FileStorage::create(const QString& filename, size_t size, const uint8_t* data) {
|
||||
PROFILE_RANGE(app, "FileStorage::create()");
|
||||
QFile file(filename);
|
||||
if (!file.open(QFile::ReadWrite | QIODevice::Truncate)) {
|
||||
throw std::runtime_error("Unable to open file for writing");
|
||||
|
@ -73,8 +70,6 @@ StoragePointer FileStorage::create(const QString& filename, size_t size, const u
|
|||
}
|
||||
|
||||
FileStorage::FileStorage(const QString& filename) : _file(filename) {
|
||||
PROFILE_RANGE(app, "FileStorage()");
|
||||
|
||||
bool opened = _file.open(QFile::ReadWrite);
|
||||
if (opened) {
|
||||
_hasWriteAccess = true;
|
||||
|
@ -84,7 +79,6 @@ FileStorage::FileStorage(const QString& filename) : _file(filename) {
|
|||
}
|
||||
|
||||
if (opened) {
|
||||
PROFILE_RANGE(app, "FileStorage() map");
|
||||
_mapped = _file.map(0, _file.size());
|
||||
if (_mapped) {
|
||||
_valid = true;
|
||||
|
@ -97,7 +91,6 @@ FileStorage::FileStorage(const QString& filename) : _file(filename) {
|
|||
}
|
||||
|
||||
FileStorage::~FileStorage() {
|
||||
PROFILE_RANGE(app, "~FileStorage()");
|
||||
if (_mapped) {
|
||||
if (!_file.unmap(_mapped)) {
|
||||
throw std::runtime_error("Unable to unmap file");
|
||||
|
|
Loading…
Reference in a new issue