MAINT-570 Remove unused memory tracking system LLMemType
parent
725cf540a5
commit
4a5ad35793
|
|
@ -29,8 +29,6 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
#include "linden_common.h"
|
||||
|
||||
#include "llmemtype.h"
|
||||
|
||||
#include "llmotioncontroller.h"
|
||||
#include "llkeyframemotion.h"
|
||||
#include "llmath.h"
|
||||
|
|
@ -335,7 +333,6 @@ void LLMotionController::removeMotionInstance(LLMotion* motionp)
|
|||
//-----------------------------------------------------------------------------
|
||||
LLMotion* LLMotionController::createMotion( const LLUUID &id )
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_ANIMATION);
|
||||
// do we have an instance of this motion for this character?
|
||||
LLMotion *motion = findMotion(id);
|
||||
|
||||
|
|
|
|||
|
|
@ -71,7 +71,6 @@ set(llcommon_SOURCE_FILES
|
|||
llmd5.cpp
|
||||
llmemory.cpp
|
||||
llmemorystream.cpp
|
||||
llmemtype.cpp
|
||||
llmetrics.cpp
|
||||
llmetricperformancetester.cpp
|
||||
llmortician.cpp
|
||||
|
|
@ -195,7 +194,6 @@ set(llcommon_HEADER_FILES
|
|||
llmd5.h
|
||||
llmemory.h
|
||||
llmemorystream.h
|
||||
llmemtype.h
|
||||
llmetrics.h
|
||||
llmetricperformancetester.h
|
||||
llmortician.h
|
||||
|
|
|
|||
|
|
@ -35,28 +35,6 @@
|
|||
DECLARE_bool(heap_profile_use_stack_trace);
|
||||
//DECLARE_double(tcmalloc_release_rate);
|
||||
|
||||
// static
|
||||
void LLAllocator::pushMemType(S32 type)
|
||||
{
|
||||
if(isProfiling())
|
||||
{
|
||||
PushMemType(type);
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
S32 LLAllocator::popMemType()
|
||||
{
|
||||
if (isProfiling())
|
||||
{
|
||||
return PopMemType();
|
||||
}
|
||||
else
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
void LLAllocator::setProfilingEnabled(bool should_enable)
|
||||
{
|
||||
// NULL disables dumping to disk
|
||||
|
|
@ -94,17 +72,6 @@ std::string LLAllocator::getRawProfile()
|
|||
// stub implementations for when tcmalloc is disabled
|
||||
//
|
||||
|
||||
// static
|
||||
void LLAllocator::pushMemType(S32 type)
|
||||
{
|
||||
}
|
||||
|
||||
// static
|
||||
S32 LLAllocator::popMemType()
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
void LLAllocator::setProfilingEnabled(bool should_enable)
|
||||
{
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,16 +29,10 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "llmemtype.h"
|
||||
#include "llallocator_heap_profile.h"
|
||||
|
||||
class LL_COMMON_API LLAllocator {
|
||||
friend class LLMemoryView;
|
||||
friend class LLMemType;
|
||||
|
||||
private:
|
||||
static void pushMemType(S32 type);
|
||||
static S32 popMemType();
|
||||
|
||||
public:
|
||||
void setProfilingEnabled(bool should_enable);
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@
|
|||
#ifndef LLMEMORY_H
|
||||
#define LLMEMORY_H
|
||||
|
||||
#include "llmemtype.h"
|
||||
#if LL_DEBUG
|
||||
inline void* ll_aligned_malloc( size_t size, int align )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,232 +0,0 @@
|
|||
/**
|
||||
* @file llmemtype.cpp
|
||||
* @brief Simple memory allocation/deallocation tracking stuff here
|
||||
*
|
||||
* $LicenseInfo:firstyear=2002&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#include "llmemtype.h"
|
||||
#include "llallocator.h"
|
||||
|
||||
std::vector<char const *> LLMemType::DeclareMemType::mNameList;
|
||||
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_INIT("Init");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_STARTUP("Startup");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_MAIN("Main");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_FRAME("Frame");
|
||||
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_GATHER_INPUT("GatherInput");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_JOY_KEY("JoyKey");
|
||||
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_IDLE("Idle");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_IDLE_PUMP("IdlePump");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_IDLE_NETWORK("IdleNetwork");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_IDLE_UPDATE_REGIONS("IdleUpdateRegions");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_IDLE_UPDATE_VIEWER_REGION("IdleUpdateViewerRegion");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_IDLE_UPDATE_SURFACE("IdleUpdateSurface");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_IDLE_UPDATE_PARCEL_OVERLAY("IdleUpdateParcelOverlay");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_IDLE_AUDIO("IdleAudio");
|
||||
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_CACHE_PROCESS_PENDING("CacheProcessPending");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_CACHE_PROCESS_PENDING_ASKS("CacheProcessPendingAsks");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_CACHE_PROCESS_PENDING_REPLIES("CacheProcessPendingReplies");
|
||||
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_MESSAGE_CHECK_ALL("MessageCheckAll");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_MESSAGE_PROCESS_ACKS("MessageProcessAcks");
|
||||
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_RENDER("Render");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_SLEEP("Sleep");
|
||||
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_NETWORK("Network");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_PHYSICS("Physics");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_INTERESTLIST("InterestList");
|
||||
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_IMAGEBASE("ImageBase");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_IMAGERAW("ImageRaw");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_IMAGEFORMATTED("ImageFormatted");
|
||||
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_APPFMTIMAGE("AppFmtImage");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_APPRAWIMAGE("AppRawImage");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_APPAUXRAWIMAGE("AppAuxRawImage");
|
||||
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_DRAWABLE("Drawable");
|
||||
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_OBJECT("Object");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_OBJECT_PROCESS_UPDATE("ObjectProcessUpdate");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_OBJECT_PROCESS_UPDATE_CORE("ObjectProcessUpdateCore");
|
||||
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY("Display");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_UPDATE("DisplayUpdate");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_UPDATE_CAMERA("DisplayUpdateCam");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_UPDATE_GEOM("DisplayUpdateGeom");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_SWAP("DisplaySwap");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_UPDATE_HUD("DisplayUpdateHud");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_GEN_REFLECTION("DisplayGenRefl");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_IMAGE_UPDATE("DisplayImageUpdate");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_STATE_SORT("DisplayStateSort");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_SKY("DisplaySky");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_RENDER_GEOM("DisplayRenderGeom");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_RENDER_FLUSH("DisplayRenderFlush");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_RENDER_UI("DisplayRenderUI");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_RENDER_ATTACHMENTS("DisplayRenderAttach");
|
||||
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_DATA("VertexData");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_CONSTRUCTOR("VertexConstr");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_DESTRUCTOR("VertexDestr");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_CREATE_VERTICES("VertexCreateVerts");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_CREATE_INDICES("VertexCreateIndices");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_DESTROY_BUFFER("VertexDestroyBuff");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_DESTROY_INDICES("VertexDestroyIndices");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_UPDATE_VERTS("VertexUpdateVerts");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_UPDATE_INDICES("VertexUpdateIndices");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_ALLOCATE_BUFFER("VertexAllocateBuffer");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_RESIZE_BUFFER("VertexResizeBuffer");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_MAP_BUFFER("VertexMapBuffer");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_MAP_BUFFER_VERTICES("VertexMapBufferVerts");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_MAP_BUFFER_INDICES("VertexMapBufferIndices");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_UNMAP_BUFFER("VertexUnmapBuffer");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_SET_STRIDE("VertexSetStride");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_SET_BUFFER("VertexSetBuffer");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_SETUP_VERTEX_BUFFER("VertexSetupVertBuff");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_CLEANUP_CLASS("VertexCleanupClass");
|
||||
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_SPACE_PARTITION("SpacePartition");
|
||||
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE("Pipeline");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_INIT("PipelineInit");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_CREATE_BUFFERS("PipelineCreateBuffs");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RESTORE_GL("PipelineRestroGL");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_UNLOAD_SHADERS("PipelineUnloadShaders");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_LIGHTING_DETAIL("PipelineLightingDetail");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_GET_POOL_TYPE("PipelineGetPoolType");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_ADD_POOL("PipelineAddPool");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_ALLOCATE_DRAWABLE("PipelineAllocDrawable");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_ADD_OBJECT("PipelineAddObj");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_CREATE_OBJECTS("PipelineCreateObjs");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_UPDATE_MOVE("PipelineUpdateMove");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_UPDATE_GEOM("PipelineUpdateGeom");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_MARK_VISIBLE("PipelineMarkVisible");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_MARK_MOVED("PipelineMarkMoved");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_MARK_SHIFT("PipelineMarkShift");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_SHIFT_OBJECTS("PipelineShiftObjs");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_MARK_TEXTURED("PipelineMarkTextured");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_MARK_REBUILD("PipelineMarkRebuild");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_UPDATE_CULL("PipelineUpdateCull");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_STATE_SORT("PipelineStateSort");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_POST_SORT("PipelinePostSort");
|
||||
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_HUD_ELS("PipelineHudEls");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_HL("PipelineRenderHL");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_GEOM("PipelineRenderGeom");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_GEOM_DEFFERRED("PipelineRenderGeomDef");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_GEOM_POST_DEF("PipelineRenderGeomPostDef");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_GEOM_SHADOW("PipelineRenderGeomShadow");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_SELECT("PipelineRenderSelect");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_REBUILD_POOLS("PipelineRebuildPools");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_QUICK_LOOKUP("PipelineQuickLookup");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_OBJECTS("PipelineRenderObjs");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_GENERATE_IMPOSTOR("PipelineGenImpostors");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_BLOOM("PipelineRenderBloom");
|
||||
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_UPKEEP_POOLS("UpkeepPools");
|
||||
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_AVATAR("Avatar");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_AVATAR_MESH("AvatarMesh");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_PARTICLES("Particles");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_REGIONS("Regions");
|
||||
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY("Inventory");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_DRAW("InventoryDraw");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_BUILD_NEW_VIEWS("InventoryBuildNewViews");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_DO_FOLDER("InventoryDoFolder");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_POST_BUILD("InventoryPostBuild");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_FROM_XML("InventoryFromXML");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_CREATE_NEW_ITEM("InventoryCreateNewItem");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_VIEW_INIT("InventoryViewInit");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_VIEW_SHOW("InventoryViewShow");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_VIEW_TOGGLE("InventoryViewToggle");
|
||||
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_ANIMATION("Animation");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_VOLUME("Volume");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_PRIMITIVE("Primitive");
|
||||
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_SCRIPT("Script");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_SCRIPT_RUN("ScriptRun");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_SCRIPT_BYTECODE("ScriptByteCode");
|
||||
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_IO_PUMP("IoPump");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_IO_TCP("IoTCP");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_IO_BUFFER("IoBuffer");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_IO_HTTP_SERVER("IoHttpServer");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_IO_SD_SERVER("IoSDServer");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_IO_SD_CLIENT("IoSDClient");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_IO_URL_REQUEST("IOUrlRequest");
|
||||
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_DIRECTX_INIT("DirectXInit");
|
||||
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_TEMP1("Temp1");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_TEMP2("Temp2");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_TEMP3("Temp3");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_TEMP4("Temp4");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_TEMP5("Temp5");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_TEMP6("Temp6");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_TEMP7("Temp7");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_TEMP8("Temp8");
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_TEMP9("Temp9");
|
||||
|
||||
LLMemType::DeclareMemType LLMemType::MTYPE_OTHER("Other");
|
||||
|
||||
|
||||
LLMemType::DeclareMemType::DeclareMemType(char const * st)
|
||||
{
|
||||
mID = (S32)mNameList.size();
|
||||
mName = st;
|
||||
|
||||
mNameList.push_back(mName);
|
||||
}
|
||||
|
||||
LLMemType::DeclareMemType::~DeclareMemType()
|
||||
{
|
||||
}
|
||||
|
||||
LLMemType::LLMemType(LLMemType::DeclareMemType& dt)
|
||||
{
|
||||
mTypeIndex = dt.mID;
|
||||
LLAllocator::pushMemType(dt.mID);
|
||||
}
|
||||
|
||||
LLMemType::~LLMemType()
|
||||
{
|
||||
LLAllocator::popMemType();
|
||||
}
|
||||
|
||||
char const * LLMemType::getNameFromID(S32 id)
|
||||
{
|
||||
if (id < 0 || id >= (S32)DeclareMemType::mNameList.size())
|
||||
{
|
||||
return "INVALID";
|
||||
}
|
||||
|
||||
return DeclareMemType::mNameList[id];
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
|
@ -1,242 +0,0 @@
|
|||
/**
|
||||
* @file llmemtype.h
|
||||
* @brief Runtime memory usage debugging utilities.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2005&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#ifndef LL_MEMTYPE_H
|
||||
#define LL_MEMTYPE_H
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#include "linden_common.h"
|
||||
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
// WARNING: Never commit with MEM_TRACK_MEM == 1
|
||||
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
#define MEM_TRACK_MEM (0 && LL_WINDOWS)
|
||||
|
||||
#include <vector>
|
||||
|
||||
#define MEM_TYPE_NEW(T)
|
||||
|
||||
class LL_COMMON_API LLMemType
|
||||
{
|
||||
public:
|
||||
|
||||
// class we'll initialize all instances of as
|
||||
// static members of MemType. Then use
|
||||
// to construct any new mem type.
|
||||
class LL_COMMON_API DeclareMemType
|
||||
{
|
||||
public:
|
||||
DeclareMemType(char const * st);
|
||||
~DeclareMemType();
|
||||
|
||||
S32 mID;
|
||||
char const * mName;
|
||||
|
||||
// array so we can map an index ID to Name
|
||||
static std::vector<char const *> mNameList;
|
||||
};
|
||||
|
||||
LLMemType(DeclareMemType& dt);
|
||||
~LLMemType();
|
||||
|
||||
static char const * getNameFromID(S32 id);
|
||||
|
||||
static DeclareMemType MTYPE_INIT;
|
||||
static DeclareMemType MTYPE_STARTUP;
|
||||
static DeclareMemType MTYPE_MAIN;
|
||||
static DeclareMemType MTYPE_FRAME;
|
||||
|
||||
static DeclareMemType MTYPE_GATHER_INPUT;
|
||||
static DeclareMemType MTYPE_JOY_KEY;
|
||||
|
||||
static DeclareMemType MTYPE_IDLE;
|
||||
static DeclareMemType MTYPE_IDLE_PUMP;
|
||||
static DeclareMemType MTYPE_IDLE_NETWORK;
|
||||
static DeclareMemType MTYPE_IDLE_UPDATE_REGIONS;
|
||||
static DeclareMemType MTYPE_IDLE_UPDATE_VIEWER_REGION;
|
||||
static DeclareMemType MTYPE_IDLE_UPDATE_SURFACE;
|
||||
static DeclareMemType MTYPE_IDLE_UPDATE_PARCEL_OVERLAY;
|
||||
static DeclareMemType MTYPE_IDLE_AUDIO;
|
||||
|
||||
static DeclareMemType MTYPE_CACHE_PROCESS_PENDING;
|
||||
static DeclareMemType MTYPE_CACHE_PROCESS_PENDING_ASKS;
|
||||
static DeclareMemType MTYPE_CACHE_PROCESS_PENDING_REPLIES;
|
||||
|
||||
static DeclareMemType MTYPE_MESSAGE_CHECK_ALL;
|
||||
static DeclareMemType MTYPE_MESSAGE_PROCESS_ACKS;
|
||||
|
||||
static DeclareMemType MTYPE_RENDER;
|
||||
static DeclareMemType MTYPE_SLEEP;
|
||||
|
||||
static DeclareMemType MTYPE_NETWORK;
|
||||
static DeclareMemType MTYPE_PHYSICS;
|
||||
static DeclareMemType MTYPE_INTERESTLIST;
|
||||
|
||||
static DeclareMemType MTYPE_IMAGEBASE;
|
||||
static DeclareMemType MTYPE_IMAGERAW;
|
||||
static DeclareMemType MTYPE_IMAGEFORMATTED;
|
||||
|
||||
static DeclareMemType MTYPE_APPFMTIMAGE;
|
||||
static DeclareMemType MTYPE_APPRAWIMAGE;
|
||||
static DeclareMemType MTYPE_APPAUXRAWIMAGE;
|
||||
|
||||
static DeclareMemType MTYPE_DRAWABLE;
|
||||
|
||||
static DeclareMemType MTYPE_OBJECT;
|
||||
static DeclareMemType MTYPE_OBJECT_PROCESS_UPDATE;
|
||||
static DeclareMemType MTYPE_OBJECT_PROCESS_UPDATE_CORE;
|
||||
|
||||
static DeclareMemType MTYPE_DISPLAY;
|
||||
static DeclareMemType MTYPE_DISPLAY_UPDATE;
|
||||
static DeclareMemType MTYPE_DISPLAY_UPDATE_CAMERA;
|
||||
static DeclareMemType MTYPE_DISPLAY_UPDATE_GEOM;
|
||||
static DeclareMemType MTYPE_DISPLAY_SWAP;
|
||||
static DeclareMemType MTYPE_DISPLAY_UPDATE_HUD;
|
||||
static DeclareMemType MTYPE_DISPLAY_GEN_REFLECTION;
|
||||
static DeclareMemType MTYPE_DISPLAY_IMAGE_UPDATE;
|
||||
static DeclareMemType MTYPE_DISPLAY_STATE_SORT;
|
||||
static DeclareMemType MTYPE_DISPLAY_SKY;
|
||||
static DeclareMemType MTYPE_DISPLAY_RENDER_GEOM;
|
||||
static DeclareMemType MTYPE_DISPLAY_RENDER_FLUSH;
|
||||
static DeclareMemType MTYPE_DISPLAY_RENDER_UI;
|
||||
static DeclareMemType MTYPE_DISPLAY_RENDER_ATTACHMENTS;
|
||||
|
||||
static DeclareMemType MTYPE_VERTEX_DATA;
|
||||
static DeclareMemType MTYPE_VERTEX_CONSTRUCTOR;
|
||||
static DeclareMemType MTYPE_VERTEX_DESTRUCTOR;
|
||||
static DeclareMemType MTYPE_VERTEX_CREATE_VERTICES;
|
||||
static DeclareMemType MTYPE_VERTEX_CREATE_INDICES;
|
||||
static DeclareMemType MTYPE_VERTEX_DESTROY_BUFFER;
|
||||
static DeclareMemType MTYPE_VERTEX_DESTROY_INDICES;
|
||||
static DeclareMemType MTYPE_VERTEX_UPDATE_VERTS;
|
||||
static DeclareMemType MTYPE_VERTEX_UPDATE_INDICES;
|
||||
static DeclareMemType MTYPE_VERTEX_ALLOCATE_BUFFER;
|
||||
static DeclareMemType MTYPE_VERTEX_RESIZE_BUFFER;
|
||||
static DeclareMemType MTYPE_VERTEX_MAP_BUFFER;
|
||||
static DeclareMemType MTYPE_VERTEX_MAP_BUFFER_VERTICES;
|
||||
static DeclareMemType MTYPE_VERTEX_MAP_BUFFER_INDICES;
|
||||
static DeclareMemType MTYPE_VERTEX_UNMAP_BUFFER;
|
||||
static DeclareMemType MTYPE_VERTEX_SET_STRIDE;
|
||||
static DeclareMemType MTYPE_VERTEX_SET_BUFFER;
|
||||
static DeclareMemType MTYPE_VERTEX_SETUP_VERTEX_BUFFER;
|
||||
static DeclareMemType MTYPE_VERTEX_CLEANUP_CLASS;
|
||||
|
||||
static DeclareMemType MTYPE_SPACE_PARTITION;
|
||||
|
||||
static DeclareMemType MTYPE_PIPELINE;
|
||||
static DeclareMemType MTYPE_PIPELINE_INIT;
|
||||
static DeclareMemType MTYPE_PIPELINE_CREATE_BUFFERS;
|
||||
static DeclareMemType MTYPE_PIPELINE_RESTORE_GL;
|
||||
static DeclareMemType MTYPE_PIPELINE_UNLOAD_SHADERS;
|
||||
static DeclareMemType MTYPE_PIPELINE_LIGHTING_DETAIL;
|
||||
static DeclareMemType MTYPE_PIPELINE_GET_POOL_TYPE;
|
||||
static DeclareMemType MTYPE_PIPELINE_ADD_POOL;
|
||||
static DeclareMemType MTYPE_PIPELINE_ALLOCATE_DRAWABLE;
|
||||
static DeclareMemType MTYPE_PIPELINE_ADD_OBJECT;
|
||||
static DeclareMemType MTYPE_PIPELINE_CREATE_OBJECTS;
|
||||
static DeclareMemType MTYPE_PIPELINE_UPDATE_MOVE;
|
||||
static DeclareMemType MTYPE_PIPELINE_UPDATE_GEOM;
|
||||
static DeclareMemType MTYPE_PIPELINE_MARK_VISIBLE;
|
||||
static DeclareMemType MTYPE_PIPELINE_MARK_MOVED;
|
||||
static DeclareMemType MTYPE_PIPELINE_MARK_SHIFT;
|
||||
static DeclareMemType MTYPE_PIPELINE_SHIFT_OBJECTS;
|
||||
static DeclareMemType MTYPE_PIPELINE_MARK_TEXTURED;
|
||||
static DeclareMemType MTYPE_PIPELINE_MARK_REBUILD;
|
||||
static DeclareMemType MTYPE_PIPELINE_UPDATE_CULL;
|
||||
static DeclareMemType MTYPE_PIPELINE_STATE_SORT;
|
||||
static DeclareMemType MTYPE_PIPELINE_POST_SORT;
|
||||
|
||||
static DeclareMemType MTYPE_PIPELINE_RENDER_HUD_ELS;
|
||||
static DeclareMemType MTYPE_PIPELINE_RENDER_HL;
|
||||
static DeclareMemType MTYPE_PIPELINE_RENDER_GEOM;
|
||||
static DeclareMemType MTYPE_PIPELINE_RENDER_GEOM_DEFFERRED;
|
||||
static DeclareMemType MTYPE_PIPELINE_RENDER_GEOM_POST_DEF;
|
||||
static DeclareMemType MTYPE_PIPELINE_RENDER_GEOM_SHADOW;
|
||||
static DeclareMemType MTYPE_PIPELINE_RENDER_SELECT;
|
||||
static DeclareMemType MTYPE_PIPELINE_REBUILD_POOLS;
|
||||
static DeclareMemType MTYPE_PIPELINE_QUICK_LOOKUP;
|
||||
static DeclareMemType MTYPE_PIPELINE_RENDER_OBJECTS;
|
||||
static DeclareMemType MTYPE_PIPELINE_GENERATE_IMPOSTOR;
|
||||
static DeclareMemType MTYPE_PIPELINE_RENDER_BLOOM;
|
||||
|
||||
static DeclareMemType MTYPE_UPKEEP_POOLS;
|
||||
|
||||
static DeclareMemType MTYPE_AVATAR;
|
||||
static DeclareMemType MTYPE_AVATAR_MESH;
|
||||
static DeclareMemType MTYPE_PARTICLES;
|
||||
static DeclareMemType MTYPE_REGIONS;
|
||||
|
||||
static DeclareMemType MTYPE_INVENTORY;
|
||||
static DeclareMemType MTYPE_INVENTORY_DRAW;
|
||||
static DeclareMemType MTYPE_INVENTORY_BUILD_NEW_VIEWS;
|
||||
static DeclareMemType MTYPE_INVENTORY_DO_FOLDER;
|
||||
static DeclareMemType MTYPE_INVENTORY_POST_BUILD;
|
||||
static DeclareMemType MTYPE_INVENTORY_FROM_XML;
|
||||
static DeclareMemType MTYPE_INVENTORY_CREATE_NEW_ITEM;
|
||||
static DeclareMemType MTYPE_INVENTORY_VIEW_INIT;
|
||||
static DeclareMemType MTYPE_INVENTORY_VIEW_SHOW;
|
||||
static DeclareMemType MTYPE_INVENTORY_VIEW_TOGGLE;
|
||||
|
||||
static DeclareMemType MTYPE_ANIMATION;
|
||||
static DeclareMemType MTYPE_VOLUME;
|
||||
static DeclareMemType MTYPE_PRIMITIVE;
|
||||
|
||||
static DeclareMemType MTYPE_SCRIPT;
|
||||
static DeclareMemType MTYPE_SCRIPT_RUN;
|
||||
static DeclareMemType MTYPE_SCRIPT_BYTECODE;
|
||||
|
||||
static DeclareMemType MTYPE_IO_PUMP;
|
||||
static DeclareMemType MTYPE_IO_TCP;
|
||||
static DeclareMemType MTYPE_IO_BUFFER;
|
||||
static DeclareMemType MTYPE_IO_HTTP_SERVER;
|
||||
static DeclareMemType MTYPE_IO_SD_SERVER;
|
||||
static DeclareMemType MTYPE_IO_SD_CLIENT;
|
||||
static DeclareMemType MTYPE_IO_URL_REQUEST;
|
||||
|
||||
static DeclareMemType MTYPE_DIRECTX_INIT;
|
||||
|
||||
static DeclareMemType MTYPE_TEMP1;
|
||||
static DeclareMemType MTYPE_TEMP2;
|
||||
static DeclareMemType MTYPE_TEMP3;
|
||||
static DeclareMemType MTYPE_TEMP4;
|
||||
static DeclareMemType MTYPE_TEMP5;
|
||||
static DeclareMemType MTYPE_TEMP6;
|
||||
static DeclareMemType MTYPE_TEMP7;
|
||||
static DeclareMemType MTYPE_TEMP8;
|
||||
static DeclareMemType MTYPE_TEMP9;
|
||||
|
||||
static DeclareMemType MTYPE_OTHER; // Special; used by display code
|
||||
|
||||
S32 mTypeIndex;
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#endif
|
||||
|
||||
|
|
@ -30,7 +30,6 @@
|
|||
|
||||
#include "llmath.h"
|
||||
#include "v4coloru.h"
|
||||
#include "llmemtype.h"
|
||||
|
||||
#include "llimagebmp.h"
|
||||
#include "llimagetga.h"
|
||||
|
|
@ -96,8 +95,7 @@ LLImageBase::LLImageBase()
|
|||
mHeight(0),
|
||||
mComponents(0),
|
||||
mBadBufferAllocation(false),
|
||||
mAllowOverSize(false),
|
||||
mMemType(LLMemType::MTYPE_IMAGEBASE)
|
||||
mAllowOverSize(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -167,8 +165,6 @@ void LLImageBase::deleteData()
|
|||
// virtual
|
||||
U8* LLImageBase::allocateData(S32 size)
|
||||
{
|
||||
LLMemType mt1(mMemType);
|
||||
|
||||
if (size < 0)
|
||||
{
|
||||
size = mWidth * mHeight * mComponents;
|
||||
|
|
@ -213,7 +209,6 @@ U8* LLImageBase::allocateData(S32 size)
|
|||
// virtual
|
||||
U8* LLImageBase::reallocateData(S32 size)
|
||||
{
|
||||
LLMemType mt1(mMemType);
|
||||
U8 *new_datap = (U8*)ALLOCATE_MEM(sPrivatePoolp, size);
|
||||
if (!new_datap)
|
||||
{
|
||||
|
|
@ -279,14 +274,12 @@ S32 LLImageRaw::sRawImageCount = 0;
|
|||
LLImageRaw::LLImageRaw()
|
||||
: LLImageBase()
|
||||
{
|
||||
mMemType = LLMemType::MTYPE_IMAGERAW;
|
||||
++sRawImageCount;
|
||||
}
|
||||
|
||||
LLImageRaw::LLImageRaw(U16 width, U16 height, S8 components)
|
||||
: LLImageBase()
|
||||
{
|
||||
mMemType = LLMemType::MTYPE_IMAGERAW;
|
||||
//llassert( S32(width) * S32(height) * S32(components) <= MAX_IMAGE_DATA_SIZE );
|
||||
allocateDataSize(width, height, components);
|
||||
++sRawImageCount;
|
||||
|
|
@ -295,7 +288,6 @@ LLImageRaw::LLImageRaw(U16 width, U16 height, S8 components)
|
|||
LLImageRaw::LLImageRaw(U8 *data, U16 width, U16 height, S8 components)
|
||||
: LLImageBase()
|
||||
{
|
||||
mMemType = LLMemType::MTYPE_IMAGERAW;
|
||||
if(allocateDataSize(width, height, components))
|
||||
{
|
||||
memcpy(getData(), data, width*height*components);
|
||||
|
|
@ -370,29 +362,6 @@ BOOL LLImageRaw::resize(U16 width, U16 height, S8 components)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
#if 0
|
||||
U8 * LLImageRaw::getSubImage(U32 x_pos, U32 y_pos, U32 width, U32 height) const
|
||||
{
|
||||
LLMemType mt1(mMemType);
|
||||
U8 *data = new U8[width*height*getComponents()];
|
||||
|
||||
// Should do some simple bounds checking
|
||||
if (!data)
|
||||
{
|
||||
llerrs << "Out of memory in LLImageRaw::getSubImage" << llendl;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
U32 i;
|
||||
for (i = y_pos; i < y_pos+height; i++)
|
||||
{
|
||||
memcpy(data + i*width*getComponents(), /* Flawfinder: ignore */
|
||||
getData() + ((y_pos + i)*getWidth() + x_pos)*getComponents(), getComponents()*width);
|
||||
}
|
||||
return data;
|
||||
}
|
||||
#endif
|
||||
|
||||
BOOL LLImageRaw::setSubImage(U32 x_pos, U32 y_pos, U32 width, U32 height,
|
||||
const U8 *data, U32 stride, BOOL reverse_y)
|
||||
{
|
||||
|
|
@ -457,7 +426,6 @@ void LLImageRaw::clear(U8 r, U8 g, U8 b, U8 a)
|
|||
// Reverses the order of the rows in the image
|
||||
void LLImageRaw::verticalFlip()
|
||||
{
|
||||
LLMemType mt1(mMemType);
|
||||
S32 row_bytes = getWidth() * getComponents();
|
||||
llassert(row_bytes > 0);
|
||||
std::vector<U8> line_buffer(row_bytes);
|
||||
|
|
@ -590,7 +558,6 @@ void LLImageRaw::composite( LLImageRaw* src )
|
|||
// Src and dst can be any size. Src has 4 components. Dst has 3 components.
|
||||
void LLImageRaw::compositeScaled4onto3(LLImageRaw* src)
|
||||
{
|
||||
LLMemType mt1(mMemType);
|
||||
llinfos << "compositeScaled4onto3" << llendl;
|
||||
|
||||
LLImageRaw* dst = this; // Just for clarity.
|
||||
|
|
@ -832,7 +799,6 @@ void LLImageRaw::copyUnscaled3onto4( LLImageRaw* src )
|
|||
// Src and dst can be any size. Src and dst have same number of components.
|
||||
void LLImageRaw::copyScaled( LLImageRaw* src )
|
||||
{
|
||||
LLMemType mt1(mMemType);
|
||||
LLImageRaw* dst = this; // Just for clarity.
|
||||
|
||||
llassert_always( (1 == src->getComponents()) || (3 == src->getComponents()) || (4 == src->getComponents()) );
|
||||
|
|
@ -861,57 +827,9 @@ void LLImageRaw::copyScaled( LLImageRaw* src )
|
|||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
//scale down image by not blending a pixel with its neighbors.
|
||||
BOOL LLImageRaw::scaleDownWithoutBlending( S32 new_width, S32 new_height)
|
||||
{
|
||||
LLMemType mt1(mMemType);
|
||||
|
||||
S8 c = getComponents() ;
|
||||
llassert((1 == c) || (3 == c) || (4 == c) );
|
||||
|
||||
S32 old_width = getWidth();
|
||||
S32 old_height = getHeight();
|
||||
|
||||
S32 new_data_size = old_width * new_height * c ;
|
||||
llassert_always(new_data_size > 0);
|
||||
|
||||
F32 ratio_x = (F32)old_width / new_width ;
|
||||
F32 ratio_y = (F32)old_height / new_height ;
|
||||
if( ratio_x < 1.0f || ratio_y < 1.0f )
|
||||
{
|
||||
return TRUE; // Nothing to do.
|
||||
}
|
||||
ratio_x -= 1.0f ;
|
||||
ratio_y -= 1.0f ;
|
||||
|
||||
U8* new_data = allocateMemory(new_data_size) ;
|
||||
llassert_always(new_data != NULL) ;
|
||||
|
||||
U8* old_data = getData() ;
|
||||
S32 i, j, k, s, t;
|
||||
for(i = 0, s = 0, t = 0 ; i < new_height ; i++)
|
||||
{
|
||||
for(j = 0 ; j < new_width ; j++)
|
||||
{
|
||||
for(k = 0 ; k < c ; k++)
|
||||
{
|
||||
new_data[s++] = old_data[t++] ;
|
||||
}
|
||||
t += (S32)(ratio_x * c + 0.1f) ;
|
||||
}
|
||||
t += (S32)(ratio_y * old_width * c + 0.1f) ;
|
||||
}
|
||||
|
||||
setDataAndSize(new_data, new_width, new_height, c) ;
|
||||
|
||||
return TRUE ;
|
||||
}
|
||||
#endif
|
||||
|
||||
BOOL LLImageRaw::scale( S32 new_width, S32 new_height, BOOL scale_image_data )
|
||||
{
|
||||
LLMemType mt1(mMemType);
|
||||
llassert((1 == getComponents()) || (3 == getComponents()) || (4 == getComponents()) );
|
||||
|
||||
S32 old_width = getWidth();
|
||||
|
|
@ -1341,7 +1259,6 @@ LLImageFormatted::LLImageFormatted(S8 codec)
|
|||
mDiscardLevel(-1),
|
||||
mLevels(0)
|
||||
{
|
||||
mMemType = LLMemType::MTYPE_IMAGEFORMATTED;
|
||||
}
|
||||
|
||||
// virtual
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@
|
|||
#include "lluuid.h"
|
||||
#include "llstring.h"
|
||||
#include "llthread.h"
|
||||
#include "llmemtype.h"
|
||||
|
||||
const S32 MIN_IMAGE_MIP = 2; // 4x4, only used for expand/contract power of 2
|
||||
const S32 MAX_IMAGE_MIP = 11; // 2048x2048
|
||||
|
|
@ -176,8 +175,6 @@ private:
|
|||
bool mAllowOverSize ;
|
||||
|
||||
static LLPrivateMemoryPool* sPrivatePoolp ;
|
||||
public:
|
||||
LLMemType::DeclareMemType& mMemType; // debug
|
||||
};
|
||||
|
||||
// Raw representation of an image (used for textures, and other uncompressed formats
|
||||
|
|
@ -211,8 +208,7 @@ public:
|
|||
void contractToPowerOfTwo(S32 max_dim = MAX_IMAGE_SIZE, BOOL scale_image = TRUE);
|
||||
void biasedScaleToPowerOfTwo(S32 max_dim = MAX_IMAGE_SIZE);
|
||||
BOOL scale( S32 new_width, S32 new_height, BOOL scale_image = TRUE );
|
||||
//BOOL scaleDownWithoutBlending( S32 new_width, S32 new_height) ;
|
||||
|
||||
|
||||
// Fill the buffer with a constant color
|
||||
void fill( const LLColor4U& color );
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@
|
|||
|
||||
#include "lldir.h"
|
||||
#include "llimagej2c.h"
|
||||
#include "llmemtype.h"
|
||||
#include "lltimer.h"
|
||||
#include "llmath.h"
|
||||
#include "llmemory.h"
|
||||
|
|
@ -161,7 +160,6 @@ BOOL LLImageJ2C::decode(LLImageRaw *raw_imagep, F32 decode_time)
|
|||
BOOL LLImageJ2C::decodeChannels(LLImageRaw *raw_imagep, F32 decode_time, S32 first_channel, S32 max_channel_count )
|
||||
{
|
||||
LLTimer elapsed;
|
||||
LLMemType mt1(mMemType);
|
||||
|
||||
BOOL res = TRUE;
|
||||
|
||||
|
|
@ -227,7 +225,6 @@ BOOL LLImageJ2C::encode(const LLImageRaw *raw_imagep, F32 encode_time)
|
|||
BOOL LLImageJ2C::encode(const LLImageRaw *raw_imagep, const char* comment_text, F32 encode_time)
|
||||
{
|
||||
LLTimer elapsed;
|
||||
LLMemType mt1(mMemType);
|
||||
resetLastError();
|
||||
BOOL res = mImpl->encodeImpl(*this, *raw_imagep, comment_text, encode_time, mReversible);
|
||||
if (!mLastError.empty())
|
||||
|
|
@ -404,7 +401,6 @@ BOOL LLImageJ2C::loadAndValidate(const std::string &filename)
|
|||
|
||||
BOOL LLImageJ2C::validate(U8 *data, U32 file_size)
|
||||
{
|
||||
LLMemType mt1(mMemType);
|
||||
|
||||
resetLastError();
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@
|
|||
#include "lldarray.h"
|
||||
#include "llfoldertype.h"
|
||||
#include "llinventorytype.h"
|
||||
#include "llmemtype.h"
|
||||
#include "llpermissions.h"
|
||||
#include "llrefcount.h"
|
||||
#include "llsaleinfo.h"
|
||||
|
|
@ -54,7 +53,6 @@ public:
|
|||
// Initialization
|
||||
//--------------------------------------------------------------------
|
||||
public:
|
||||
MEM_TYPE_NEW(LLMemType::MTYPE_INVENTORY);
|
||||
LLInventoryObject();
|
||||
LLInventoryObject(const LLUUID& uuid,
|
||||
const LLUUID& parent_uuid,
|
||||
|
|
@ -129,7 +127,6 @@ public:
|
|||
// Initialization
|
||||
//--------------------------------------------------------------------
|
||||
public:
|
||||
MEM_TYPE_NEW(LLMemType::MTYPE_INVENTORY);
|
||||
LLInventoryItem(const LLUUID& uuid,
|
||||
const LLUUID& parent_uuid,
|
||||
const LLPermissions& permissions,
|
||||
|
|
@ -242,7 +239,6 @@ public:
|
|||
// Initialization
|
||||
//--------------------------------------------------------------------
|
||||
public:
|
||||
MEM_TYPE_NEW(LLMemType::MTYPE_INVENTORY);
|
||||
LLInventoryCategory(const LLUUID& uuid, const LLUUID& parent_uuid,
|
||||
LLFolderType::EType preferred_type,
|
||||
const std::string& name);
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@
|
|||
#include <cmath>
|
||||
|
||||
#include "llerror.h"
|
||||
#include "llmemtype.h"
|
||||
|
||||
#include "llvolumemgr.h"
|
||||
#include "v2math.h"
|
||||
|
|
@ -389,8 +388,6 @@ public:
|
|||
|
||||
LLProfile::Face* LLProfile::addCap(S16 faceID)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_VOLUME);
|
||||
|
||||
Face *face = vector_append(mFaces, 1);
|
||||
|
||||
face->mIndex = 0;
|
||||
|
|
@ -403,8 +400,6 @@ LLProfile::Face* LLProfile::addCap(S16 faceID)
|
|||
|
||||
LLProfile::Face* LLProfile::addFace(S32 i, S32 count, F32 scaleU, S16 faceID, BOOL flat)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_VOLUME);
|
||||
|
||||
Face *face = vector_append(mFaces, 1);
|
||||
|
||||
face->mIndex = i;
|
||||
|
|
@ -420,7 +415,6 @@ LLProfile::Face* LLProfile::addFace(S32 i, S32 count, F32 scaleU, S16 faceID, BO
|
|||
//static
|
||||
S32 LLProfile::getNumNGonPoints(const LLProfileParams& params, S32 sides, F32 offset, F32 bevel, F32 ang_scale, S32 split)
|
||||
{ // this is basically LLProfile::genNGon stripped down to only the operations that influence the number of points
|
||||
LLMemType m1(LLMemType::MTYPE_VOLUME);
|
||||
S32 np = 0;
|
||||
|
||||
// Generate an n-sided "circular" path.
|
||||
|
|
@ -486,8 +480,6 @@ S32 LLProfile::getNumNGonPoints(const LLProfileParams& params, S32 sides, F32 of
|
|||
// filleted and chamfered corners
|
||||
void LLProfile::genNGon(const LLProfileParams& params, S32 sides, F32 offset, F32 bevel, F32 ang_scale, S32 split)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_VOLUME);
|
||||
|
||||
// Generate an n-sided "circular" path.
|
||||
// 0 is (1,0), and we go counter-clockwise along a circular path from there.
|
||||
const F32 tableScale[] = { 1, 1, 1, 0.5f, 0.707107f, 0.53f, 0.525f, 0.5f };
|
||||
|
|
@ -741,8 +733,6 @@ LLProfile::Face* LLProfile::addHole(const LLProfileParams& params, BOOL flat, F3
|
|||
S32 LLProfile::getNumPoints(const LLProfileParams& params, BOOL path_open,F32 detail, S32 split,
|
||||
BOOL is_sculpted, S32 sculpt_size)
|
||||
{ // this is basically LLProfile::generate stripped down to only operations that influence the number of points
|
||||
LLMemType m1(LLMemType::MTYPE_VOLUME);
|
||||
|
||||
if (detail < MIN_LOD)
|
||||
{
|
||||
detail = MIN_LOD;
|
||||
|
|
@ -853,8 +843,6 @@ S32 LLProfile::getNumPoints(const LLProfileParams& params, BOOL path_open,F32 de
|
|||
BOOL LLProfile::generate(const LLProfileParams& params, BOOL path_open,F32 detail, S32 split,
|
||||
BOOL is_sculpted, S32 sculpt_size)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_VOLUME);
|
||||
|
||||
if ((!mDirty) && (!is_sculpted))
|
||||
{
|
||||
return FALSE;
|
||||
|
|
@ -1127,8 +1115,6 @@ BOOL LLProfile::generate(const LLProfileParams& params, BOOL path_open,F32 detai
|
|||
|
||||
BOOL LLProfileParams::importFile(LLFILE *fp)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_VOLUME);
|
||||
|
||||
const S32 BUFSIZE = 16384;
|
||||
char buffer[BUFSIZE]; /* Flawfinder: ignore */
|
||||
// *NOTE: changing the size or type of these buffers will require
|
||||
|
|
@ -1204,8 +1190,6 @@ BOOL LLProfileParams::exportFile(LLFILE *fp) const
|
|||
|
||||
BOOL LLProfileParams::importLegacyStream(std::istream& input_stream)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_VOLUME);
|
||||
|
||||
const S32 BUFSIZE = 16384;
|
||||
char buffer[BUFSIZE]; /* Flawfinder: ignore */
|
||||
// *NOTE: changing the size or type of these buffers will require
|
||||
|
|
@ -1297,7 +1281,6 @@ bool LLProfileParams::fromLLSD(LLSD& sd)
|
|||
|
||||
void LLProfileParams::copyParams(const LLProfileParams ¶ms)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_VOLUME);
|
||||
setCurveType(params.getCurveType());
|
||||
setBegin(params.getBegin());
|
||||
setEnd(params.getEnd());
|
||||
|
|
@ -1514,8 +1497,6 @@ const LLVector2 LLPathParams::getEndScale() const
|
|||
|
||||
S32 LLPath::getNumPoints(const LLPathParams& params, F32 detail)
|
||||
{ // this is basically LLPath::generate stripped down to only the operations that influence the number of points
|
||||
LLMemType m1(LLMemType::MTYPE_VOLUME);
|
||||
|
||||
if (detail < MIN_LOD)
|
||||
{
|
||||
detail = MIN_LOD;
|
||||
|
|
@ -1565,8 +1546,6 @@ S32 LLPath::getNumPoints(const LLPathParams& params, F32 detail)
|
|||
BOOL LLPath::generate(const LLPathParams& params, F32 detail, S32 split,
|
||||
BOOL is_sculpted, S32 sculpt_size)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_VOLUME);
|
||||
|
||||
if ((!mDirty) && (!is_sculpted))
|
||||
{
|
||||
return FALSE;
|
||||
|
|
@ -1694,8 +1673,6 @@ BOOL LLPath::generate(const LLPathParams& params, F32 detail, S32 split,
|
|||
BOOL LLDynamicPath::generate(const LLPathParams& params, F32 detail, S32 split,
|
||||
BOOL is_sculpted, S32 sculpt_size)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_VOLUME);
|
||||
|
||||
mOpen = TRUE; // Draw end caps
|
||||
if (getPathLength() == 0)
|
||||
{
|
||||
|
|
@ -1717,8 +1694,6 @@ BOOL LLDynamicPath::generate(const LLPathParams& params, F32 detail, S32 split,
|
|||
|
||||
BOOL LLPathParams::importFile(LLFILE *fp)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_VOLUME);
|
||||
|
||||
const S32 BUFSIZE = 16384;
|
||||
char buffer[BUFSIZE]; /* Flawfinder: ignore */
|
||||
// *NOTE: changing the size or type of these buffers will require
|
||||
|
|
@ -1863,8 +1838,6 @@ BOOL LLPathParams::exportFile(LLFILE *fp) const
|
|||
|
||||
BOOL LLPathParams::importLegacyStream(std::istream& input_stream)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_VOLUME);
|
||||
|
||||
const S32 BUFSIZE = 16384;
|
||||
char buffer[BUFSIZE]; /* Flawfinder: ignore */
|
||||
// *NOTE: changing the size or type of these buffers will require
|
||||
|
|
@ -2072,8 +2045,6 @@ S32 LLVolume::sNumMeshPoints = 0;
|
|||
LLVolume::LLVolume(const LLVolumeParams ¶ms, const F32 detail, const BOOL generate_single_face, const BOOL is_unique)
|
||||
: mParams(params)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_VOLUME);
|
||||
|
||||
mUnique = is_unique;
|
||||
mFaceMask = 0x0;
|
||||
mDetail = detail;
|
||||
|
|
@ -2145,7 +2116,6 @@ LLVolume::~LLVolume()
|
|||
|
||||
BOOL LLVolume::generate()
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_VOLUME);
|
||||
llassert_always(mProfilep);
|
||||
|
||||
//Added 10.03.05 Dave Parks
|
||||
|
|
@ -2741,8 +2711,6 @@ S32 LLVolume::getNumFaces() const
|
|||
|
||||
void LLVolume::createVolumeFaces()
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_VOLUME);
|
||||
|
||||
if (mGenerateSingleFace)
|
||||
{
|
||||
// do nothing
|
||||
|
|
@ -2914,8 +2882,6 @@ F32 LLVolume::sculptGetSurfaceArea()
|
|||
// create placeholder shape
|
||||
void LLVolume::sculptGeneratePlaceholder()
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_VOLUME);
|
||||
|
||||
S32 sizeS = mPathp->mPath.size();
|
||||
S32 sizeT = mProfilep->mProfile.size();
|
||||
|
||||
|
|
@ -2952,9 +2918,6 @@ void LLVolume::sculptGenerateMapVertices(U16 sculpt_width, U16 sculpt_height, S8
|
|||
BOOL sculpt_mirror = sculpt_type & LL_SCULPT_FLAG_MIRROR;
|
||||
BOOL reverse_horizontal = (sculpt_invert ? !sculpt_mirror : sculpt_mirror); // XOR
|
||||
|
||||
|
||||
LLMemType m1(LLMemType::MTYPE_VOLUME);
|
||||
|
||||
S32 sizeS = mPathp->mPath.size();
|
||||
S32 sizeT = mProfilep->mProfile.size();
|
||||
|
||||
|
|
@ -3103,7 +3066,6 @@ void sculpt_calc_mesh_resolution(U16 width, U16 height, U8 type, F32 detail, S32
|
|||
// sculpt replaces generate() for sculpted surfaces
|
||||
void LLVolume::sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, const U8* sculpt_data, S32 sculpt_level)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_VOLUME);
|
||||
U8 sculpt_type = mParams.getSculptType();
|
||||
|
||||
BOOL data_is_empty = FALSE;
|
||||
|
|
@ -3240,7 +3202,6 @@ bool LLVolumeParams::operator<(const LLVolumeParams ¶ms) const
|
|||
|
||||
void LLVolumeParams::copyParams(const LLVolumeParams ¶ms)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_VOLUME);
|
||||
mProfileParams.copyParams(params.mProfileParams);
|
||||
mPathParams.copyParams(params.mPathParams);
|
||||
mSculptID = params.getSculptID();
|
||||
|
|
@ -3612,8 +3573,6 @@ bool LLVolumeParams::validate(U8 prof_curve, F32 prof_begin, F32 prof_end, F32 h
|
|||
|
||||
S32 *LLVolume::getTriangleIndices(U32 &num_indices) const
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_VOLUME);
|
||||
|
||||
S32 expected_num_triangle_indices = getNumTriangleIndices();
|
||||
if (expected_num_triangle_indices > MAX_VOLUME_TRIANGLE_INDICES)
|
||||
{
|
||||
|
|
@ -4341,8 +4300,6 @@ void LLVolume::generateSilhouetteVertices(std::vector<LLVector3> &vertices,
|
|||
const LLMatrix3& norm_mat_in,
|
||||
S32 face_mask)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_VOLUME);
|
||||
|
||||
LLMatrix4a mat;
|
||||
mat.loadu(mat_in);
|
||||
|
||||
|
|
@ -4804,241 +4761,8 @@ BOOL equalTriangle(const S32 *a, const S32 *b)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL LLVolume::cleanupTriangleData( const S32 num_input_vertices,
|
||||
const std::vector<Point>& input_vertices,
|
||||
const S32 num_input_triangles,
|
||||
S32 *input_triangles,
|
||||
S32 &num_output_vertices,
|
||||
LLVector3 **output_vertices,
|
||||
S32 &num_output_triangles,
|
||||
S32 **output_triangles)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_VOLUME);
|
||||
|
||||
/* Testing: avoid any cleanup
|
||||
static BOOL skip_cleanup = TRUE;
|
||||
if ( skip_cleanup )
|
||||
{
|
||||
num_output_vertices = num_input_vertices;
|
||||
num_output_triangles = num_input_triangles;
|
||||
|
||||
*output_vertices = new LLVector3[num_input_vertices];
|
||||
for (S32 index = 0; index < num_input_vertices; index++)
|
||||
{
|
||||
(*output_vertices)[index] = input_vertices[index].mPos;
|
||||
}
|
||||
|
||||
*output_triangles = new S32[num_input_triangles*3];
|
||||
memcpy(*output_triangles, input_triangles, 3*num_input_triangles*sizeof(S32)); // Flawfinder: ignore
|
||||
return TRUE;
|
||||
}
|
||||
*/
|
||||
|
||||
// Here's how we do this:
|
||||
// Create a structure which contains the original vertex index and the
|
||||
// LLVector3 data.
|
||||
// "Sort" the data by the vectors
|
||||
// Create an array the size of the old vertex list, with a mapping of
|
||||
// old indices to new indices.
|
||||
// Go through triangles, shift so the lowest index is first
|
||||
// Sort triangles by first index
|
||||
// Remove duplicate triangles
|
||||
// Allocate and pack new triangle data.
|
||||
|
||||
//LLTimer cleanupTimer;
|
||||
//llinfos << "In vertices: " << num_input_vertices << llendl;
|
||||
//llinfos << "In triangles: " << num_input_triangles << llendl;
|
||||
|
||||
S32 i;
|
||||
typedef std::multiset<LLVertexIndexPair*, lessVertex> vertex_set_t;
|
||||
vertex_set_t vertex_list;
|
||||
|
||||
LLVertexIndexPair *pairp = NULL;
|
||||
for (i = 0; i < num_input_vertices; i++)
|
||||
{
|
||||
LLVertexIndexPair *new_pairp = new LLVertexIndexPair(input_vertices[i].mPos, i);
|
||||
vertex_list.insert(new_pairp);
|
||||
}
|
||||
|
||||
// Generate the vertex mapping and the list of vertices without
|
||||
// duplicates. This will crash if there are no vertices.
|
||||
llassert(num_input_vertices > 0); // check for no vertices!
|
||||
S32 *vertex_mapping = new S32[num_input_vertices];
|
||||
LLVector3 *new_vertices = new LLVector3[num_input_vertices];
|
||||
LLVertexIndexPair *prev_pairp = NULL;
|
||||
|
||||
S32 new_num_vertices;
|
||||
|
||||
new_num_vertices = 0;
|
||||
for (vertex_set_t::iterator iter = vertex_list.begin(),
|
||||
end = vertex_list.end();
|
||||
iter != end; iter++)
|
||||
{
|
||||
pairp = *iter;
|
||||
if (!prev_pairp || ((pairp->mVertex - prev_pairp->mVertex).magVecSquared() >= VERTEX_SLOP_SQRD))
|
||||
{
|
||||
new_vertices[new_num_vertices] = pairp->mVertex;
|
||||
//llinfos << "Added vertex " << new_num_vertices << " : " << pairp->mVertex << llendl;
|
||||
new_num_vertices++;
|
||||
// Update the previous
|
||||
prev_pairp = pairp;
|
||||
}
|
||||
else
|
||||
{
|
||||
//llinfos << "Removed duplicate vertex " << pairp->mVertex << ", distance magVecSquared() is " << (pairp->mVertex - prev_pairp->mVertex).magVecSquared() << llendl;
|
||||
}
|
||||
vertex_mapping[pairp->mIndex] = new_num_vertices - 1;
|
||||
}
|
||||
|
||||
// Iterate through triangles and remove degenerates, re-ordering vertices
|
||||
// along the way.
|
||||
S32 *new_triangles = new S32[num_input_triangles * 3];
|
||||
S32 new_num_triangles = 0;
|
||||
|
||||
for (i = 0; i < num_input_triangles; i++)
|
||||
{
|
||||
S32 v1 = i*3;
|
||||
S32 v2 = v1 + 1;
|
||||
S32 v3 = v1 + 2;
|
||||
|
||||
//llinfos << "Checking triangle " << input_triangles[v1] << ":" << input_triangles[v2] << ":" << input_triangles[v3] << llendl;
|
||||
input_triangles[v1] = vertex_mapping[input_triangles[v1]];
|
||||
input_triangles[v2] = vertex_mapping[input_triangles[v2]];
|
||||
input_triangles[v3] = vertex_mapping[input_triangles[v3]];
|
||||
|
||||
if ((input_triangles[v1] == input_triangles[v2])
|
||||
|| (input_triangles[v1] == input_triangles[v3])
|
||||
|| (input_triangles[v2] == input_triangles[v3]))
|
||||
{
|
||||
//llinfos << "Removing degenerate triangle " << input_triangles[v1] << ":" << input_triangles[v2] << ":" << input_triangles[v3] << llendl;
|
||||
// Degenerate triangle, skip
|
||||
continue;
|
||||
}
|
||||
|
||||
if (input_triangles[v1] < input_triangles[v2])
|
||||
{
|
||||
if (input_triangles[v1] < input_triangles[v3])
|
||||
{
|
||||
// (0 < 1) && (0 < 2)
|
||||
new_triangles[new_num_triangles*3] = input_triangles[v1];
|
||||
new_triangles[new_num_triangles*3+1] = input_triangles[v2];
|
||||
new_triangles[new_num_triangles*3+2] = input_triangles[v3];
|
||||
}
|
||||
else
|
||||
{
|
||||
// (0 < 1) && (2 < 0)
|
||||
new_triangles[new_num_triangles*3] = input_triangles[v3];
|
||||
new_triangles[new_num_triangles*3+1] = input_triangles[v1];
|
||||
new_triangles[new_num_triangles*3+2] = input_triangles[v2];
|
||||
}
|
||||
}
|
||||
else if (input_triangles[v2] < input_triangles[v3])
|
||||
{
|
||||
// (1 < 0) && (1 < 2)
|
||||
new_triangles[new_num_triangles*3] = input_triangles[v2];
|
||||
new_triangles[new_num_triangles*3+1] = input_triangles[v3];
|
||||
new_triangles[new_num_triangles*3+2] = input_triangles[v1];
|
||||
}
|
||||
else
|
||||
{
|
||||
// (1 < 0) && (2 < 1)
|
||||
new_triangles[new_num_triangles*3] = input_triangles[v3];
|
||||
new_triangles[new_num_triangles*3+1] = input_triangles[v1];
|
||||
new_triangles[new_num_triangles*3+2] = input_triangles[v2];
|
||||
}
|
||||
new_num_triangles++;
|
||||
}
|
||||
|
||||
if (new_num_triangles == 0)
|
||||
{
|
||||
llwarns << "Created volume object with 0 faces." << llendl;
|
||||
delete[] new_triangles;
|
||||
delete[] vertex_mapping;
|
||||
delete[] new_vertices;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
typedef std::set<S32*, lessTriangle> triangle_set_t;
|
||||
triangle_set_t triangle_list;
|
||||
|
||||
for (i = 0; i < new_num_triangles; i++)
|
||||
{
|
||||
triangle_list.insert(&new_triangles[i*3]);
|
||||
}
|
||||
|
||||
// Sort through the triangle list, and delete duplicates
|
||||
|
||||
S32 *prevp = NULL;
|
||||
S32 *curp = NULL;
|
||||
|
||||
S32 *sorted_tris = new S32[new_num_triangles*3];
|
||||
S32 cur_tri = 0;
|
||||
for (triangle_set_t::iterator iter = triangle_list.begin(),
|
||||
end = triangle_list.end();
|
||||
iter != end; iter++)
|
||||
{
|
||||
curp = *iter;
|
||||
if (!prevp || !equalTriangle(prevp, curp))
|
||||
{
|
||||
//llinfos << "Added triangle " << *curp << ":" << *(curp+1) << ":" << *(curp+2) << llendl;
|
||||
sorted_tris[cur_tri*3] = *curp;
|
||||
sorted_tris[cur_tri*3+1] = *(curp+1);
|
||||
sorted_tris[cur_tri*3+2] = *(curp+2);
|
||||
cur_tri++;
|
||||
prevp = curp;
|
||||
}
|
||||
else
|
||||
{
|
||||
//llinfos << "Skipped triangle " << *curp << ":" << *(curp+1) << ":" << *(curp+2) << llendl;
|
||||
}
|
||||
}
|
||||
|
||||
*output_vertices = new LLVector3[new_num_vertices];
|
||||
num_output_vertices = new_num_vertices;
|
||||
for (i = 0; i < new_num_vertices; i++)
|
||||
{
|
||||
(*output_vertices)[i] = new_vertices[i];
|
||||
}
|
||||
|
||||
*output_triangles = new S32[cur_tri*3];
|
||||
num_output_triangles = cur_tri;
|
||||
memcpy(*output_triangles, sorted_tris, 3*cur_tri*sizeof(S32)); /* Flawfinder: ignore */
|
||||
|
||||
/*
|
||||
llinfos << "Out vertices: " << num_output_vertices << llendl;
|
||||
llinfos << "Out triangles: " << num_output_triangles << llendl;
|
||||
for (i = 0; i < num_output_vertices; i++)
|
||||
{
|
||||
llinfos << i << ":" << (*output_vertices)[i] << llendl;
|
||||
}
|
||||
for (i = 0; i < num_output_triangles; i++)
|
||||
{
|
||||
llinfos << i << ":" << (*output_triangles)[i*3] << ":" << (*output_triangles)[i*3+1] << ":" << (*output_triangles)[i*3+2] << llendl;
|
||||
}
|
||||
*/
|
||||
|
||||
//llinfos << "Out vertices: " << num_output_vertices << llendl;
|
||||
//llinfos << "Out triangles: " << num_output_triangles << llendl;
|
||||
delete[] vertex_mapping;
|
||||
vertex_mapping = NULL;
|
||||
delete[] new_vertices;
|
||||
new_vertices = NULL;
|
||||
delete[] new_triangles;
|
||||
new_triangles = NULL;
|
||||
delete[] sorted_tris;
|
||||
sorted_tris = NULL;
|
||||
triangle_list.clear();
|
||||
std::for_each(vertex_list.begin(), vertex_list.end(), DeletePointer());
|
||||
vertex_list.clear();
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
BOOL LLVolumeParams::importFile(LLFILE *fp)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_VOLUME);
|
||||
|
||||
//llinfos << "importing volume" << llendl;
|
||||
const S32 BUFSIZE = 16384;
|
||||
char buffer[BUFSIZE]; /* Flawfinder: ignore */
|
||||
|
|
@ -5093,8 +4817,6 @@ BOOL LLVolumeParams::exportFile(LLFILE *fp) const
|
|||
|
||||
BOOL LLVolumeParams::importLegacyStream(std::istream& input_stream)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_VOLUME);
|
||||
|
||||
//llinfos << "importing volume" << llendl;
|
||||
const S32 BUFSIZE = 16384;
|
||||
// *NOTE: changing the size or type of this buffer will require
|
||||
|
|
@ -5134,8 +4856,6 @@ BOOL LLVolumeParams::importLegacyStream(std::istream& input_stream)
|
|||
|
||||
BOOL LLVolumeParams::exportLegacyStream(std::ostream& output_stream) const
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_VOLUME);
|
||||
|
||||
output_stream <<"\tshape 0\n";
|
||||
output_stream <<"\t{\n";
|
||||
mPathParams.exportLegacyStream(output_stream);
|
||||
|
|
@ -6351,8 +6071,6 @@ void LerpPlanarVertex(LLVolumeFace::VertexData& v0,
|
|||
|
||||
BOOL LLVolumeFace::createUnCutCubeCap(LLVolume* volume, BOOL partial_build)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_VOLUME);
|
||||
|
||||
const std::vector<LLVolume::Point>& mesh = volume->getMesh();
|
||||
const std::vector<LLVector3>& profile = volume->getProfile().mProfile;
|
||||
S32 max_s = volume->getProfile().getTotal();
|
||||
|
|
@ -6503,8 +6221,6 @@ BOOL LLVolumeFace::createUnCutCubeCap(LLVolume* volume, BOOL partial_build)
|
|||
|
||||
BOOL LLVolumeFace::createCap(LLVolume* volume, BOOL partial_build)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_VOLUME);
|
||||
|
||||
if (!(mTypeMask & HOLLOW_MASK) &&
|
||||
!(mTypeMask & OPEN_MASK) &&
|
||||
((volume->getParams().getPathParams().getBegin()==0.0f)&&
|
||||
|
|
@ -6891,8 +6607,6 @@ BOOL LLVolumeFace::createCap(LLVolume* volume, BOOL partial_build)
|
|||
|
||||
void LLVolumeFace::createBinormals()
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_VOLUME);
|
||||
|
||||
if (!mBinormals)
|
||||
{
|
||||
allocateBinormals(mNumVertices);
|
||||
|
|
@ -7159,8 +6873,6 @@ void LLVolumeFace::appendFace(const LLVolumeFace& face, LLMatrix4& mat_in, LLMat
|
|||
|
||||
BOOL LLVolumeFace::createSide(LLVolume* volume, BOOL partial_build)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_VOLUME);
|
||||
|
||||
BOOL flat = mTypeMask & FLAT_MASK;
|
||||
|
||||
U8 sculpt_type = volume->getParams().getSculptType();
|
||||
|
|
|
|||
|
|
@ -1023,17 +1023,6 @@ public:
|
|||
LLVector3* normal = NULL,
|
||||
LLVector3* bi_normal = NULL);
|
||||
|
||||
// The following cleans up vertices and triangles,
|
||||
// getting rid of degenerate triangles and duplicate vertices,
|
||||
// and allocates new arrays with the clean data.
|
||||
static BOOL cleanupTriangleData( const S32 num_input_vertices,
|
||||
const std::vector<Point> &input_vertices,
|
||||
const S32 num_input_triangles,
|
||||
S32 *input_triangles,
|
||||
S32 &num_output_vertices,
|
||||
LLVector3 **output_vertices,
|
||||
S32 &num_output_triangles,
|
||||
S32 **output_triangles);
|
||||
LLFaceID generateFaceMask();
|
||||
|
||||
BOOL isFaceMaskValid(LLFaceID face_mask);
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@
|
|||
#include "linden_common.h"
|
||||
|
||||
#include "llvolumemgr.h"
|
||||
#include "llmemtype.h"
|
||||
#include "llvolume.h"
|
||||
|
||||
|
||||
|
|
@ -182,7 +181,6 @@ void LLVolumeMgr::insertGroup(LLVolumeLODGroup* volgroup)
|
|||
// protected
|
||||
LLVolumeLODGroup* LLVolumeMgr::createNewGroup(const LLVolumeParams& volume_params)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_VOLUME);
|
||||
LLVolumeLODGroup* volgroup = new LLVolumeLODGroup(volume_params);
|
||||
insertGroup(volgroup);
|
||||
return volgroup;
|
||||
|
|
@ -297,7 +295,6 @@ LLVolume* LLVolumeLODGroup::refLOD(const S32 detail)
|
|||
mRefs++;
|
||||
if (mVolumeLODs[detail].isNull())
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_VOLUME);
|
||||
mVolumeLODs[detail] = new LLVolume(mVolumeParams, mDetailScales[detail]);
|
||||
}
|
||||
mLODRefs[detail]++;
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@
|
|||
#include "llbuffer.h"
|
||||
|
||||
#include "llmath.h"
|
||||
#include "llmemtype.h"
|
||||
#include "llstl.h"
|
||||
#include "llthread.h"
|
||||
|
||||
|
|
@ -44,7 +43,6 @@ LLSegment::LLSegment() :
|
|||
mData(NULL),
|
||||
mSize(0)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||
}
|
||||
|
||||
LLSegment::LLSegment(S32 channel, U8* data, S32 data_len) :
|
||||
|
|
@ -52,12 +50,10 @@ LLSegment::LLSegment(S32 channel, U8* data, S32 data_len) :
|
|||
mData(data),
|
||||
mSize(data_len)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||
}
|
||||
|
||||
LLSegment::~LLSegment()
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||
}
|
||||
|
||||
bool LLSegment::isOnChannel(S32 channel) const
|
||||
|
|
@ -104,7 +100,6 @@ LLHeapBuffer::LLHeapBuffer() :
|
|||
mNextFree(NULL),
|
||||
mReclaimedBytes(0)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||
const S32 DEFAULT_HEAP_BUFFER_SIZE = 16384;
|
||||
allocate(DEFAULT_HEAP_BUFFER_SIZE);
|
||||
}
|
||||
|
|
@ -115,7 +110,6 @@ LLHeapBuffer::LLHeapBuffer(S32 size) :
|
|||
mNextFree(NULL),
|
||||
mReclaimedBytes(0)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||
allocate(size);
|
||||
}
|
||||
|
||||
|
|
@ -125,7 +119,6 @@ LLHeapBuffer::LLHeapBuffer(const U8* src, S32 len) :
|
|||
mNextFree(NULL),
|
||||
mReclaimedBytes(0)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||
if((len > 0) && src)
|
||||
{
|
||||
allocate(len);
|
||||
|
|
@ -139,7 +132,6 @@ LLHeapBuffer::LLHeapBuffer(const U8* src, S32 len) :
|
|||
// virtual
|
||||
LLHeapBuffer::~LLHeapBuffer()
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||
delete[] mBuffer;
|
||||
mBuffer = NULL;
|
||||
mSize = 0;
|
||||
|
|
@ -157,7 +149,6 @@ bool LLHeapBuffer::createSegment(
|
|||
S32 size,
|
||||
LLSegment& segment)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||
// get actual size of the segment.
|
||||
S32 actual_size = llmin(size, (mSize - S32(mNextFree - mBuffer)));
|
||||
|
||||
|
|
@ -212,7 +203,6 @@ bool LLHeapBuffer::containsSegment(const LLSegment& segment) const
|
|||
|
||||
void LLHeapBuffer::allocate(S32 size)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||
mReclaimedBytes = 0;
|
||||
mBuffer = new U8[size];
|
||||
if(mBuffer)
|
||||
|
|
@ -230,12 +220,10 @@ LLBufferArray::LLBufferArray() :
|
|||
mNextBaseChannel(0),
|
||||
mMutexp(NULL)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||
}
|
||||
|
||||
LLBufferArray::~LLBufferArray()
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||
std::for_each(mBuffers.begin(), mBuffers.end(), DeletePointer());
|
||||
|
||||
delete mMutexp;
|
||||
|
|
@ -314,7 +302,6 @@ bool LLBufferArray::append(S32 channel, const U8* src, S32 len)
|
|||
{
|
||||
LLMutexLock lock(mMutexp) ;
|
||||
|
||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||
std::vector<LLSegment> segments;
|
||||
if(copyIntoBuffers(channel, src, len, segments))
|
||||
{
|
||||
|
|
@ -329,7 +316,6 @@ bool LLBufferArray::prepend(S32 channel, const U8* src, S32 len)
|
|||
{
|
||||
ASSERT_LLBUFFERARRAY_MUTEX_LOCKED
|
||||
|
||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||
std::vector<LLSegment> segments;
|
||||
if(copyIntoBuffers(channel, src, len, segments))
|
||||
{
|
||||
|
|
@ -345,7 +331,6 @@ bool LLBufferArray::insertAfter(
|
|||
const U8* src,
|
||||
S32 len)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||
std::vector<LLSegment> segments;
|
||||
|
||||
LLMutexLock lock(mMutexp) ;
|
||||
|
|
@ -366,7 +351,6 @@ LLBufferArray::segment_iterator_t LLBufferArray::splitAfter(U8* address)
|
|||
{
|
||||
ASSERT_LLBUFFERARRAY_MUTEX_LOCKED
|
||||
|
||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||
segment_iterator_t end = mSegments.end();
|
||||
segment_iterator_t it = getSegment(address);
|
||||
if(it == end)
|
||||
|
|
@ -414,7 +398,6 @@ LLBufferArray::segment_iterator_t LLBufferArray::constructSegmentAfter(
|
|||
LLSegment& segment)
|
||||
{
|
||||
ASSERT_LLBUFFERARRAY_MUTEX_LOCKED
|
||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||
segment_iterator_t rv = mSegments.begin();
|
||||
segment_iterator_t end = mSegments.end();
|
||||
if(!address)
|
||||
|
|
@ -578,7 +561,6 @@ U8* LLBufferArray::readAfter(
|
|||
U8* dest,
|
||||
S32& len) const
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||
U8* rv = start;
|
||||
if(!dest || len <= 0)
|
||||
{
|
||||
|
|
@ -642,7 +624,6 @@ U8* LLBufferArray::seek(
|
|||
S32 delta) const
|
||||
{
|
||||
ASSERT_LLBUFFERARRAY_MUTEX_LOCKED
|
||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||
const_segment_iterator_t it;
|
||||
const_segment_iterator_t end = mSegments.end();
|
||||
U8* rv = start;
|
||||
|
|
@ -786,8 +767,6 @@ U8* LLBufferArray::seek(
|
|||
//test use only
|
||||
bool LLBufferArray::takeContents(LLBufferArray& source)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||
|
||||
LLMutexLock lock(mMutexp);
|
||||
source.lock();
|
||||
|
||||
|
|
@ -813,7 +792,6 @@ LLBufferArray::segment_iterator_t LLBufferArray::makeSegment(
|
|||
S32 len)
|
||||
{
|
||||
ASSERT_LLBUFFERARRAY_MUTEX_LOCKED
|
||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||
// start at the end of the buffers, because it is the most likely
|
||||
// to have free space.
|
||||
LLSegment segment;
|
||||
|
|
@ -852,7 +830,6 @@ LLBufferArray::segment_iterator_t LLBufferArray::makeSegment(
|
|||
bool LLBufferArray::eraseSegment(const segment_iterator_t& erase_iter)
|
||||
{
|
||||
ASSERT_LLBUFFERARRAY_MUTEX_LOCKED
|
||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||
|
||||
// Find out which buffer contains the segment, and if it is found,
|
||||
// ask it to reclaim the memory.
|
||||
|
|
@ -885,7 +862,6 @@ bool LLBufferArray::copyIntoBuffers(
|
|||
std::vector<LLSegment>& segments)
|
||||
{
|
||||
ASSERT_LLBUFFERARRAY_MUTEX_LOCKED
|
||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||
if(!src || !len) return false;
|
||||
S32 copied = 0;
|
||||
LLSegment segment;
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@
|
|||
#include "llbufferstream.h"
|
||||
|
||||
#include "llbuffer.h"
|
||||
#include "llmemtype.h"
|
||||
#include "llthread.h"
|
||||
|
||||
static const S32 DEFAULT_OUTPUT_SEGMENT_SIZE = 1024 * 4;
|
||||
|
|
@ -44,19 +43,16 @@ LLBufferStreamBuf::LLBufferStreamBuf(
|
|||
mChannels(channels),
|
||||
mBuffer(buffer)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||
}
|
||||
|
||||
LLBufferStreamBuf::~LLBufferStreamBuf()
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||
sync();
|
||||
}
|
||||
|
||||
// virtual
|
||||
int LLBufferStreamBuf::underflow()
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||
//lldebugs << "LLBufferStreamBuf::underflow()" << llendl;
|
||||
if(!mBuffer)
|
||||
{
|
||||
|
|
@ -129,7 +125,6 @@ int LLBufferStreamBuf::underflow()
|
|||
// virtual
|
||||
int LLBufferStreamBuf::overflow(int c)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||
if(!mBuffer)
|
||||
{
|
||||
return EOF;
|
||||
|
|
@ -169,7 +164,6 @@ int LLBufferStreamBuf::overflow(int c)
|
|||
// virtual
|
||||
int LLBufferStreamBuf::sync()
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||
int return_value = -1;
|
||||
if(!mBuffer)
|
||||
{
|
||||
|
|
@ -251,7 +245,6 @@ streampos LLBufferStreamBuf::seekoff(
|
|||
std::ios::openmode which)
|
||||
#endif
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||
if(!mBuffer
|
||||
|| ((way == std::ios::beg) && (off < 0))
|
||||
|| ((way == std::ios::end) && (off > 0)))
|
||||
|
|
@ -343,10 +336,8 @@ LLBufferStream::LLBufferStream(
|
|||
std::iostream(&mStreamBuf),
|
||||
mStreamBuf(channels, buffer)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||
}
|
||||
|
||||
LLBufferStream::~LLBufferStream()
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@
|
|||
#include "llsdserialize.h"
|
||||
#include "lluuid.h"
|
||||
#include "message.h"
|
||||
#include "llmemtype.h"
|
||||
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
|
|
@ -663,7 +662,6 @@ boost::signals2::connection LLCacheName::get(const LLUUID& id, bool is_group, ol
|
|||
|
||||
void LLCacheName::processPending()
|
||||
{
|
||||
LLMemType mt_pp(LLMemType::MTYPE_CACHE_PROCESS_PENDING);
|
||||
const F32 SECS_BETWEEN_PROCESS = 0.1f;
|
||||
if(!impl.mProcessTimer.checkExpirationAndReset(SECS_BETWEEN_PROCESS))
|
||||
{
|
||||
|
|
@ -769,7 +767,6 @@ std::string LLCacheName::getDefaultLastName()
|
|||
|
||||
void LLCacheName::Impl::processPendingAsks()
|
||||
{
|
||||
LLMemType mt_ppa(LLMemType::MTYPE_CACHE_PROCESS_PENDING_ASKS);
|
||||
sendRequest(_PREHASH_UUIDNameRequest, mAskNameQueue);
|
||||
sendRequest(_PREHASH_UUIDGroupNameRequest, mAskGroupQueue);
|
||||
mAskNameQueue.clear();
|
||||
|
|
@ -778,7 +775,6 @@ void LLCacheName::Impl::processPendingAsks()
|
|||
|
||||
void LLCacheName::Impl::processPendingReplies()
|
||||
{
|
||||
LLMemType mt_ppr(LLMemType::MTYPE_CACHE_PROCESS_PENDING_REPLIES);
|
||||
// First call all the callbacks, because they might send messages.
|
||||
for(ReplyQueue::iterator it = mReplyQueue.begin(); it != mReplyQueue.end(); ++it)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@
|
|||
#include "lliopipe.h"
|
||||
#include "lliosocket.h"
|
||||
#include "llioutil.h"
|
||||
#include "llmemtype.h"
|
||||
#include "llmemorystream.h"
|
||||
#include "llpumpio.h"
|
||||
#include "llsd.h"
|
||||
|
|
@ -443,7 +442,6 @@ LLIOPipe::EStatus LLHTTPResponseHeader::process_impl(
|
|||
{
|
||||
LLFastTimer t(FTM_PROCESS_HTTP_HEADER);
|
||||
PUMP_DEBUG;
|
||||
LLMemType m1(LLMemType::MTYPE_IO_HTTP_SERVER);
|
||||
if(eos)
|
||||
{
|
||||
PUMP_DEBUG;
|
||||
|
|
@ -587,13 +585,11 @@ LLHTTPResponder::LLHTTPResponder(const LLHTTPNode& tree, const LLSD& ctx) :
|
|||
mContentLength(0),
|
||||
mRootNode(tree)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_HTTP_SERVER);
|
||||
}
|
||||
|
||||
// virtual
|
||||
LLHTTPResponder::~LLHTTPResponder()
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_HTTP_SERVER);
|
||||
//lldebugs << "destroying LLHTTPResponder" << llendl;
|
||||
}
|
||||
|
||||
|
|
@ -603,7 +599,6 @@ bool LLHTTPResponder::readHeaderLine(
|
|||
U8* dest,
|
||||
S32& len)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_HTTP_SERVER);
|
||||
--len;
|
||||
U8* last = buffer->readAfter(channels.in(), mLastRead, dest, len);
|
||||
dest[len] = '\0';
|
||||
|
|
@ -628,7 +623,6 @@ void LLHTTPResponder::markBad(
|
|||
const LLChannelDescriptors& channels,
|
||||
buffer_ptr_t buffer)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_HTTP_SERVER);
|
||||
mState = STATE_SHORT_CIRCUIT;
|
||||
LLBufferStream out(channels, buffer.get());
|
||||
out << HTTP_VERSION_STR << " 400 Bad Request\r\n\r\n<html>\n"
|
||||
|
|
@ -648,7 +642,6 @@ LLIOPipe::EStatus LLHTTPResponder::process_impl(
|
|||
{
|
||||
LLFastTimer t(FTM_PROCESS_HTTP_RESPONDER);
|
||||
PUMP_DEBUG;
|
||||
LLMemType m1(LLMemType::MTYPE_IO_HTTP_SERVER);
|
||||
LLIOPipe::EStatus status = STATUS_OK;
|
||||
|
||||
// parsing headers
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@
|
|||
|
||||
#include "llbuffer.h"
|
||||
#include "llhost.h"
|
||||
#include "llmemtype.h"
|
||||
#include "llpumpio.h"
|
||||
|
||||
//
|
||||
|
|
@ -100,7 +99,6 @@ void ll_debug_socket(const char* msg, apr_socket_t* apr_sock)
|
|||
// static
|
||||
LLSocket::ptr_t LLSocket::create(apr_pool_t* pool, EType type, U16 port)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_TCP);
|
||||
LLSocket::ptr_t rv;
|
||||
apr_socket_t* socket = NULL;
|
||||
apr_pool_t* new_pool = NULL;
|
||||
|
|
@ -198,7 +196,6 @@ LLSocket::ptr_t LLSocket::create(apr_pool_t* pool, EType type, U16 port)
|
|||
// static
|
||||
LLSocket::ptr_t LLSocket::create(apr_socket_t* socket, apr_pool_t* pool)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_TCP);
|
||||
LLSocket::ptr_t rv;
|
||||
if(!socket)
|
||||
{
|
||||
|
|
@ -240,12 +237,10 @@ LLSocket::LLSocket(apr_socket_t* socket, apr_pool_t* pool) :
|
|||
mPort(PORT_INVALID)
|
||||
{
|
||||
ll_debug_socket("Constructing wholely formed socket", mSocket);
|
||||
LLMemType m1(LLMemType::MTYPE_IO_TCP);
|
||||
}
|
||||
|
||||
LLSocket::~LLSocket()
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_TCP);
|
||||
// *FIX: clean up memory we are holding.
|
||||
if(mSocket)
|
||||
{
|
||||
|
|
@ -265,7 +260,6 @@ LLSocket::~LLSocket()
|
|||
|
||||
void LLSocket::setBlocking(S32 timeout)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_TCP);
|
||||
// set up the socket options
|
||||
ll_apr_warn_status(apr_socket_timeout_set(mSocket, timeout));
|
||||
ll_apr_warn_status(apr_socket_opt_set(mSocket, APR_SO_NONBLOCK, 0));
|
||||
|
|
@ -276,7 +270,6 @@ void LLSocket::setBlocking(S32 timeout)
|
|||
|
||||
void LLSocket::setNonBlocking()
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_TCP);
|
||||
// set up the socket options
|
||||
ll_apr_warn_status(apr_socket_timeout_set(mSocket, 0));
|
||||
ll_apr_warn_status(apr_socket_opt_set(mSocket, APR_SO_NONBLOCK, 1));
|
||||
|
|
@ -293,12 +286,10 @@ LLIOSocketReader::LLIOSocketReader(LLSocket::ptr_t socket) :
|
|||
mSource(socket),
|
||||
mInitialized(false)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_TCP);
|
||||
}
|
||||
|
||||
LLIOSocketReader::~LLIOSocketReader()
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_TCP);
|
||||
//lldebugs << "Destroying LLIOSocketReader" << llendl;
|
||||
}
|
||||
|
||||
|
|
@ -314,7 +305,6 @@ LLIOPipe::EStatus LLIOSocketReader::process_impl(
|
|||
{
|
||||
LLFastTimer t(FTM_PROCESS_SOCKET_READER);
|
||||
PUMP_DEBUG;
|
||||
LLMemType m1(LLMemType::MTYPE_IO_TCP);
|
||||
if(!mSource) return STATUS_PRECONDITION_NOT_MET;
|
||||
if(!mInitialized)
|
||||
{
|
||||
|
|
@ -396,12 +386,10 @@ LLIOSocketWriter::LLIOSocketWriter(LLSocket::ptr_t socket) :
|
|||
mLastWritten(NULL),
|
||||
mInitialized(false)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_TCP);
|
||||
}
|
||||
|
||||
LLIOSocketWriter::~LLIOSocketWriter()
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_TCP);
|
||||
//lldebugs << "Destroying LLIOSocketWriter" << llendl;
|
||||
}
|
||||
|
||||
|
|
@ -416,7 +404,6 @@ LLIOPipe::EStatus LLIOSocketWriter::process_impl(
|
|||
{
|
||||
LLFastTimer t(FTM_PROCESS_SOCKET_WRITER);
|
||||
PUMP_DEBUG;
|
||||
LLMemType m1(LLMemType::MTYPE_IO_TCP);
|
||||
if(!mDestination) return STATUS_PRECONDITION_NOT_MET;
|
||||
if(!mInitialized)
|
||||
{
|
||||
|
|
@ -550,12 +537,10 @@ LLIOServerSocket::LLIOServerSocket(
|
|||
mInitialized(false),
|
||||
mResponseTimeout(DEFAULT_CHAIN_EXPIRY_SECS)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_TCP);
|
||||
}
|
||||
|
||||
LLIOServerSocket::~LLIOServerSocket()
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_TCP);
|
||||
//lldebugs << "Destroying LLIOServerSocket" << llendl;
|
||||
}
|
||||
|
||||
|
|
@ -575,7 +560,6 @@ LLIOPipe::EStatus LLIOServerSocket::process_impl(
|
|||
{
|
||||
LLFastTimer t(FTM_PROCESS_SERVER_SOCKET);
|
||||
PUMP_DEBUG;
|
||||
LLMemType m1(LLMemType::MTYPE_IO_TCP);
|
||||
if(!pump)
|
||||
{
|
||||
llwarns << "Need a pump for server socket." << llendl;
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@
|
|||
#include "apr_poll.h"
|
||||
|
||||
#include "llapr.h"
|
||||
#include "llmemtype.h"
|
||||
#include "llstl.h"
|
||||
#include "llstat.h"
|
||||
|
||||
|
|
@ -153,7 +152,6 @@ struct ll_delete_apr_pollset_fd_client_data
|
|||
typedef std::pair<LLIOPipe::ptr_t, apr_pollfd_t> pipe_conditional_t;
|
||||
void operator()(const pipe_conditional_t& conditional)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
|
||||
S32* client_id = (S32*)conditional.second.client_data;
|
||||
delete client_id;
|
||||
}
|
||||
|
|
@ -177,19 +175,16 @@ LLPumpIO::LLPumpIO(apr_pool_t* pool) :
|
|||
{
|
||||
mCurrentChain = mRunningChains.end();
|
||||
|
||||
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
|
||||
initialize(pool);
|
||||
}
|
||||
|
||||
LLPumpIO::~LLPumpIO()
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
|
||||
cleanup();
|
||||
}
|
||||
|
||||
bool LLPumpIO::prime(apr_pool_t* pool)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
|
||||
cleanup();
|
||||
initialize(pool);
|
||||
return ((pool == NULL) ? false : true);
|
||||
|
|
@ -197,7 +192,6 @@ bool LLPumpIO::prime(apr_pool_t* pool)
|
|||
|
||||
bool LLPumpIO::addChain(const chain_t& chain, F32 timeout, bool has_curl_request)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
|
||||
if(chain.empty()) return false;
|
||||
|
||||
#if LL_THREADS_APR
|
||||
|
|
@ -233,7 +227,6 @@ bool LLPumpIO::addChain(
|
|||
LLSD context,
|
||||
F32 timeout)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
|
||||
|
||||
// remember that if the caller is providing a full link
|
||||
// description, we need to have that description matched to a
|
||||
|
|
@ -311,7 +304,6 @@ static std::string events_2_string(apr_int16_t events)
|
|||
|
||||
bool LLPumpIO::setConditional(LLIOPipe* pipe, const apr_pollfd_t* poll)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
|
||||
if(!pipe) return false;
|
||||
ll_debug_poll_fd("Set conditional", poll);
|
||||
|
||||
|
|
@ -423,7 +415,6 @@ bool LLPumpIO::sleepChain(F64 seconds)
|
|||
|
||||
bool LLPumpIO::copyCurrentLinkInfo(links_t& links) const
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
|
||||
if(mRunningChains.end() == mCurrentChain)
|
||||
{
|
||||
return false;
|
||||
|
|
@ -454,7 +445,6 @@ LLPumpIO::current_chain_t LLPumpIO::removeRunningChain(LLPumpIO::current_chain_t
|
|||
//timeout is in microseconds
|
||||
void LLPumpIO::pump(const S32& poll_timeout)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
|
||||
LLFastTimer t1(FTM_PUMP_IO);
|
||||
//llinfos << "LLPumpIO::pump()" << llendl;
|
||||
|
||||
|
|
@ -747,7 +737,6 @@ void LLPumpIO::pump(const S32& poll_timeout)
|
|||
|
||||
bool LLPumpIO::respond(LLIOPipe* pipe)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
|
||||
if(NULL == pipe) return false;
|
||||
|
||||
#if LL_THREADS_APR
|
||||
|
|
@ -766,7 +755,6 @@ bool LLPumpIO::respond(
|
|||
LLIOPipe::buffer_ptr_t data,
|
||||
LLSD context)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
|
||||
// if the caller is providing a full link description, we need to
|
||||
// have that description matched to a particular buffer.
|
||||
if(!data) return false;
|
||||
|
|
@ -789,7 +777,6 @@ static LLFastTimer::DeclareTimer FTM_PUMP_CALLBACK_CHAIN("Chain");
|
|||
|
||||
void LLPumpIO::callback()
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
|
||||
//llinfos << "LLPumpIO::callback()" << llendl;
|
||||
if(true)
|
||||
{
|
||||
|
|
@ -840,7 +827,6 @@ void LLPumpIO::control(LLPumpIO::EControl op)
|
|||
|
||||
void LLPumpIO::initialize(apr_pool_t* pool)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
|
||||
if(!pool) return;
|
||||
#if LL_THREADS_APR
|
||||
// SJB: Windows defaults to NESTED and OSX defaults to UNNESTED, so use UNNESTED explicitly.
|
||||
|
|
@ -852,7 +838,6 @@ void LLPumpIO::initialize(apr_pool_t* pool)
|
|||
|
||||
void LLPumpIO::cleanup()
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
|
||||
#if LL_THREADS_APR
|
||||
if(mChainsMutex) apr_thread_mutex_destroy(mChainsMutex);
|
||||
if(mCallbackMutex) apr_thread_mutex_destroy(mCallbackMutex);
|
||||
|
|
@ -875,7 +860,6 @@ void LLPumpIO::cleanup()
|
|||
|
||||
void LLPumpIO::rebuildPollset()
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
|
||||
// lldebugs << "LLPumpIO::rebuildPollset()" << llendl;
|
||||
if(mPollset)
|
||||
{
|
||||
|
|
@ -928,7 +912,6 @@ void LLPumpIO::rebuildPollset()
|
|||
void LLPumpIO::processChain(LLChainInfo& chain)
|
||||
{
|
||||
PUMP_DEBUG;
|
||||
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
|
||||
LLIOPipe::EStatus status = LLIOPipe::STATUS_OK;
|
||||
links_t::iterator it = chain.mHead;
|
||||
links_t::iterator end = chain.mChainLinks.end();
|
||||
|
|
@ -1130,7 +1113,6 @@ bool LLPumpIO::handleChainError(
|
|||
LLChainInfo& chain,
|
||||
LLIOPipe::EStatus error)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
|
||||
links_t::reverse_iterator rit;
|
||||
if(chain.mHead == chain.mChainLinks.end())
|
||||
{
|
||||
|
|
@ -1194,13 +1176,11 @@ LLPumpIO::LLChainInfo::LLChainInfo() :
|
|||
mEOS(false),
|
||||
mHasCurlRequest(false)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
|
||||
mTimer.setTimerExpirySec(DEFAULT_CHAIN_EXPIRY_SECS);
|
||||
}
|
||||
|
||||
void LLPumpIO::LLChainInfo::setTimeoutSeconds(F32 timeout)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
|
||||
if(timeout > 0.0f)
|
||||
{
|
||||
mTimer.start();
|
||||
|
|
@ -1215,7 +1195,6 @@ void LLPumpIO::LLChainInfo::setTimeoutSeconds(F32 timeout)
|
|||
|
||||
void LLPumpIO::LLChainInfo::adjustTimeoutSeconds(F32 delta)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
|
||||
if(mTimer.getStarted())
|
||||
{
|
||||
F64 expiry = mTimer.expiresAt();
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@
|
|||
|
||||
#include "llbufferstream.h"
|
||||
#include "llfiltersd2xmlrpc.h"
|
||||
#include "llmemtype.h"
|
||||
#include "llpumpio.h"
|
||||
#include "llsd.h"
|
||||
#include "llsdserialize.h"
|
||||
|
|
@ -50,18 +49,15 @@ LLSDRPCResponse::LLSDRPCResponse() :
|
|||
mIsError(false),
|
||||
mIsFault(false)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_SD_CLIENT);
|
||||
}
|
||||
|
||||
// virtual
|
||||
LLSDRPCResponse::~LLSDRPCResponse()
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_SD_CLIENT);
|
||||
}
|
||||
|
||||
bool LLSDRPCResponse::extractResponse(const LLSD& sd)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_SD_CLIENT);
|
||||
bool rv = true;
|
||||
if(sd.has(LLSDRPC_RESPONSE_NAME))
|
||||
{
|
||||
|
|
@ -94,7 +90,6 @@ LLIOPipe::EStatus LLSDRPCResponse::process_impl(
|
|||
{
|
||||
LLFastTimer t(FTM_SDRPC_RESPONSE);
|
||||
PUMP_DEBUG;
|
||||
LLMemType m1(LLMemType::MTYPE_IO_SD_CLIENT);
|
||||
if(mIsError)
|
||||
{
|
||||
error(pump);
|
||||
|
|
@ -119,13 +114,11 @@ LLSDRPCClient::LLSDRPCClient() :
|
|||
mState(STATE_NONE),
|
||||
mQueue(EPBQ_PROCESS)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_SD_CLIENT);
|
||||
}
|
||||
|
||||
// virtual
|
||||
LLSDRPCClient::~LLSDRPCClient()
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_SD_CLIENT);
|
||||
}
|
||||
|
||||
bool LLSDRPCClient::call(
|
||||
|
|
@ -135,7 +128,6 @@ bool LLSDRPCClient::call(
|
|||
LLSDRPCResponse* response,
|
||||
EPassBackQueue queue)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_SD_CLIENT);
|
||||
//llinfos << "RPC: " << uri << "." << method << "(" << *parameter << ")"
|
||||
// << llendl;
|
||||
if(method.empty() || !response)
|
||||
|
|
@ -162,7 +154,6 @@ bool LLSDRPCClient::call(
|
|||
LLSDRPCResponse* response,
|
||||
EPassBackQueue queue)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_SD_CLIENT);
|
||||
//llinfos << "RPC: " << uri << "." << method << "(" << parameter << ")"
|
||||
// << llendl;
|
||||
if(method.empty() || parameter.empty() || !response)
|
||||
|
|
@ -193,7 +184,6 @@ LLIOPipe::EStatus LLSDRPCClient::process_impl(
|
|||
{
|
||||
LLFastTimer t(FTM_PROCESS_SDRPC_CLIENT);
|
||||
PUMP_DEBUG;
|
||||
LLMemType m1(LLMemType::MTYPE_IO_SD_CLIENT);
|
||||
if((STATE_NONE == mState) || (!pump))
|
||||
{
|
||||
// You should have called the call() method already.
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@
|
|||
|
||||
#include "llbuffer.h"
|
||||
#include "llbufferstream.h"
|
||||
#include "llmemtype.h"
|
||||
#include "llpumpio.h"
|
||||
#include "llsdserialize.h"
|
||||
#include "llstl.h"
|
||||
|
|
@ -58,12 +57,10 @@ LLSDRPCServer::LLSDRPCServer() :
|
|||
mPump(NULL),
|
||||
mLock(0)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_SD_SERVER);
|
||||
}
|
||||
|
||||
LLSDRPCServer::~LLSDRPCServer()
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_SD_SERVER);
|
||||
std::for_each(
|
||||
mMethods.begin(),
|
||||
mMethods.end(),
|
||||
|
|
@ -109,7 +106,6 @@ LLIOPipe::EStatus LLSDRPCServer::process_impl(
|
|||
{
|
||||
LLFastTimer t(FTM_PROCESS_SDRPC_SERVER);
|
||||
PUMP_DEBUG;
|
||||
LLMemType m1(LLMemType::MTYPE_IO_SD_SERVER);
|
||||
// lldebugs << "LLSDRPCServer::process_impl" << llendl;
|
||||
// Once we have all the data, We need to read the sd on
|
||||
// the the in channel, and respond on the out channel
|
||||
|
|
@ -253,7 +249,6 @@ ESDRPCSStatus LLSDRPCServer::callMethod(
|
|||
const LLChannelDescriptors& channels,
|
||||
LLBufferArray* response)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_SD_SERVER);
|
||||
// Try to find the method in the method table.
|
||||
ESDRPCSStatus rv = ESDRPCS_DONE;
|
||||
method_map_t::iterator it = mMethods.find(method);
|
||||
|
|
@ -292,7 +287,6 @@ ESDRPCSStatus LLSDRPCServer::callbackMethod(
|
|||
const LLChannelDescriptors& channels,
|
||||
LLBufferArray* response)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_SD_SERVER);
|
||||
// Try to find the method in the callback method table.
|
||||
ESDRPCSStatus rv = ESDRPCS_DONE;
|
||||
method_map_t::iterator it = mCallbackMethods.find(method);
|
||||
|
|
@ -320,7 +314,6 @@ void LLSDRPCServer::buildFault(
|
|||
S32 code,
|
||||
const std::string& msg)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_SD_SERVER);
|
||||
LLBufferStream ostr(channels, data);
|
||||
ostr << FAULT_PART_1 << code << FAULT_PART_2 << msg << FAULT_PART_3;
|
||||
llinfos << "LLSDRPCServer::buildFault: " << code << ", " << msg << llendl;
|
||||
|
|
@ -332,7 +325,6 @@ void LLSDRPCServer::buildResponse(
|
|||
LLBufferArray* data,
|
||||
const LLSD& response)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_SD_SERVER);
|
||||
LLBufferStream ostr(channels, data);
|
||||
ostr << RESPONSE_PART_1;
|
||||
LLSDSerialize::toNotation(response, ostr);
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@
|
|||
#include <openssl/ssl.h>
|
||||
#include "llcurl.h"
|
||||
#include "llioutil.h"
|
||||
#include "llmemtype.h"
|
||||
#include "llproxy.h"
|
||||
#include "llpumpio.h"
|
||||
#include "llsd.h"
|
||||
|
|
@ -81,7 +80,6 @@ LLURLRequestDetail::LLURLRequestDetail() :
|
|||
mIsBodyLimitSet(false),
|
||||
mSSLVerifyCallback(NULL)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST);
|
||||
mCurlRequest = new LLCurlEasyRequest();
|
||||
|
||||
if(!mCurlRequest->isValid()) //failed.
|
||||
|
|
@ -93,7 +91,6 @@ LLURLRequestDetail::LLURLRequestDetail() :
|
|||
|
||||
LLURLRequestDetail::~LLURLRequestDetail()
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST);
|
||||
delete mCurlRequest;
|
||||
mLastRead = NULL;
|
||||
}
|
||||
|
|
@ -156,7 +153,6 @@ std::string LLURLRequest::actionAsVerb(LLURLRequest::ERequestAction action)
|
|||
LLURLRequest::LLURLRequest(LLURLRequest::ERequestAction action) :
|
||||
mAction(action)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST);
|
||||
initialize();
|
||||
}
|
||||
|
||||
|
|
@ -165,21 +161,18 @@ LLURLRequest::LLURLRequest(
|
|||
const std::string& url) :
|
||||
mAction(action)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST);
|
||||
initialize();
|
||||
setURL(url);
|
||||
}
|
||||
|
||||
LLURLRequest::~LLURLRequest()
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST);
|
||||
delete mDetail;
|
||||
mDetail = NULL ;
|
||||
}
|
||||
|
||||
void LLURLRequest::setURL(const std::string& url)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST);
|
||||
mDetail->mURL = url;
|
||||
}
|
||||
|
||||
|
|
@ -190,7 +183,6 @@ std::string LLURLRequest::getURL() const
|
|||
|
||||
void LLURLRequest::addHeader(const char* header)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST);
|
||||
mDetail->mCurlRequest->slist_append(header);
|
||||
}
|
||||
|
||||
|
|
@ -202,7 +194,6 @@ void LLURLRequest::setBodyLimit(U32 size)
|
|||
|
||||
void LLURLRequest::setCallback(LLURLRequestComplete* callback)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST);
|
||||
mCompletionCallback = callback;
|
||||
mDetail->mCurlRequest->setHeaderCallback(&headerCallback, (void*)callback);
|
||||
}
|
||||
|
|
@ -267,8 +258,6 @@ LLIOPipe::EStatus LLURLRequest::handleError(
|
|||
LLIOPipe::EStatus status,
|
||||
LLPumpIO* pump)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST);
|
||||
|
||||
if(!isValid())
|
||||
{
|
||||
return STATUS_EXPIRED ;
|
||||
|
|
@ -300,7 +289,6 @@ LLIOPipe::EStatus LLURLRequest::process_impl(
|
|||
{
|
||||
LLFastTimer t(FTM_PROCESS_URL_REQUEST);
|
||||
PUMP_DEBUG;
|
||||
LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST);
|
||||
//llinfos << "LLURLRequest::process_impl()" << llendl;
|
||||
if (!buffer) return STATUS_ERROR;
|
||||
|
||||
|
|
@ -456,7 +444,6 @@ LLIOPipe::EStatus LLURLRequest::process_impl(
|
|||
|
||||
void LLURLRequest::initialize()
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST);
|
||||
mState = STATE_INITIALIZED;
|
||||
mDetail = new LLURLRequestDetail;
|
||||
|
||||
|
|
@ -477,7 +464,6 @@ bool LLURLRequest::configure()
|
|||
{
|
||||
LLFastTimer t(FTM_URL_REQUEST_CONFIGURE);
|
||||
|
||||
LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST);
|
||||
bool rv = false;
|
||||
S32 bytes = mDetail->mResponseBuffer->countAfter(
|
||||
mDetail->mChannels.in(),
|
||||
|
|
@ -557,7 +543,6 @@ size_t LLURLRequest::downCallback(
|
|||
size_t nmemb,
|
||||
void* user)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST);
|
||||
LLURLRequest* req = (LLURLRequest*)user;
|
||||
if(STATE_WAITING_FOR_RESPONSE == req->mState)
|
||||
{
|
||||
|
|
@ -593,7 +578,6 @@ size_t LLURLRequest::upCallback(
|
|||
size_t nmemb,
|
||||
void* user)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST);
|
||||
LLURLRequest* req = (LLURLRequest*)user;
|
||||
S32 bytes = llmin(
|
||||
(S32)(size * nmemb),
|
||||
|
|
@ -691,7 +675,6 @@ LLIOPipe::EStatus LLContextURLExtractor::process_impl(
|
|||
{
|
||||
LLFastTimer t(FTM_PROCESS_URL_EXTRACTOR);
|
||||
PUMP_DEBUG;
|
||||
LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST);
|
||||
// The destination host is in the context.
|
||||
if(context.isUndefined() || !mRequest)
|
||||
{
|
||||
|
|
@ -719,13 +702,11 @@ LLIOPipe::EStatus LLContextURLExtractor::process_impl(
|
|||
LLURLRequestComplete::LLURLRequestComplete() :
|
||||
mRequestStatus(LLIOPipe::STATUS_ERROR)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST);
|
||||
}
|
||||
|
||||
// virtual
|
||||
LLURLRequestComplete::~LLURLRequestComplete()
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST);
|
||||
}
|
||||
|
||||
//virtual
|
||||
|
|
@ -764,7 +745,6 @@ void LLURLRequestComplete::noResponse()
|
|||
|
||||
void LLURLRequestComplete::responseStatus(LLIOPipe::EStatus status)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST);
|
||||
mRequestStatus = status;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -80,7 +80,6 @@
|
|||
#include "v3math.h"
|
||||
#include "v4math.h"
|
||||
#include "lltransfertargetvfile.h"
|
||||
#include "llmemtype.h"
|
||||
|
||||
// Constants
|
||||
//const char* MESSAGE_LOG_FILENAME = "message.log";
|
||||
|
|
@ -793,7 +792,6 @@ S32 LLMessageSystem::getReceiveBytes() const
|
|||
|
||||
void LLMessageSystem::processAcks()
|
||||
{
|
||||
LLMemType mt_pa(LLMemType::MTYPE_MESSAGE_PROCESS_ACKS);
|
||||
F64 mt_sec = getMessageTimeSeconds();
|
||||
{
|
||||
gTransferManager.updateTransfers();
|
||||
|
|
@ -4020,7 +4018,6 @@ void LLMessageSystem::setTimeDecodesSpamThreshold( F32 seconds )
|
|||
// TODO: babbage: move gServicePump in to LLMessageSystem?
|
||||
bool LLMessageSystem::checkAllMessages(S64 frame_count, LLPumpIO* http_pump)
|
||||
{
|
||||
LLMemType mt_cam(LLMemType::MTYPE_MESSAGE_CHECK_ALL);
|
||||
if(checkMessages(frame_count))
|
||||
{
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@
|
|||
#include "linden_common.h"
|
||||
|
||||
#include "material_codes.h"
|
||||
#include "llmemtype.h"
|
||||
#include "llerror.h"
|
||||
#include "message.h"
|
||||
#include "llprimitive.h"
|
||||
|
|
@ -188,7 +187,6 @@ void LLPrimitive::clearTextureList()
|
|||
// static
|
||||
LLPrimitive *LLPrimitive::createPrimitive(LLPCode p_code)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_PRIMITIVE);
|
||||
LLPrimitive *retval = new LLPrimitive();
|
||||
|
||||
if (retval)
|
||||
|
|
@ -206,7 +204,6 @@ LLPrimitive *LLPrimitive::createPrimitive(LLPCode p_code)
|
|||
//===============================================================
|
||||
void LLPrimitive::init_primitive(LLPCode p_code)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_PRIMITIVE);
|
||||
clearTextureList();
|
||||
mPrimitiveCode = p_code;
|
||||
}
|
||||
|
|
@ -698,7 +695,6 @@ S32 face_index_from_id(LLFaceID face_ID, const std::vector<LLProfile::Face>& fac
|
|||
|
||||
BOOL LLPrimitive::setVolume(const LLVolumeParams &volume_params, const S32 detail, bool unique_volume)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_VOLUME);
|
||||
LLVolume *volumep;
|
||||
if (unique_volume)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@
|
|||
|
||||
#include "llprimtexturelist.h"
|
||||
#include "lltextureentry.h"
|
||||
#include "llmemtype.h"
|
||||
|
||||
// static
|
||||
//int (TMyClass::*pt2Member)(float, char, char) = NULL; // C++
|
||||
|
|
@ -367,7 +366,6 @@ S32 LLPrimTextureList::size() const
|
|||
// sets the size of the mEntryList container
|
||||
void LLPrimTextureList::setSize(S32 new_size)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_PRIMITIVE);
|
||||
if (new_size < 0)
|
||||
{
|
||||
new_size = 0;
|
||||
|
|
|
|||
|
|
@ -44,7 +44,6 @@
|
|||
#include "llmath.h"
|
||||
#include "m4math.h"
|
||||
#include "llstring.h"
|
||||
#include "llmemtype.h"
|
||||
#include "llstacktrace.h"
|
||||
|
||||
#include "llglheaders.h"
|
||||
|
|
@ -2323,7 +2322,6 @@ void LLGLNamePool::release(GLuint name)
|
|||
//static
|
||||
void LLGLNamePool::upkeepPools()
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_UPKEEP_POOLS);
|
||||
for (tracker_t::instance_iter iter = beginInstances(); iter != endInstances(); ++iter)
|
||||
{
|
||||
LLGLNamePool & pool = *iter;
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@
|
|||
#include "llvertexbuffer.h"
|
||||
// #include "llrender.h"
|
||||
#include "llglheaders.h"
|
||||
#include "llmemtype.h"
|
||||
#include "llrender.h"
|
||||
#include "llvector4a.h"
|
||||
#include "llshadermgr.h"
|
||||
|
|
@ -856,7 +855,6 @@ void LLVertexBuffer::unbind()
|
|||
//static
|
||||
void LLVertexBuffer::cleanupClass()
|
||||
{
|
||||
LLMemType mt2(LLMemType::MTYPE_VERTEX_CLEANUP_CLASS);
|
||||
unbind();
|
||||
|
||||
sStreamIBOPool.cleanup();
|
||||
|
|
@ -937,8 +935,6 @@ LLVertexBuffer::LLVertexBuffer(U32 typemask, S32 usage) :
|
|||
mMappable(false),
|
||||
mFence(NULL)
|
||||
{
|
||||
LLMemType mt2(LLMemType::MTYPE_VERTEX_CONSTRUCTOR);
|
||||
|
||||
mMappable = (mUsage == GL_DYNAMIC_DRAW_ARB && !sDisableVBOMapping);
|
||||
|
||||
//zero out offsets
|
||||
|
|
@ -998,7 +994,6 @@ S32 LLVertexBuffer::getSize() const
|
|||
//virtual
|
||||
LLVertexBuffer::~LLVertexBuffer()
|
||||
{
|
||||
LLMemType mt2(LLMemType::MTYPE_VERTEX_DESTRUCTOR);
|
||||
destroyGLBuffer();
|
||||
destroyGLIndices();
|
||||
|
||||
|
|
@ -1118,8 +1113,6 @@ void LLVertexBuffer::releaseIndices()
|
|||
|
||||
void LLVertexBuffer::createGLBuffer(U32 size)
|
||||
{
|
||||
LLMemType mt2(LLMemType::MTYPE_VERTEX_CREATE_VERTICES);
|
||||
|
||||
if (mGLBuffer)
|
||||
{
|
||||
destroyGLBuffer();
|
||||
|
|
@ -1149,8 +1142,6 @@ void LLVertexBuffer::createGLBuffer(U32 size)
|
|||
|
||||
void LLVertexBuffer::createGLIndices(U32 size)
|
||||
{
|
||||
LLMemType mt2(LLMemType::MTYPE_VERTEX_CREATE_INDICES);
|
||||
|
||||
if (mGLIndices)
|
||||
{
|
||||
destroyGLIndices();
|
||||
|
|
@ -1185,7 +1176,6 @@ void LLVertexBuffer::createGLIndices(U32 size)
|
|||
|
||||
void LLVertexBuffer::destroyGLBuffer()
|
||||
{
|
||||
LLMemType mt2(LLMemType::MTYPE_VERTEX_DESTROY_BUFFER);
|
||||
if (mGLBuffer)
|
||||
{
|
||||
if (mMappedDataUsingVBOs)
|
||||
|
|
@ -1206,7 +1196,6 @@ void LLVertexBuffer::destroyGLBuffer()
|
|||
|
||||
void LLVertexBuffer::destroyGLIndices()
|
||||
{
|
||||
LLMemType mt2(LLMemType::MTYPE_VERTEX_DESTROY_INDICES);
|
||||
if (mGLIndices)
|
||||
{
|
||||
if (mMappedIndexDataUsingVBOs)
|
||||
|
|
@ -1227,8 +1216,6 @@ void LLVertexBuffer::destroyGLIndices()
|
|||
|
||||
void LLVertexBuffer::updateNumVerts(S32 nverts)
|
||||
{
|
||||
LLMemType mt2(LLMemType::MTYPE_VERTEX_UPDATE_VERTS);
|
||||
|
||||
llassert(nverts >= 0);
|
||||
|
||||
if (nverts > 65536)
|
||||
|
|
@ -1251,8 +1238,6 @@ void LLVertexBuffer::updateNumVerts(S32 nverts)
|
|||
|
||||
void LLVertexBuffer::updateNumIndices(S32 nindices)
|
||||
{
|
||||
LLMemType mt2(LLMemType::MTYPE_VERTEX_UPDATE_INDICES);
|
||||
|
||||
llassert(nindices >= 0);
|
||||
|
||||
U32 needed_size = sizeof(U16) * nindices;
|
||||
|
|
@ -1269,8 +1254,6 @@ void LLVertexBuffer::updateNumIndices(S32 nindices)
|
|||
|
||||
void LLVertexBuffer::allocateBuffer(S32 nverts, S32 nindices, bool create)
|
||||
{
|
||||
LLMemType mt2(LLMemType::MTYPE_VERTEX_ALLOCATE_BUFFER);
|
||||
|
||||
stop_glerror();
|
||||
|
||||
if (nverts < 0 || nindices < 0 ||
|
||||
|
|
@ -1421,8 +1404,6 @@ void LLVertexBuffer::resizeBuffer(S32 newnverts, S32 newnindices)
|
|||
llassert(newnverts >= 0);
|
||||
llassert(newnindices >= 0);
|
||||
|
||||
LLMemType mt2(LLMemType::MTYPE_VERTEX_RESIZE_BUFFER);
|
||||
|
||||
updateNumVerts(newnverts);
|
||||
updateNumIndices(newnindices);
|
||||
|
||||
|
|
@ -1470,7 +1451,6 @@ static LLFastTimer::DeclareTimer FTM_VBO_MAP_BUFFER("VBO Map");
|
|||
volatile U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, bool map_range)
|
||||
{
|
||||
bindGLBuffer(true);
|
||||
LLMemType mt2(LLMemType::MTYPE_VERTEX_MAP_BUFFER);
|
||||
if (mFinal)
|
||||
{
|
||||
llerrs << "LLVertexBuffer::mapVeretxBuffer() called on a finalized buffer." << llendl;
|
||||
|
|
@ -1519,7 +1499,6 @@ volatile U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, boo
|
|||
|
||||
if (!mVertexLocked)
|
||||
{
|
||||
LLMemType mt_v(LLMemType::MTYPE_VERTEX_MAP_BUFFER_VERTICES);
|
||||
mVertexLocked = true;
|
||||
sMappedCount++;
|
||||
stop_glerror();
|
||||
|
|
@ -1650,7 +1629,6 @@ static LLFastTimer::DeclareTimer FTM_VBO_MAP_INDEX("IBO Map");
|
|||
|
||||
volatile U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range)
|
||||
{
|
||||
LLMemType mt2(LLMemType::MTYPE_VERTEX_MAP_BUFFER);
|
||||
bindGLIndices(true);
|
||||
if (mFinal)
|
||||
{
|
||||
|
|
@ -1697,8 +1675,6 @@ volatile U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range
|
|||
|
||||
if (!mIndexLocked)
|
||||
{
|
||||
LLMemType mt_v(LLMemType::MTYPE_VERTEX_MAP_BUFFER_INDICES);
|
||||
|
||||
mIndexLocked = true;
|
||||
sMappedCount++;
|
||||
stop_glerror();
|
||||
|
|
@ -1821,7 +1797,6 @@ static LLFastTimer::DeclareTimer FTM_IBO_FLUSH_RANGE("Flush IBO Range");
|
|||
|
||||
void LLVertexBuffer::unmapBuffer()
|
||||
{
|
||||
LLMemType mt2(LLMemType::MTYPE_VERTEX_UNMAP_BUFFER);
|
||||
if (!useVBOs())
|
||||
{
|
||||
return; //nothing to unmap
|
||||
|
|
@ -2175,7 +2150,6 @@ void LLVertexBuffer::setBuffer(U32 data_mask)
|
|||
{
|
||||
flush();
|
||||
|
||||
LLMemType mt2(LLMemType::MTYPE_VERTEX_SET_BUFFER);
|
||||
//set up pointers if the data mask is different ...
|
||||
bool setup = (sLastMask != data_mask);
|
||||
|
||||
|
|
@ -2317,7 +2291,6 @@ void LLVertexBuffer::setBuffer(U32 data_mask)
|
|||
// virtual (default)
|
||||
void LLVertexBuffer::setupVertexBuffer(U32 data_mask)
|
||||
{
|
||||
LLMemType mt2(LLMemType::MTYPE_VERTEX_SETUP_VERTEX_BUFFER);
|
||||
stop_glerror();
|
||||
volatile U8* base = useVBOs() ? (U8*) mAlignedOffset : mMappedData;
|
||||
|
||||
|
|
|
|||
|
|
@ -58,7 +58,6 @@
|
|||
#include <dinput.h>
|
||||
#include <Dbt.h.>
|
||||
|
||||
#include "llmemtype.h"
|
||||
// culled from winuser.h
|
||||
#ifndef WM_MOUSEWHEEL /* Added to be compatible with later SDK's */
|
||||
const S32 WM_MOUSEWHEEL = 0x020A;
|
||||
|
|
@ -1767,8 +1766,6 @@ void LLWindowWin32::gatherInput()
|
|||
MSG msg;
|
||||
int msg_count = 0;
|
||||
|
||||
LLMemType m1(LLMemType::MTYPE_GATHER_INPUT);
|
||||
|
||||
while ((msg_count < MAX_MESSAGE_PER_UPDATE) && PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
|
||||
{
|
||||
mCallbacks->handlePingWatchdog(this, "Main:TranslateGatherInput");
|
||||
|
|
|
|||
|
|
@ -319,7 +319,6 @@ set(viewer_SOURCE_FILES
|
|||
llmarketplacenotifications.cpp
|
||||
llmediactrl.cpp
|
||||
llmediadataclient.cpp
|
||||
llmemoryview.cpp
|
||||
llmeshrepository.cpp
|
||||
llmimetypes.cpp
|
||||
llmorphview.cpp
|
||||
|
|
@ -877,7 +876,6 @@ set(viewer_HEADER_FILES
|
|||
llmarketplacenotifications.h
|
||||
llmediactrl.h
|
||||
llmediadataclient.h
|
||||
llmemoryview.h
|
||||
llmeshrepository.h
|
||||
llmimetypes.h
|
||||
llmorphview.h
|
||||
|
|
|
|||
|
|
@ -1183,7 +1183,6 @@ static LLFastTimer::DeclareTimer FTM_AGENT_UPDATE("Update");
|
|||
|
||||
bool LLAppViewer::mainLoop()
|
||||
{
|
||||
LLMemType mt1(LLMemType::MTYPE_MAIN);
|
||||
mMainloopTimeout = new LLWatchdogTimeout();
|
||||
|
||||
//-------------------------------------------
|
||||
|
|
@ -1283,7 +1282,6 @@ bool LLAppViewer::mainLoop()
|
|||
&& (gHeadlessClient || !gViewerWindow->getShowProgress())
|
||||
&& !gFocusMgr.focusLocked())
|
||||
{
|
||||
LLMemType mjk(LLMemType::MTYPE_JOY_KEY);
|
||||
joystick->scanJoystick();
|
||||
gKeyboard->scanKeyboard();
|
||||
}
|
||||
|
|
@ -1297,7 +1295,6 @@ bool LLAppViewer::mainLoop()
|
|||
|
||||
if (gAres != NULL && gAres->isInitialized())
|
||||
{
|
||||
LLMemType mt_ip(LLMemType::MTYPE_IDLE_PUMP);
|
||||
pingMainloopTimeout("Main:ServicePump");
|
||||
LLFastTimer t4(FTM_PUMP);
|
||||
{
|
||||
|
|
@ -1347,7 +1344,6 @@ bool LLAppViewer::mainLoop()
|
|||
|
||||
// Sleep and run background threads
|
||||
{
|
||||
LLMemType mt_sleep(LLMemType::MTYPE_SLEEP);
|
||||
LLFastTimer t2(FTM_SLEEP);
|
||||
|
||||
// yield some time to the os based on command line option
|
||||
|
|
@ -4110,7 +4106,6 @@ static LLFastTimer::DeclareTimer FTM_VLMANAGER("VL Manager");
|
|||
///////////////////////////////////////////////////////
|
||||
void LLAppViewer::idle()
|
||||
{
|
||||
LLMemType mt_idle(LLMemType::MTYPE_IDLE);
|
||||
pingMainloopTimeout("Main:Idle");
|
||||
|
||||
// Update frame timers
|
||||
|
|
@ -4705,7 +4700,6 @@ static LLFastTimer::DeclareTimer FTM_CHECK_REGION_CIRCUIT("Check Region Circuit"
|
|||
|
||||
void LLAppViewer::idleNetwork()
|
||||
{
|
||||
LLMemType mt_in(LLMemType::MTYPE_IDLE_NETWORK);
|
||||
pingMainloopTimeout("idleNetwork");
|
||||
|
||||
gObjectList.mNumNewObjects = 0;
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@
|
|||
|
||||
#include "llappviewerwin32.h"
|
||||
|
||||
#include "llmemtype.h"
|
||||
|
||||
#include "llwindowwin32.h" // *FIX: for setting gIconResource.
|
||||
#include "llgl.h"
|
||||
|
|
@ -117,8 +116,6 @@ int APIENTRY WINMAIN(HINSTANCE hInstance,
|
|||
#endif // _DEBUG
|
||||
#endif // INCLUDE_VLD
|
||||
|
||||
LLMemType mt1(LLMemType::MTYPE_STARTUP);
|
||||
|
||||
const S32 MAX_HEAPS = 255;
|
||||
DWORD heap_enable_lfh_error[MAX_HEAPS];
|
||||
S32 num_heaps = 0;
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@
|
|||
|
||||
// library includes
|
||||
#include "llfasttimerview.h"
|
||||
#include "llmemoryview.h"
|
||||
#include "llconsole.h"
|
||||
#include "lltextureview.h"
|
||||
#include "llresmgr.h"
|
||||
|
|
@ -38,7 +37,6 @@
|
|||
#include "llviewercontrol.h"
|
||||
#include "llviewerwindow.h"
|
||||
#include "llappviewer.h"
|
||||
#include "llmemoryview.h"
|
||||
#include "llsceneview.h"
|
||||
#include "llviewertexture.h"
|
||||
#include "llfloaterreg.h"
|
||||
|
|
@ -103,13 +101,6 @@ void LLDebugView::init()
|
|||
|
||||
r.setLeftTopAndSize(25, rect.getHeight() - 50, (S32) (gViewerWindow->getWindowRectScaled().getWidth() * 0.75f),
|
||||
(S32) (gViewerWindow->getWindowRectScaled().getHeight() * 0.75f));
|
||||
LLMemoryView::Params mp;
|
||||
mp.name("memory");
|
||||
mp.rect(r);
|
||||
mp.follows.flags(FOLLOWS_TOP | FOLLOWS_LEFT);
|
||||
mp.visible(false);
|
||||
mMemoryView = LLUICtrlFactory::create<LLMemoryView>(mp);
|
||||
addChild(mMemoryView);
|
||||
|
||||
r.set(150, rect.getHeight() - 50, 820, 100);
|
||||
LLTextureView::Params tvp;
|
||||
|
|
|
|||
|
|
@ -256,8 +256,6 @@ S32 LLDrawable::findReferences(LLDrawable *drawablep)
|
|||
|
||||
LLFace* LLDrawable::addFace(LLFacePool *poolp, LLViewerTexture *texturep)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_DRAWABLE);
|
||||
|
||||
LLFace *face = new LLFace(this, mVObjp);
|
||||
if (!face) llerrs << "Allocating new Face: " << mFaces.size() << llendl;
|
||||
|
||||
|
|
@ -280,8 +278,6 @@ LLFace* LLDrawable::addFace(LLFacePool *poolp, LLViewerTexture *texturep)
|
|||
|
||||
LLFace* LLDrawable::addFace(const LLTextureEntry *te, LLViewerTexture *texturep)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_DRAWABLE);
|
||||
|
||||
LLFace *face;
|
||||
face = new LLFace(this, mVObjp);
|
||||
|
||||
|
|
@ -763,8 +759,6 @@ void LLDrawable::updateDistance(LLCamera& camera, bool force_update)
|
|||
|
||||
void LLDrawable::updateTexture()
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_DRAWABLE);
|
||||
|
||||
if (isDead())
|
||||
{
|
||||
llwarns << "Dead drawable updating texture!" << llendl;
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@
|
|||
#include "llvector4a.h"
|
||||
#include "llquaternion.h"
|
||||
#include "xform.h"
|
||||
#include "llmemtype.h"
|
||||
#include "lldarray.h"
|
||||
#include "llviewerobject.h"
|
||||
#include "llrect.h"
|
||||
|
|
@ -76,7 +75,6 @@ public:
|
|||
static void initClass();
|
||||
|
||||
LLDrawable() { init(); }
|
||||
MEM_TYPE_NEW(LLMemType::MTYPE_DRAWABLE);
|
||||
|
||||
void markDead(); // Mark this drawable as dead
|
||||
BOOL isDead() const { return isState(DEAD); }
|
||||
|
|
|
|||
|
|
@ -263,8 +263,6 @@ void LLFace::setPool(LLFacePool* pool)
|
|||
|
||||
void LLFace::setPool(LLFacePool* new_pool, LLViewerTexture *texturep)
|
||||
{
|
||||
LLMemType mt1(LLMemType::MTYPE_DRAWABLE);
|
||||
|
||||
if (!new_pool)
|
||||
{
|
||||
llerrs << "Setting pool to null!" << llendl;
|
||||
|
|
@ -429,8 +427,6 @@ U16 LLFace::getGeometryAvatar(
|
|||
LLStrider<F32> &vertex_weights,
|
||||
LLStrider<LLVector4> &clothing_weights)
|
||||
{
|
||||
LLMemType mt1(LLMemType::MTYPE_DRAWABLE);
|
||||
|
||||
if (mVertexBuffer.notNull())
|
||||
{
|
||||
mVertexBuffer->getVertexStrider (vertices, mGeomIndex, mGeomCount);
|
||||
|
|
@ -446,8 +442,6 @@ U16 LLFace::getGeometryAvatar(
|
|||
U16 LLFace::getGeometry(LLStrider<LLVector3> &vertices, LLStrider<LLVector3> &normals,
|
||||
LLStrider<LLVector2> &tex_coords, LLStrider<U16> &indicesp)
|
||||
{
|
||||
LLMemType mt1(LLMemType::MTYPE_DRAWABLE);
|
||||
|
||||
if (mVertexBuffer.notNull())
|
||||
{
|
||||
mVertexBuffer->getVertexStrider(vertices, mGeomIndex, mGeomCount);
|
||||
|
|
@ -757,8 +751,6 @@ bool less_than_max_mag(const LLVector4a& vec)
|
|||
BOOL LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f,
|
||||
const LLMatrix4& mat_vert_in, const LLMatrix3& mat_normal_in, BOOL global_volume)
|
||||
{
|
||||
LLMemType mt1(LLMemType::MTYPE_DRAWABLE);
|
||||
|
||||
//get bounding box
|
||||
if (mDrawablep->isState(LLDrawable::REBUILD_VOLUME | LLDrawable::REBUILD_POSITION | LLDrawable::REBUILD_RIGGED))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -336,8 +336,6 @@ void LLFloaterBulkPermission::handleInventory(LLViewerObject* viewer_obj, LLInve
|
|||
|
||||
void LLFloaterBulkPermission::updateInventory(LLViewerObject* object, LLViewerInventoryItem* item, U8 key, bool is_new)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_OBJECT);
|
||||
|
||||
// This slices the object into what we're concerned about on the viewer.
|
||||
// The simulator will take the permissions and transfer ownership.
|
||||
LLPointer<LLViewerInventoryItem> task_item =
|
||||
|
|
|
|||
|
|
@ -959,7 +959,6 @@ void LLSaveFolderState::setApply(BOOL apply)
|
|||
|
||||
void LLSaveFolderState::doFolder(LLFolderViewFolder* folder)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_INVENTORY_DO_FOLDER);
|
||||
LLInvFVBridge* bridge = (LLInvFVBridge*)folder->getListener();
|
||||
if(!bridge) return;
|
||||
|
||||
|
|
|
|||
|
|
@ -191,8 +191,6 @@ void LLInventoryPanel::buildFolderView(const LLInventoryPanel::Params& params)
|
|||
|
||||
void LLInventoryPanel::initFromParams(const LLInventoryPanel::Params& params)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_INVENTORY_POST_BUILD);
|
||||
|
||||
mCommitCallbackRegistrar.pushScope(); // registered as a widget; need to push callback scope ourselves
|
||||
|
||||
buildFolderView(params);
|
||||
|
|
|
|||
|
|
@ -1,333 +0,0 @@
|
|||
/**
|
||||
* @file llmemoryview.cpp
|
||||
* @brief LLMemoryView class implementation
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
|
||||
#include "llmemoryview.h"
|
||||
|
||||
#include "llappviewer.h"
|
||||
#include "llallocator_heap_profile.h"
|
||||
#include "llgl.h" // LLGLSUIDefault
|
||||
#include "llviewerwindow.h"
|
||||
#include "llviewercontrol.h"
|
||||
|
||||
#include <sstream>
|
||||
#include <boost/algorithm/string/split.hpp>
|
||||
|
||||
#include "llmemory.h"
|
||||
|
||||
LLMemoryView::LLMemoryView(const LLMemoryView::Params& p)
|
||||
: LLView(p),
|
||||
mPaused(FALSE),
|
||||
//mDelay(120),
|
||||
mAlloc(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
LLMemoryView::~LLMemoryView()
|
||||
{
|
||||
}
|
||||
|
||||
BOOL LLMemoryView::handleMouseDown(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
if (mask & MASK_SHIFT)
|
||||
{
|
||||
}
|
||||
else if (mask & MASK_CONTROL)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
mPaused = !mPaused;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL LLMemoryView::handleMouseUp(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
BOOL LLMemoryView::handleHover(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void LLMemoryView::refreshProfile()
|
||||
{
|
||||
/*
|
||||
LLAllocator & alloc = LLAppViewer::instance()->getAllocator();
|
||||
if(alloc.isProfiling()) {
|
||||
std::string profile_text = alloc.getRawProfile();
|
||||
|
||||
boost::algorithm::split(mLines, profile_text, boost::bind(std::equal_to<llwchar>(), '\n', _1));
|
||||
} else {
|
||||
mLines.clear();
|
||||
}
|
||||
*/
|
||||
if (mAlloc == NULL) {
|
||||
mAlloc = &LLAppViewer::instance()->getAllocator();
|
||||
}
|
||||
|
||||
mLines.clear();
|
||||
|
||||
if(mAlloc->isProfiling())
|
||||
{
|
||||
const LLAllocatorHeapProfile &prof = mAlloc->getProfile();
|
||||
for(size_t i = 0; i < prof.mLines.size(); ++i)
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << "Unfreed Mem: " << (prof.mLines[i].mLiveSize >> 20) << " M Trace: ";
|
||||
for(size_t k = 0; k < prof.mLines[i].mTrace.size(); ++k)
|
||||
{
|
||||
ss << LLMemType::getNameFromID(prof.mLines[i].mTrace[k]) << " ";
|
||||
}
|
||||
mLines.push_back(utf8string_to_wstring(ss.str()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LLMemoryView::draw()
|
||||
{
|
||||
const S32 UPDATE_INTERVAL = 60;
|
||||
const S32 MARGIN_AMT = 10;
|
||||
static S32 curUpdate = UPDATE_INTERVAL;
|
||||
static LLUIColor s_console_color = LLUIColorTable::instance().getColor("ConsoleBackground", LLColor4U::black);
|
||||
|
||||
// setup update interval
|
||||
if (curUpdate >= UPDATE_INTERVAL)
|
||||
{
|
||||
refreshProfile();
|
||||
curUpdate = 0;
|
||||
}
|
||||
curUpdate++;
|
||||
|
||||
// setup window properly
|
||||
S32 height = (S32) (gViewerWindow->getWindowRectScaled().getHeight()*0.75f);
|
||||
S32 width = (S32) (gViewerWindow->getWindowRectScaled().getWidth() * 0.9f);
|
||||
setRect(LLRect().setLeftTopAndSize(getRect().mLeft, getRect().mTop, width, height));
|
||||
|
||||
// setup window color
|
||||
F32 console_opacity = llclamp(gSavedSettings.getF32("ConsoleBackgroundOpacity"), 0.f, 1.f);
|
||||
LLColor4 color = s_console_color;
|
||||
color.mV[VALPHA] *= console_opacity;
|
||||
|
||||
LLGLSUIDefault gls_ui;
|
||||
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
|
||||
gl_rect_2d(0, height, width, 0, color);
|
||||
|
||||
LLFontGL * font = LLFontGL::getFontSansSerifSmall();
|
||||
|
||||
// draw remaining lines
|
||||
F32 y_pos = 0.f;
|
||||
F32 y_off = 0.f;
|
||||
|
||||
F32 line_height = font->getLineHeight();
|
||||
S32 target_width = width - 2 * MARGIN_AMT;
|
||||
|
||||
// cut off lines on bottom
|
||||
U32 max_lines = U32((height - 2 * line_height) / line_height);
|
||||
y_pos = height - MARGIN_AMT - line_height;
|
||||
y_off = 0.f;
|
||||
|
||||
#if !MEM_TRACK_MEM
|
||||
std::vector<LLWString>::const_iterator end = mLines.end();
|
||||
if(mLines.size() > max_lines) {
|
||||
end = mLines.begin() + max_lines;
|
||||
}
|
||||
for (std::vector<LLWString>::const_iterator i = mLines.begin(); i != end; ++i)
|
||||
{
|
||||
font->render(*i, 0, MARGIN_AMT, y_pos - y_off,
|
||||
LLColor4::white,
|
||||
LLFontGL::LEFT,
|
||||
LLFontGL::BASELINE,
|
||||
LLFontGL::NORMAL,
|
||||
LLFontGL::DROP_SHADOW,
|
||||
S32_MAX,
|
||||
target_width
|
||||
);
|
||||
y_off += line_height;
|
||||
}
|
||||
|
||||
#else
|
||||
LLMemTracker::getInstance()->preDraw(mPaused) ;
|
||||
|
||||
{
|
||||
F32 x_pos = MARGIN_AMT ;
|
||||
U32 lines = 0 ;
|
||||
const char* str = LLMemTracker::getInstance()->getNextLine() ;
|
||||
while(str != NULL)
|
||||
{
|
||||
lines++ ;
|
||||
font->renderUTF8(str, 0, x_pos, y_pos - y_off,
|
||||
LLColor4::white,
|
||||
LLFontGL::LEFT,
|
||||
LLFontGL::BASELINE,
|
||||
LLFontGL::NORMAL,
|
||||
LLFontGL::DROP_SHADOW,
|
||||
S32_MAX,
|
||||
target_width,
|
||||
NULL, FALSE);
|
||||
|
||||
str = LLMemTracker::getInstance()->getNextLine() ;
|
||||
y_off += line_height;
|
||||
|
||||
if(lines >= max_lines)
|
||||
{
|
||||
lines = 0 ;
|
||||
x_pos += 512.f ;
|
||||
if(x_pos + 512.f > target_width)
|
||||
{
|
||||
break ;
|
||||
}
|
||||
|
||||
y_pos = height - MARGIN_AMT - line_height;
|
||||
y_off = 0.f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LLMemTracker::getInstance()->postDraw() ;
|
||||
#endif
|
||||
|
||||
#if MEM_TRACK_TYPE
|
||||
|
||||
S32 left, top, right, bottom;
|
||||
S32 x, y;
|
||||
|
||||
S32 margin = 10;
|
||||
S32 texth = LLFontGL::getFontMonospace()->getLineHeight();
|
||||
|
||||
S32 xleft = margin;
|
||||
S32 ytop = height - margin;
|
||||
S32 labelwidth = 0;
|
||||
S32 maxmaxbytes = 1;
|
||||
|
||||
// Make sure all timers are accounted for
|
||||
// Set 'MT_OTHER' to unaccounted ticks last frame
|
||||
{
|
||||
S32 display_memtypes[LLMemType::MTYPE_NUM_TYPES];
|
||||
for (S32 i=0; i < LLMemType::MTYPE_NUM_TYPES; i++)
|
||||
{
|
||||
display_memtypes[i] = 0;
|
||||
}
|
||||
for (S32 i=0; i < MTV_DISPLAY_NUM; i++)
|
||||
{
|
||||
S32 tidx = mtv_display_table[i].memtype;
|
||||
display_memtypes[tidx]++;
|
||||
}
|
||||
LLMemType::sMemCount[LLMemType::MTYPE_OTHER] = 0;
|
||||
LLMemType::sMaxMemCount[LLMemType::MTYPE_OTHER] = 0;
|
||||
for (S32 tidx = 0; tidx < LLMemType::MTYPE_NUM_TYPES; tidx++)
|
||||
{
|
||||
if (display_memtypes[tidx] == 0)
|
||||
{
|
||||
LLMemType::sMemCount[LLMemType::MTYPE_OTHER] += LLMemType::sMemCount[tidx];
|
||||
LLMemType::sMaxMemCount[LLMemType::MTYPE_OTHER] += LLMemType::sMaxMemCount[tidx];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Labels
|
||||
{
|
||||
y = ytop;
|
||||
S32 peak = 0;
|
||||
for (S32 i=0; i<MTV_DISPLAY_NUM; i++)
|
||||
{
|
||||
x = xleft;
|
||||
|
||||
int tidx = mtv_display_table[i].memtype;
|
||||
S32 bytes = LLMemType::sMemCount[tidx];
|
||||
S32 maxbytes = LLMemType::sMaxMemCount[tidx];
|
||||
maxmaxbytes = llmax(maxbytes, maxmaxbytes);
|
||||
peak += maxbytes;
|
||||
S32 mbytes = bytes >> 20;
|
||||
|
||||
tdesc = llformat("%s [%4d MB] in %06d NEWS",mtv_display_table[i].desc,mbytes, LLMemType::sNewCount[tidx]);
|
||||
LLFontGL::getFontMonospace()->renderUTF8(tdesc, 0, x, y, LLColor4::white, LLFontGL::LEFT, LLFontGL::TOP);
|
||||
|
||||
y -= (texth + 2);
|
||||
|
||||
S32 textw = LLFontGL::getFontMonospace()->getWidth(tdesc);
|
||||
if (textw > labelwidth)
|
||||
labelwidth = textw;
|
||||
}
|
||||
|
||||
S32 num_avatars = 0;
|
||||
S32 num_motions = 0;
|
||||
S32 num_loading_motions = 0;
|
||||
S32 num_loaded_motions = 0;
|
||||
S32 num_active_motions = 0;
|
||||
S32 num_deprecated_motions = 0;
|
||||
for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin();
|
||||
iter != LLCharacter::sInstances.end(); ++iter)
|
||||
{
|
||||
num_avatars++;
|
||||
(*iter)->getMotionController().incMotionCounts(num_motions, num_loading_motions, num_loaded_motions, num_active_motions, num_deprecated_motions);
|
||||
}
|
||||
|
||||
x = xleft;
|
||||
tdesc = llformat("Total Bytes: %d MB Overhead: %d KB Avs %d Motions:%d Loading:%d Loaded:%d Active:%d Dep:%d",
|
||||
LLMemType::sTotalMem >> 20, LLMemType::sOverheadMem >> 10,
|
||||
num_avatars, num_motions, num_loading_motions, num_loaded_motions, num_active_motions, num_deprecated_motions);
|
||||
LLFontGL::getFontMonospace()->renderUTF8(tdesc, 0, x, y, LLColor4::white, LLFontGL::LEFT, LLFontGL::TOP);
|
||||
}
|
||||
|
||||
// Bars
|
||||
y = ytop;
|
||||
labelwidth += 8;
|
||||
S32 barw = width - labelwidth - xleft - margin;
|
||||
for (S32 i=0; i<MTV_DISPLAY_NUM; i++)
|
||||
{
|
||||
x = xleft + labelwidth;
|
||||
|
||||
int tidx = mtv_display_table[i].memtype;
|
||||
S32 bytes = LLMemType::sMemCount[tidx];
|
||||
F32 frac = (F32)bytes / (F32)maxmaxbytes;
|
||||
S32 w = (S32)(frac * (F32)barw);
|
||||
left = x; right = x + w;
|
||||
top = y; bottom = y - texth;
|
||||
gl_rect_2d(left, top, right, bottom, *mtv_display_table[i].color);
|
||||
|
||||
S32 maxbytes = LLMemType::sMaxMemCount[tidx];
|
||||
F32 frac2 = (F32)maxbytes / (F32)maxmaxbytes;
|
||||
S32 w2 = (S32)(frac2 * (F32)barw);
|
||||
left = x + w + 1; right = x + w2;
|
||||
top = y; bottom = y - texth;
|
||||
LLColor4 tcolor = *mtv_display_table[i].color;
|
||||
tcolor.setAlpha(.5f);
|
||||
gl_rect_2d(left, top, right, bottom, tcolor);
|
||||
|
||||
y -= (texth + 2);
|
||||
}
|
||||
|
||||
dumpData();
|
||||
|
||||
#endif
|
||||
|
||||
LLView::draw();
|
||||
}
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
/**
|
||||
* @file llmemoryview.h
|
||||
* @brief LLMemoryView class definition
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#ifndef LL_LLMEMORYVIEW_H
|
||||
#define LL_LLMEMORYVIEW_H
|
||||
|
||||
#include "llview.h"
|
||||
|
||||
class LLAllocator;
|
||||
|
||||
class LLMemoryView : public LLView
|
||||
{
|
||||
public:
|
||||
struct Params : public LLInitParam::Block<Params, LLView::Params>
|
||||
{
|
||||
Params()
|
||||
{
|
||||
changeDefault(mouse_opaque, true);
|
||||
changeDefault(visible, false);
|
||||
}
|
||||
};
|
||||
LLMemoryView(const LLMemoryView::Params&);
|
||||
virtual ~LLMemoryView();
|
||||
|
||||
virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
|
||||
virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
|
||||
virtual BOOL handleHover(S32 x, S32 y, MASK mask);
|
||||
virtual void draw();
|
||||
|
||||
void refreshProfile();
|
||||
|
||||
private:
|
||||
std::vector<LLWString> mLines;
|
||||
LLAllocator* mAlloc;
|
||||
BOOL mPaused ;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -105,7 +105,6 @@ LLPanelMainInventory::LLPanelMainInventory(const LLPanel::Params& p)
|
|||
mMenuAdd(NULL),
|
||||
mNeedUploadCost(true)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_INVENTORY_VIEW_INIT);
|
||||
// Menu Callbacks (non contex menus)
|
||||
mCommitCallbackRegistrar.add("Inventory.DoToSelected", boost::bind(&LLPanelMainInventory::doToSelected, this, _2));
|
||||
mCommitCallbackRegistrar.add("Inventory.CloseAllFolders", boost::bind(&LLPanelMainInventory::closeAllFolders, this));
|
||||
|
|
@ -604,7 +603,6 @@ void LLPanelMainInventory::setFilterTextFromFilter()
|
|||
|
||||
void LLPanelMainInventory::toggleFindOptions()
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_INVENTORY_VIEW_TOGGLE);
|
||||
LLFloater *floater = getFinder();
|
||||
if (!floater)
|
||||
{
|
||||
|
|
@ -726,7 +724,6 @@ void LLFloaterInventoryFinder::updateElementsFromFilter()
|
|||
|
||||
void LLFloaterInventoryFinder::draw()
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_INVENTORY_DRAW);
|
||||
U64 filter = 0xffffffffffffffffULL;
|
||||
BOOL filtered_by_all_types = TRUE;
|
||||
|
||||
|
|
|
|||
|
|
@ -749,8 +749,6 @@ const LLVector2 &LLPolyMeshSharedData::getUVs(U32 index)
|
|||
//-----------------------------------------------------------------------------
|
||||
LLPolyMesh::LLPolyMesh(LLPolyMeshSharedData *shared_data, LLPolyMesh *reference_mesh)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_AVATAR_MESH);
|
||||
|
||||
llassert(shared_data);
|
||||
|
||||
mSharedData = shared_data;
|
||||
|
|
|
|||
|
|
@ -376,7 +376,6 @@ LLSpatialGroup::~LLSpatialGroup()
|
|||
}
|
||||
}
|
||||
|
||||
LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
|
||||
clearDrawMap();
|
||||
clearAtlasList() ;
|
||||
}
|
||||
|
|
@ -614,8 +613,6 @@ void LLSpatialGroup::validateDrawMap()
|
|||
|
||||
BOOL LLSpatialGroup::updateInGroup(LLDrawable *drawablep, BOOL immediate)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
|
||||
|
||||
drawablep->updateSpatialExtents();
|
||||
|
||||
OctreeNode* parent = mOctreeNode->getOctParent();
|
||||
|
|
@ -637,7 +634,6 @@ BOOL LLSpatialGroup::updateInGroup(LLDrawable *drawablep, BOOL immediate)
|
|||
|
||||
BOOL LLSpatialGroup::addObject(LLDrawable *drawablep, BOOL add_all, BOOL from_octree)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
|
||||
if (!from_octree)
|
||||
{
|
||||
mOctreeNode->insert(drawablep);
|
||||
|
|
@ -663,7 +659,6 @@ BOOL LLSpatialGroup::addObject(LLDrawable *drawablep, BOOL add_all, BOOL from_oc
|
|||
|
||||
void LLSpatialGroup::rebuildGeom()
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
|
||||
if (!isDead())
|
||||
{
|
||||
mSpatialPartition->rebuildGeom(this);
|
||||
|
|
@ -875,7 +870,6 @@ LLSpatialGroup* LLSpatialGroup::getParent()
|
|||
|
||||
BOOL LLSpatialGroup::removeObject(LLDrawable *drawablep, BOOL from_octree)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
|
||||
unbound();
|
||||
if (mOctreeNode && !from_octree)
|
||||
{
|
||||
|
|
@ -912,7 +906,6 @@ BOOL LLSpatialGroup::removeObject(LLDrawable *drawablep, BOOL from_octree)
|
|||
|
||||
void LLSpatialGroup::shift(const LLVector4a &offset)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
|
||||
LLVector4a t = mOctreeNode->getCenter();
|
||||
t.add(offset);
|
||||
mOctreeNode->setCenter(t);
|
||||
|
|
@ -967,8 +960,6 @@ void LLSpatialGroup::setState(U32 state)
|
|||
|
||||
void LLSpatialGroup::setState(U32 state, S32 mode)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
|
||||
|
||||
llassert(state <= LLSpatialGroup::STATE_MASK);
|
||||
|
||||
if (mode > STATE_MODE_SINGLE)
|
||||
|
|
@ -1025,8 +1016,6 @@ void LLSpatialGroup::clearState(U32 state, S32 mode)
|
|||
{
|
||||
llassert(state <= LLSpatialGroup::STATE_MASK);
|
||||
|
||||
LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
|
||||
|
||||
if (mode > STATE_MODE_SINGLE)
|
||||
{
|
||||
if (mode == STATE_MODE_DIFF)
|
||||
|
|
@ -1083,8 +1072,6 @@ public:
|
|||
|
||||
void LLSpatialGroup::setOcclusionState(U32 state, S32 mode)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
|
||||
|
||||
if (mode > STATE_MODE_SINGLE)
|
||||
{
|
||||
if (mode == STATE_MODE_DIFF)
|
||||
|
|
@ -1149,8 +1136,6 @@ public:
|
|||
|
||||
void LLSpatialGroup::clearOcclusionState(U32 state, S32 mode)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
|
||||
|
||||
if (mode > STATE_MODE_SINGLE)
|
||||
{
|
||||
if (mode == STATE_MODE_DIFF)
|
||||
|
|
@ -1200,7 +1185,6 @@ LLSpatialGroup::LLSpatialGroup(OctreeNode* node, LLSpatialPartition* part) :
|
|||
mCurUpdatingTexture (NULL)
|
||||
{
|
||||
sNodeCount++;
|
||||
LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
|
||||
|
||||
mViewAngle.splat(0.f);
|
||||
mLastUpdateViewAngle.splat(-1.f);
|
||||
|
|
@ -1386,7 +1370,6 @@ BOOL LLSpatialGroup::changeLOD()
|
|||
|
||||
void LLSpatialGroup::handleInsertion(const TreeNode* node, LLDrawable* drawablep)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
|
||||
addObject(drawablep, FALSE, TRUE);
|
||||
unbound();
|
||||
setState(OBJECT_DIRTY);
|
||||
|
|
@ -1394,14 +1377,12 @@ void LLSpatialGroup::handleInsertion(const TreeNode* node, LLDrawable* drawablep
|
|||
|
||||
void LLSpatialGroup::handleRemoval(const TreeNode* node, LLDrawable* drawable)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
|
||||
removeObject(drawable, TRUE);
|
||||
setState(OBJECT_DIRTY);
|
||||
}
|
||||
|
||||
void LLSpatialGroup::handleDestruction(const TreeNode* node)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
|
||||
setState(DEAD);
|
||||
|
||||
for (element_iter i = getDataBegin(); i != getDataEnd(); ++i)
|
||||
|
|
@ -1443,7 +1424,6 @@ void LLSpatialGroup::handleStateChange(const TreeNode* node)
|
|||
|
||||
void LLSpatialGroup::handleChildAddition(const OctreeNode* parent, OctreeNode* child)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
|
||||
if (child->getListenerCount() == 0)
|
||||
{
|
||||
new LLSpatialGroup(child, mSpatialPartition);
|
||||
|
|
@ -1789,7 +1769,6 @@ void LLSpatialGroup::doOcclusion(LLCamera* camera)
|
|||
LLSpatialPartition::LLSpatialPartition(U32 data_mask, BOOL render_by_group, U32 buffer_usage)
|
||||
: mRenderByGroup(render_by_group), mBridge(NULL)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
|
||||
mOcclusionEnabled = TRUE;
|
||||
mDrawableType = 0;
|
||||
mPartitionType = LLViewerRegion::PARTITION_NONE;
|
||||
|
|
@ -1813,8 +1792,6 @@ LLSpatialPartition::LLSpatialPartition(U32 data_mask, BOOL render_by_group, U32
|
|||
|
||||
LLSpatialPartition::~LLSpatialPartition()
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
|
||||
|
||||
delete mOctree;
|
||||
mOctree = NULL;
|
||||
}
|
||||
|
|
@ -1822,8 +1799,6 @@ LLSpatialPartition::~LLSpatialPartition()
|
|||
|
||||
LLSpatialGroup *LLSpatialPartition::put(LLDrawable *drawablep, BOOL was_visible)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
|
||||
|
||||
drawablep->updateSpatialExtents();
|
||||
|
||||
//keep drawable from being garbage collected
|
||||
|
|
@ -1845,8 +1820,6 @@ LLSpatialGroup *LLSpatialPartition::put(LLDrawable *drawablep, BOOL was_visible)
|
|||
|
||||
BOOL LLSpatialPartition::remove(LLDrawable *drawablep, LLSpatialGroup *curp)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
|
||||
|
||||
if (!curp->removeObject(drawablep))
|
||||
{
|
||||
OCT_ERRS << "Failed to remove drawable from octree!" << llendl;
|
||||
|
|
@ -1863,8 +1836,6 @@ BOOL LLSpatialPartition::remove(LLDrawable *drawablep, LLSpatialGroup *curp)
|
|||
|
||||
void LLSpatialPartition::move(LLDrawable *drawablep, LLSpatialGroup *curp, BOOL immediate)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
|
||||
|
||||
// sanity check submitted by open source user bushing Spatula
|
||||
// who was seeing crashing here. (See VWR-424 reported by Bunny Mayne)
|
||||
if (!drawablep)
|
||||
|
|
@ -1921,7 +1892,6 @@ public:
|
|||
|
||||
void LLSpatialPartition::shift(const LLVector4a &offset)
|
||||
{ //shift octree node bounding boxes by offset
|
||||
LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
|
||||
LLSpatialShift shifter(offset);
|
||||
shifter.traverse(mOctree);
|
||||
}
|
||||
|
|
@ -2335,7 +2305,6 @@ public:
|
|||
|
||||
void LLSpatialPartition::restoreGL()
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
|
||||
}
|
||||
|
||||
void LLSpatialPartition::resetVertexBuffers()
|
||||
|
|
@ -2378,7 +2347,6 @@ BOOL LLSpatialPartition::visibleObjectsInFrustum(LLCamera& camera)
|
|||
|
||||
S32 LLSpatialPartition::cull(LLCamera &camera, std::vector<LLDrawable *>* results, BOOL for_select)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
|
||||
#if LL_OCTREE_PARANOIA_CHECK
|
||||
((LLSpatialGroup*)mOctree->getListener(0))->checkStates();
|
||||
#endif
|
||||
|
|
@ -4436,8 +4404,6 @@ void LLSpatialPartition::renderDebug()
|
|||
sCurMaxTexPriority = 0.f;
|
||||
}
|
||||
|
||||
LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
|
||||
|
||||
LLGLDisable cullface(GL_CULL_FACE);
|
||||
LLGLEnable blend(GL_BLEND);
|
||||
gGL.setSceneBlendType(LLRender::BT_ALPHA);
|
||||
|
|
|
|||
|
|
@ -311,8 +311,6 @@ void update_texture_fetch()
|
|||
// true when all initialization done.
|
||||
bool idle_startup()
|
||||
{
|
||||
LLMemType mt1(LLMemType::MTYPE_STARTUP);
|
||||
|
||||
const F32 PRECACHING_DELAY = gSavedSettings.getF32("PrecachingDelay");
|
||||
static LLTimer timeout;
|
||||
static S32 timeout_count = 0;
|
||||
|
|
|
|||
|
|
@ -634,7 +634,6 @@ void LLSurface::updatePatchVisibilities(LLAgent &agent)
|
|||
|
||||
BOOL LLSurface::idleUpdate(F32 max_update_time)
|
||||
{
|
||||
LLMemType mt_ius(LLMemType::MTYPE_IDLE_UPDATE_SURFACE);
|
||||
if (!gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_TERRAIN))
|
||||
{
|
||||
return FALSE;
|
||||
|
|
|
|||
|
|
@ -168,7 +168,6 @@ static LLFastTimer::DeclareTimer FTM_UPDATE_CAMERA("Update Camera");
|
|||
void display_update_camera()
|
||||
{
|
||||
LLFastTimer t(FTM_UPDATE_CAMERA);
|
||||
LLMemType mt_uc(LLMemType::MTYPE_DISPLAY_UPDATE_CAMERA);
|
||||
// TODO: cut draw distance down if customizing avatar?
|
||||
// TODO: cut draw distance on per-parcel basis?
|
||||
|
||||
|
|
@ -230,7 +229,6 @@ static LLFastTimer::DeclareTimer FTM_TELEPORT_DISPLAY("Teleport Display");
|
|||
// Paint the display!
|
||||
void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
|
||||
{
|
||||
LLMemType mt_render(LLMemType::MTYPE_RENDER);
|
||||
LLFastTimer t(FTM_RENDER);
|
||||
|
||||
if (gWindowResized)
|
||||
|
|
@ -571,7 +569,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
|
|||
|
||||
if (!gDisconnected)
|
||||
{
|
||||
LLMemType mt_du(LLMemType::MTYPE_DISPLAY_UPDATE);
|
||||
LLAppViewer::instance()->pingMainloopTimeout("Display:Update");
|
||||
if (gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_HUD))
|
||||
{ //don't draw hud objects in this frame
|
||||
|
|
@ -593,7 +590,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
|
|||
// *TODO: merge these two methods
|
||||
{
|
||||
LLFastTimer t(FTM_HUD_UPDATE);
|
||||
LLMemType mt_uh(LLMemType::MTYPE_DISPLAY_UPDATE_HUD);
|
||||
LLHUDManager::getInstance()->updateEffects();
|
||||
LLHUDObject::updateAll();
|
||||
stop_glerror();
|
||||
|
|
@ -601,7 +597,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
|
|||
|
||||
{
|
||||
LLFastTimer t(FTM_DISPLAY_UPDATE_GEOM);
|
||||
LLMemType mt_ug(LLMemType::MTYPE_DISPLAY_UPDATE_GEOM);
|
||||
const F32 max_geom_update_time = 0.005f*10.f*gFrameIntervalSeconds; // 50 ms/second update time
|
||||
gPipeline.createObjects(max_geom_update_time);
|
||||
gPipeline.processPartitionQ();
|
||||
|
|
@ -662,8 +657,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
|
|||
LLAppViewer::instance()->pingMainloopTimeout("Display:Swap");
|
||||
|
||||
{
|
||||
LLMemType mt_ds(LLMemType::MTYPE_DISPLAY_SWAP);
|
||||
|
||||
if (gResizeScreenTexture)
|
||||
{
|
||||
gResizeScreenTexture = FALSE;
|
||||
|
|
@ -722,7 +715,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
|
|||
|
||||
//if (!for_snapshot)
|
||||
{
|
||||
LLMemType mt_gw(LLMemType::MTYPE_DISPLAY_GEN_REFLECTION);
|
||||
LLAppViewer::instance()->pingMainloopTimeout("Display:Imagery");
|
||||
gPipeline.generateWaterReflection(*LLViewerCamera::getInstance());
|
||||
gPipeline.generateHighlight(*LLViewerCamera::getInstance());
|
||||
|
|
@ -742,7 +734,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
|
|||
LLAppViewer::instance()->pingMainloopTimeout("Display:UpdateImages");
|
||||
|
||||
{
|
||||
LLMemType mt_iu(LLMemType::MTYPE_DISPLAY_IMAGE_UPDATE);
|
||||
LLFastTimer t(FTM_IMAGE_UPDATE);
|
||||
|
||||
{
|
||||
|
|
@ -786,7 +777,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
|
|||
LLAppViewer::instance()->pingMainloopTimeout("Display:StateSort");
|
||||
{
|
||||
LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_WORLD;
|
||||
LLMemType mt_ss(LLMemType::MTYPE_DISPLAY_STATE_SORT);
|
||||
gPipeline.stateSort(*LLViewerCamera::getInstance(), result);
|
||||
stop_glerror();
|
||||
|
||||
|
|
@ -808,7 +798,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
|
|||
LLPipeline::sUseOcclusion = occlusion;
|
||||
|
||||
{
|
||||
LLMemType mt_ds(LLMemType::MTYPE_DISPLAY_SKY);
|
||||
LLAppViewer::instance()->pingMainloopTimeout("Display:Sky");
|
||||
LLFastTimer t(FTM_UPDATE_SKY);
|
||||
gSky.updateSky();
|
||||
|
|
@ -897,7 +886,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
|
|||
&& !gRestoreGL)
|
||||
{
|
||||
LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_WORLD;
|
||||
LLMemType mt_rg(LLMemType::MTYPE_DISPLAY_RENDER_GEOM);
|
||||
|
||||
if (gSavedSettings.getBOOL("RenderDepthPrePass") && LLGLSLShader::sNoFixedFunction)
|
||||
{
|
||||
|
|
@ -958,7 +946,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
|
|||
|
||||
if (to_texture)
|
||||
{
|
||||
LLMemType mt_rf(LLMemType::MTYPE_DISPLAY_RENDER_FLUSH);
|
||||
if (LLPipeline::sRenderDeferred && !LLPipeline::sUnderWaterRender)
|
||||
{
|
||||
gPipeline.mDeferredScreen.flush();
|
||||
|
|
@ -1025,7 +1012,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
|
|||
|
||||
void render_hud_attachments()
|
||||
{
|
||||
LLMemType mt_ra(LLMemType::MTYPE_DISPLAY_RENDER_ATTACHMENTS);
|
||||
gGL.matrixMode(LLRender::MM_PROJECTION);
|
||||
gGL.pushMatrix();
|
||||
gGL.matrixMode(LLRender::MM_MODELVIEW);
|
||||
|
|
@ -1215,7 +1201,6 @@ static LLFastTimer::DeclareTimer FTM_SWAP("Swap");
|
|||
|
||||
void render_ui(F32 zoom_factor, int subfield)
|
||||
{
|
||||
LLMemType mt_ru(LLMemType::MTYPE_DISPLAY_RENDER_UI);
|
||||
LLGLState::checkStates();
|
||||
|
||||
glh::matrix4f saved_view = glh_get_current_modelview();
|
||||
|
|
|
|||
|
|
@ -4228,7 +4228,6 @@ extern U32 gObjectBits;
|
|||
|
||||
void process_object_update(LLMessageSystem *mesgsys, void **user_data)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_OBJECT);
|
||||
// Update the data counters
|
||||
if (mesgsys->getReceiveCompressedSize())
|
||||
{
|
||||
|
|
@ -4245,7 +4244,6 @@ void process_object_update(LLMessageSystem *mesgsys, void **user_data)
|
|||
|
||||
void process_compressed_object_update(LLMessageSystem *mesgsys, void **user_data)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_OBJECT);
|
||||
// Update the data counters
|
||||
if (mesgsys->getReceiveCompressedSize())
|
||||
{
|
||||
|
|
@ -4262,7 +4260,6 @@ void process_compressed_object_update(LLMessageSystem *mesgsys, void **user_data
|
|||
|
||||
void process_cached_object_update(LLMessageSystem *mesgsys, void **user_data)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_OBJECT);
|
||||
// Update the data counters
|
||||
if (mesgsys->getReceiveCompressedSize())
|
||||
{
|
||||
|
|
@ -4280,7 +4277,6 @@ void process_cached_object_update(LLMessageSystem *mesgsys, void **user_data)
|
|||
|
||||
void process_terse_object_update_improved(LLMessageSystem *mesgsys, void **user_data)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_OBJECT);
|
||||
if (mesgsys->getReceiveCompressedSize())
|
||||
{
|
||||
gObjectBits += mesgsys->getReceiveCompressedSize() * 8;
|
||||
|
|
|
|||
|
|
@ -873,7 +873,6 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
|
|||
const EObjectUpdateType update_type,
|
||||
LLDataPacker *dp)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_OBJECT);
|
||||
U32 retval = 0x0;
|
||||
|
||||
// If region is removed from the list it is also deleted.
|
||||
|
|
@ -2332,8 +2331,6 @@ void LLViewerObject::interpolateLinearMotion(const F64 & time, const F32 & dt)
|
|||
|
||||
BOOL LLViewerObject::setData(const U8 *datap, const U32 data_size)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_OBJECT);
|
||||
|
||||
delete [] mData;
|
||||
|
||||
if (datap)
|
||||
|
|
@ -2375,8 +2372,6 @@ void LLViewerObject::doUpdateInventory(
|
|||
U8 key,
|
||||
bool is_new)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_OBJECT);
|
||||
|
||||
LLViewerInventoryItem* old_item = NULL;
|
||||
if(TASK_INVENTORY_ITEM_KEY == key)
|
||||
{
|
||||
|
|
@ -2460,8 +2455,6 @@ void LLViewerObject::saveScript(
|
|||
BOOL active,
|
||||
bool is_new)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_OBJECT);
|
||||
|
||||
/*
|
||||
* XXXPAM Investigate not making this copy. Seems unecessary, but I'm unsure about the
|
||||
* interaction with doUpdateInventory() called below.
|
||||
|
|
@ -2537,8 +2530,6 @@ void LLViewerObject::dirtyInventory()
|
|||
|
||||
void LLViewerObject::registerInventoryListener(LLVOInventoryListener* listener, void* user_data)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_OBJECT);
|
||||
|
||||
LLInventoryCallbackInfo* info = new LLInventoryCallbackInfo;
|
||||
info->mListener = listener;
|
||||
info->mInventoryData = user_data;
|
||||
|
|
@ -2636,8 +2627,6 @@ S32 LLFilenameAndTask::sCount = 0;
|
|||
// static
|
||||
void LLViewerObject::processTaskInv(LLMessageSystem* msg, void** user_data)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_OBJECT);
|
||||
|
||||
LLUUID task_id;
|
||||
msg->getUUIDFast(_PREHASH_InventoryData, _PREHASH_TaskID, task_id);
|
||||
LLViewerObject* object = gObjectList.findObject(task_id);
|
||||
|
|
@ -2724,8 +2713,6 @@ void LLViewerObject::processTaskInvFile(void** user_data, S32 error_code, LLExtS
|
|||
|
||||
void LLViewerObject::loadTaskInvFile(const std::string& filename)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_OBJECT);
|
||||
|
||||
std::string filename_and_local_path = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, filename);
|
||||
llifstream ifs(filename_and_local_path);
|
||||
if(ifs.good())
|
||||
|
|
@ -2822,8 +2809,6 @@ void LLViewerObject::updateInventory(
|
|||
U8 key,
|
||||
bool is_new)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_OBJECT);
|
||||
|
||||
std::list<LLUUID>::iterator begin = mPendingInventoryItemsIDs.begin();
|
||||
std::list<LLUUID>::iterator end = mPendingInventoryItemsIDs.end();
|
||||
|
||||
|
|
@ -3847,8 +3832,6 @@ std::string LLViewerObject::getMediaURL() const
|
|||
|
||||
void LLViewerObject::setMediaURL(const std::string& media_url)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_OBJECT);
|
||||
|
||||
if (!mMedia)
|
||||
{
|
||||
mMedia = new LLViewerObjectMedia;
|
||||
|
|
@ -3898,8 +3881,6 @@ BOOL LLViewerObject::setMaterial(const U8 material)
|
|||
|
||||
void LLViewerObject::setNumTEs(const U8 num_tes)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_OBJECT);
|
||||
|
||||
U32 i;
|
||||
if (num_tes != getNumTEs())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@
|
|||
#include "llhudicon.h"
|
||||
#include "llinventory.h"
|
||||
#include "llrefcount.h"
|
||||
#include "llmemtype.h"
|
||||
#include "llprimitive.h"
|
||||
#include "lluuid.h"
|
||||
#include "llvoinventorylistener.h"
|
||||
|
|
@ -128,7 +127,6 @@ public:
|
|||
typedef const child_list_t const_child_list_t;
|
||||
|
||||
LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp, BOOL is_global = FALSE);
|
||||
MEM_TYPE_NEW(LLMemType::MTYPE_OBJECT);
|
||||
|
||||
virtual void markDead(); // Mark this object as dead, and clean up its references
|
||||
BOOL isDead() const {return mDead;}
|
||||
|
|
|
|||
|
|
@ -230,7 +230,6 @@ void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp,
|
|||
LLDataPacker* dpp,
|
||||
BOOL just_created)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_OBJECT_PROCESS_UPDATE_CORE);
|
||||
LLMessageSystem* msg = gMessageSystem;
|
||||
|
||||
// ignore returned flags
|
||||
|
|
@ -283,7 +282,6 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
|
|||
const EObjectUpdateType update_type,
|
||||
bool cached, bool compressed)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_OBJECT_PROCESS_UPDATE);
|
||||
LLFastTimer t(FTM_PROCESS_OBJECTS);
|
||||
|
||||
LLVector3d camera_global = gAgentCamera.getCameraPositionGlobal();
|
||||
|
|
@ -883,8 +881,6 @@ private:
|
|||
|
||||
void LLViewerObjectList::update(LLAgent &agent, LLWorld &world)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_OBJECT);
|
||||
|
||||
// Update globals
|
||||
LLViewerObject::setVelocityInterpolate( gSavedSettings.getBOOL("VelocityInterpolate") );
|
||||
LLViewerObject::setPingInterpolate( gSavedSettings.getBOOL("PingInterpolate") );
|
||||
|
|
@ -1196,7 +1192,6 @@ void LLViewerObjectList::clearDebugText()
|
|||
|
||||
void LLViewerObjectList::cleanupReferences(LLViewerObject *objectp)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_OBJECT);
|
||||
if (mDeadObjects.find(objectp->mID) != mDeadObjects.end())
|
||||
{
|
||||
llinfos << "Object " << objectp->mID << " already on dead list!" << llendl;
|
||||
|
|
@ -1424,7 +1419,6 @@ void LLViewerObjectList::removeFromActiveList(LLViewerObject* objectp)
|
|||
|
||||
void LLViewerObjectList::updateActive(LLViewerObject *objectp)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_OBJECT);
|
||||
if (objectp->isDead())
|
||||
{
|
||||
return; // We don't update dead objects!
|
||||
|
|
@ -1903,7 +1897,6 @@ void LLViewerObjectList::resetObjectBeacons()
|
|||
|
||||
LLViewerObject *LLViewerObjectList::createObjectViewer(const LLPCode pcode, LLViewerRegion *regionp)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_OBJECT);
|
||||
LLUUID fullid;
|
||||
fullid.generate();
|
||||
|
||||
|
|
@ -1929,7 +1922,6 @@ static LLFastTimer::DeclareTimer FTM_CREATE_OBJECT("Create Object");
|
|||
LLViewerObject *LLViewerObjectList::createObject(const LLPCode pcode, LLViewerRegion *regionp,
|
||||
const LLUUID &uuid, const U32 local_id, const LLHost &sender)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_OBJECT);
|
||||
LLFastTimer t(FTM_CREATE_OBJECT);
|
||||
|
||||
LLUUID fullid;
|
||||
|
|
@ -1994,7 +1986,6 @@ S32 LLViewerObjectList::findReferences(LLDrawable *drawablep) const
|
|||
|
||||
void LLViewerObjectList::orphanize(LLViewerObject *childp, U32 parent_id, U32 ip, U32 port)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_OBJECT);
|
||||
#ifdef ORPHAN_SPAM
|
||||
llinfos << "Orphaning object " << childp->getID() << " with parent " << parent_id << llendl;
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -828,7 +828,6 @@ void LLViewerParcelOverlay::updateGL()
|
|||
|
||||
void LLViewerParcelOverlay::idleUpdate(bool force_update)
|
||||
{
|
||||
LLMemType mt_iup(LLMemType::MTYPE_IDLE_UPDATE_PARCEL_OVERLAY);
|
||||
if (gGLManager.mIsDisabled)
|
||||
{
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -79,7 +79,6 @@ LLViewerPart::LLViewerPart() :
|
|||
mVPCallback(NULL),
|
||||
mImagep(NULL)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PARTICLES);
|
||||
mPartSourcep = NULL;
|
||||
|
||||
++LLViewerPartSim::sParticleCount2 ;
|
||||
|
|
@ -87,7 +86,6 @@ LLViewerPart::LLViewerPart() :
|
|||
|
||||
LLViewerPart::~LLViewerPart()
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PARTICLES);
|
||||
mPartSourcep = NULL;
|
||||
|
||||
--LLViewerPartSim::sParticleCount2 ;
|
||||
|
|
@ -95,7 +93,6 @@ LLViewerPart::~LLViewerPart()
|
|||
|
||||
void LLViewerPart::init(LLPointer<LLViewerPartSource> sourcep, LLViewerTexture *imagep, LLVPCallback cb)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PARTICLES);
|
||||
mPartID = LLViewerPart::sNextPartID;
|
||||
LLViewerPart::sNextPartID++;
|
||||
mFlags = 0x00f;
|
||||
|
|
@ -120,7 +117,6 @@ void LLViewerPart::init(LLPointer<LLViewerPartSource> sourcep, LLViewerTexture *
|
|||
LLViewerPartGroup::LLViewerPartGroup(const LLVector3 ¢er_agent, const F32 box_side, bool hud)
|
||||
: mHud(hud)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PARTICLES);
|
||||
mVOPartGroupp = NULL;
|
||||
mUniformParticles = TRUE;
|
||||
|
||||
|
|
@ -177,7 +173,6 @@ LLViewerPartGroup::LLViewerPartGroup(const LLVector3 ¢er_agent, const F32 bo
|
|||
|
||||
LLViewerPartGroup::~LLViewerPartGroup()
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PARTICLES);
|
||||
cleanup();
|
||||
|
||||
S32 count = (S32) mParticles.size();
|
||||
|
|
@ -192,7 +187,6 @@ LLViewerPartGroup::~LLViewerPartGroup()
|
|||
|
||||
void LLViewerPartGroup::cleanup()
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PARTICLES);
|
||||
if (mVOPartGroupp)
|
||||
{
|
||||
if (!mVOPartGroupp->isDead())
|
||||
|
|
@ -205,7 +199,6 @@ void LLViewerPartGroup::cleanup()
|
|||
|
||||
BOOL LLViewerPartGroup::posInGroup(const LLVector3 &pos, const F32 desired_size)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PARTICLES);
|
||||
if ((pos.mV[VX] < mMinObjPos.mV[VX])
|
||||
|| (pos.mV[VY] < mMinObjPos.mV[VY])
|
||||
|| (pos.mV[VZ] < mMinObjPos.mV[VZ]))
|
||||
|
|
@ -233,8 +226,6 @@ BOOL LLViewerPartGroup::posInGroup(const LLVector3 &pos, const F32 desired_size)
|
|||
|
||||
BOOL LLViewerPartGroup::addPart(LLViewerPart* part, F32 desired_size)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PARTICLES);
|
||||
|
||||
if (part->mFlags & LLPartData::LL_PART_HUD && !mHud)
|
||||
{
|
||||
return FALSE;
|
||||
|
|
@ -261,7 +252,6 @@ BOOL LLViewerPartGroup::addPart(LLViewerPart* part, F32 desired_size)
|
|||
|
||||
void LLViewerPartGroup::updateParticles(const F32 lastdt)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PARTICLES);
|
||||
F32 dt;
|
||||
|
||||
LLVector3 gravity(0.f, 0.f, GRAVITY);
|
||||
|
|
@ -429,7 +419,6 @@ void LLViewerPartGroup::updateParticles(const F32 lastdt)
|
|||
|
||||
void LLViewerPartGroup::shift(const LLVector3 &offset)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PARTICLES);
|
||||
mCenterAgent += offset;
|
||||
mMinObjPos += offset;
|
||||
mMaxObjPos += offset;
|
||||
|
|
@ -442,8 +431,6 @@ void LLViewerPartGroup::shift(const LLVector3 &offset)
|
|||
|
||||
void LLViewerPartGroup::removeParticlesByID(const U32 source_id)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PARTICLES);
|
||||
|
||||
for (S32 i = 0; i < (S32)mParticles.size(); i++)
|
||||
{
|
||||
if(mParticles[i]->mPartSourcep->getID() == source_id)
|
||||
|
|
@ -475,7 +462,6 @@ void LLViewerPartSim::checkParticleCount(U32 size)
|
|||
|
||||
LLViewerPartSim::LLViewerPartSim()
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PARTICLES);
|
||||
sMaxParticleCount = llmin(gSavedSettings.getS32("RenderMaxPartCount"), LL_MAX_PARTICLE_COUNT);
|
||||
static U32 id_seed = 0;
|
||||
mID = ++id_seed;
|
||||
|
|
@ -484,7 +470,6 @@ LLViewerPartSim::LLViewerPartSim()
|
|||
|
||||
void LLViewerPartSim::destroyClass()
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PARTICLES);
|
||||
S32 i;
|
||||
S32 count;
|
||||
|
||||
|
|
@ -500,9 +485,9 @@ void LLViewerPartSim::destroyClass()
|
|||
mViewerPartSources.clear();
|
||||
}
|
||||
|
||||
//static
|
||||
BOOL LLViewerPartSim::shouldAddPart()
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PARTICLES);
|
||||
if (sParticleCount > PART_THROTTLE_THRESHOLD*sMaxParticleCount)
|
||||
{
|
||||
|
||||
|
|
@ -525,7 +510,6 @@ BOOL LLViewerPartSim::shouldAddPart()
|
|||
|
||||
void LLViewerPartSim::addPart(LLViewerPart* part)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PARTICLES);
|
||||
if (sParticleCount < MAX_PART_COUNT)
|
||||
{
|
||||
put(part);
|
||||
|
|
@ -541,7 +525,6 @@ void LLViewerPartSim::addPart(LLViewerPart* part)
|
|||
|
||||
LLViewerPartGroup *LLViewerPartSim::put(LLViewerPart* part)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PARTICLES);
|
||||
const F32 MAX_MAG = 1000000.f*1000000.f; // 1 million
|
||||
LLViewerPartGroup *return_group = NULL ;
|
||||
if (part->mPosAgent.magVecSquared() > MAX_MAG || !part->mPosAgent.isFinite())
|
||||
|
|
@ -599,7 +582,6 @@ LLViewerPartGroup *LLViewerPartSim::put(LLViewerPart* part)
|
|||
|
||||
LLViewerPartGroup *LLViewerPartSim::createViewerPartGroup(const LLVector3 &pos_agent, const F32 desired_size, bool hud)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PARTICLES);
|
||||
//find a box that has a center position divisible by PART_SIM_BOX_SIDE that encompasses
|
||||
//pos_agent
|
||||
LLViewerPartGroup *groupp = new LLViewerPartGroup(pos_agent, desired_size, hud);
|
||||
|
|
@ -632,8 +614,6 @@ static LLFastTimer::DeclareTimer FTM_SIMULATE_PARTICLES("Simulate Particles");
|
|||
|
||||
void LLViewerPartSim::updateSimulation()
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PARTICLES);
|
||||
|
||||
static LLFrameTimer update_timer;
|
||||
|
||||
const F32 dt = llmin(update_timer.getElapsedTimeAndResetF32(), 0.1f);
|
||||
|
|
@ -800,7 +780,6 @@ void LLViewerPartSim::updatePartBurstRate()
|
|||
|
||||
void LLViewerPartSim::addPartSource(LLPointer<LLViewerPartSource> sourcep)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PARTICLES);
|
||||
if (!sourcep)
|
||||
{
|
||||
llwarns << "Null part source!" << llendl;
|
||||
|
|
@ -817,7 +796,6 @@ void LLViewerPartSim::removeLastCreatedSource()
|
|||
|
||||
void LLViewerPartSim::cleanupRegion(LLViewerRegion *regionp)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PARTICLES);
|
||||
for (group_list_t::iterator i = mViewerPartGroups.begin(); i != mViewerPartGroups.end(); )
|
||||
{
|
||||
group_list_t::iterator iter = i++;
|
||||
|
|
@ -832,7 +810,6 @@ void LLViewerPartSim::cleanupRegion(LLViewerRegion *regionp)
|
|||
|
||||
void LLViewerPartSim::clearParticlesByID(const U32 system_id)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PARTICLES);
|
||||
for (group_list_t::iterator g = mViewerPartGroups.begin(); g != mViewerPartGroups.end(); ++g)
|
||||
{
|
||||
(*g)->removeParticlesByID(system_id);
|
||||
|
|
@ -850,7 +827,6 @@ void LLViewerPartSim::clearParticlesByID(const U32 system_id)
|
|||
|
||||
void LLViewerPartSim::clearParticlesByOwnerID(const LLUUID& task_id)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PARTICLES);
|
||||
for (source_list_t::iterator iter = mViewerPartSources.begin(); iter != mViewerPartSources.end(); ++iter)
|
||||
{
|
||||
if ((*iter)->getOwnerUUID() == task_id)
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ public:
|
|||
|
||||
void cleanupRegion(LLViewerRegion *regionp);
|
||||
|
||||
BOOL shouldAddPart(); // Just decides whether this particle should be added or not (for particle count capping)
|
||||
static BOOL shouldAddPart(); // Just decides whether this particle should be added or not (for particle count capping)
|
||||
F32 maxRate() // Return maximum particle generation rate
|
||||
{
|
||||
if (sParticleCount >= MAX_PART_COUNT)
|
||||
|
|
|
|||
|
|
@ -90,7 +90,6 @@ void LLViewerPartSource::setStart()
|
|||
LLViewerPartSourceScript::LLViewerPartSourceScript(LLViewerObject *source_objp) :
|
||||
LLViewerPartSource(LL_PART_SOURCE_SCRIPT)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PARTICLES);
|
||||
llassert(source_objp);
|
||||
mSourceObjectp = source_objp;
|
||||
mPosAgent = mSourceObjectp->getPositionAgent();
|
||||
|
|
@ -102,7 +101,6 @@ LLViewerPartSourceScript::LLViewerPartSourceScript(LLViewerObject *source_objp)
|
|||
|
||||
void LLViewerPartSourceScript::setDead()
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PARTICLES);
|
||||
mIsDead = TRUE;
|
||||
mSourceObjectp = NULL;
|
||||
mTargetObjectp = NULL;
|
||||
|
|
@ -113,7 +111,6 @@ void LLViewerPartSourceScript::update(const F32 dt)
|
|||
if( mIsSuspended )
|
||||
return;
|
||||
|
||||
LLMemType mt(LLMemType::MTYPE_PARTICLES);
|
||||
F32 old_update_time = mLastUpdateTime;
|
||||
mLastUpdateTime += dt;
|
||||
|
||||
|
|
@ -394,7 +391,6 @@ void LLViewerPartSourceScript::update(const F32 dt)
|
|||
// static
|
||||
LLPointer<LLViewerPartSourceScript> LLViewerPartSourceScript::unpackPSS(LLViewerObject *source_objp, LLPointer<LLViewerPartSourceScript> pssp, const S32 block_num)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PARTICLES);
|
||||
if (!pssp)
|
||||
{
|
||||
if (LLPartSysData::isNullPS(block_num))
|
||||
|
|
@ -436,7 +432,6 @@ LLPointer<LLViewerPartSourceScript> LLViewerPartSourceScript::unpackPSS(LLViewer
|
|||
|
||||
LLPointer<LLViewerPartSourceScript> LLViewerPartSourceScript::unpackPSS(LLViewerObject *source_objp, LLPointer<LLViewerPartSourceScript> pssp, LLDataPacker &dp)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PARTICLES);
|
||||
if (!pssp)
|
||||
{
|
||||
LLPointer<LLViewerPartSourceScript> new_pssp = new LLViewerPartSourceScript(source_objp);
|
||||
|
|
@ -470,8 +465,6 @@ LLPointer<LLViewerPartSourceScript> LLViewerPartSourceScript::unpackPSS(LLViewer
|
|||
/* static */
|
||||
LLPointer<LLViewerPartSourceScript> LLViewerPartSourceScript::createPSS(LLViewerObject *source_objp, const LLPartSysData& particle_parameters)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PARTICLES);
|
||||
|
||||
LLPointer<LLViewerPartSourceScript> new_pssp = new LLViewerPartSourceScript(source_objp);
|
||||
|
||||
new_pssp->mPartSysData = particle_parameters;
|
||||
|
|
@ -487,13 +480,11 @@ LLPointer<LLViewerPartSourceScript> LLViewerPartSourceScript::createPSS(LLViewer
|
|||
|
||||
void LLViewerPartSourceScript::setImage(LLViewerTexture *imagep)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PARTICLES);
|
||||
mImagep = imagep;
|
||||
}
|
||||
|
||||
void LLViewerPartSourceScript::setTargetObject(LLViewerObject *objp)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PARTICLES);
|
||||
mTargetObjectp = objp;
|
||||
}
|
||||
|
||||
|
|
@ -509,7 +500,6 @@ LLViewerPartSourceSpiral::LLViewerPartSourceSpiral(const LLVector3 &pos) :
|
|||
|
||||
void LLViewerPartSourceSpiral::setDead()
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PARTICLES);
|
||||
mIsDead = TRUE;
|
||||
mSourceObjectp = NULL;
|
||||
}
|
||||
|
|
@ -517,7 +507,6 @@ void LLViewerPartSourceSpiral::setDead()
|
|||
|
||||
void LLViewerPartSourceSpiral::updatePart(LLViewerPart &part, const F32 dt)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PARTICLES);
|
||||
F32 frac = part.mLastUpdateTime/part.mMaxAge;
|
||||
|
||||
LLVector3 center_pos;
|
||||
|
|
@ -542,7 +531,6 @@ void LLViewerPartSourceSpiral::updatePart(LLViewerPart &part, const F32 dt)
|
|||
|
||||
void LLViewerPartSourceSpiral::update(const F32 dt)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PARTICLES);
|
||||
if (!mImagep)
|
||||
{
|
||||
mImagep = LLViewerTextureManager::getFetchedTextureFromFile("pixiesmall.j2c");
|
||||
|
|
@ -588,7 +576,6 @@ void LLViewerPartSourceSpiral::update(const F32 dt)
|
|||
|
||||
void LLViewerPartSourceSpiral::setSourceObject(LLViewerObject *objp)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PARTICLES);
|
||||
mSourceObjectp = objp;
|
||||
}
|
||||
|
||||
|
|
@ -612,7 +599,6 @@ LLViewerPartSourceBeam::~LLViewerPartSourceBeam()
|
|||
|
||||
void LLViewerPartSourceBeam::setDead()
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PARTICLES);
|
||||
mIsDead = TRUE;
|
||||
mSourceObjectp = NULL;
|
||||
mTargetObjectp = NULL;
|
||||
|
|
@ -626,7 +612,6 @@ void LLViewerPartSourceBeam::setColor(const LLColor4 &color)
|
|||
|
||||
void LLViewerPartSourceBeam::updatePart(LLViewerPart &part, const F32 dt)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PARTICLES);
|
||||
F32 frac = part.mLastUpdateTime/part.mMaxAge;
|
||||
|
||||
LLViewerPartSource *ps = (LLViewerPartSource*)part.mPartSourcep;
|
||||
|
|
@ -671,7 +656,6 @@ void LLViewerPartSourceBeam::updatePart(LLViewerPart &part, const F32 dt)
|
|||
|
||||
void LLViewerPartSourceBeam::update(const F32 dt)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PARTICLES);
|
||||
const F32 RATE = 0.025f;
|
||||
|
||||
mLastUpdateTime += dt;
|
||||
|
|
@ -743,13 +727,11 @@ void LLViewerPartSourceBeam::update(const F32 dt)
|
|||
|
||||
void LLViewerPartSourceBeam::setSourceObject(LLViewerObject* objp)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PARTICLES);
|
||||
mSourceObjectp = objp;
|
||||
}
|
||||
|
||||
void LLViewerPartSourceBeam::setTargetObject(LLViewerObject* objp)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PARTICLES);
|
||||
mTargetObjectp = objp;
|
||||
}
|
||||
|
||||
|
|
@ -764,7 +746,6 @@ LLViewerPartSourceChat::LLViewerPartSourceChat(const LLVector3 &pos) :
|
|||
|
||||
void LLViewerPartSourceChat::setDead()
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PARTICLES);
|
||||
mIsDead = TRUE;
|
||||
mSourceObjectp = NULL;
|
||||
}
|
||||
|
|
@ -772,7 +753,6 @@ void LLViewerPartSourceChat::setDead()
|
|||
|
||||
void LLViewerPartSourceChat::updatePart(LLViewerPart &part, const F32 dt)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PARTICLES);
|
||||
F32 frac = part.mLastUpdateTime/part.mMaxAge;
|
||||
|
||||
LLVector3 center_pos;
|
||||
|
|
@ -797,7 +777,6 @@ void LLViewerPartSourceChat::updatePart(LLViewerPart &part, const F32 dt)
|
|||
|
||||
void LLViewerPartSourceChat::update(const F32 dt)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PARTICLES);
|
||||
if (!mImagep)
|
||||
{
|
||||
mImagep = LLViewerTextureManager::getFetchedTextureFromFile("pixiesmall.j2c");
|
||||
|
|
@ -853,7 +832,6 @@ void LLViewerPartSourceChat::update(const F32 dt)
|
|||
|
||||
void LLViewerPartSourceChat::setSourceObject(LLViewerObject *objp)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PARTICLES);
|
||||
mSourceObjectp = objp;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -695,7 +695,6 @@ void LLViewerRegion::dirtyHeights()
|
|||
|
||||
BOOL LLViewerRegion::idleUpdate(F32 max_update_time)
|
||||
{
|
||||
LLMemType mt_ivr(LLMemType::MTYPE_IDLE_UPDATE_VIEWER_REGION);
|
||||
// did_update returns TRUE if we did at least one significant update
|
||||
BOOL did_update = mImpl->mLandp->idleUpdate(max_update_time);
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@
|
|||
#include "llimagebmp.h"
|
||||
#include "llimagej2c.h"
|
||||
#include "llimagetga.h"
|
||||
#include "llmemtype.h"
|
||||
#include "llstl.h"
|
||||
#include "llvfile.h"
|
||||
#include "llvfs.h"
|
||||
|
|
|
|||
|
|
@ -1282,7 +1282,6 @@ void LLViewerTextureList::receiveImagePacket(LLMessageSystem *msg, void **user_d
|
|||
{
|
||||
static LLCachedControl<bool> log_texture_traffic(gSavedSettings,"LogTextureNetworkTraffic") ;
|
||||
|
||||
LLMemType mt1(LLMemType::MTYPE_APPFMTIMAGE);
|
||||
LLFastTimer t(FTM_PROCESS_IMAGES);
|
||||
|
||||
// Receives image packet, copy into image object,
|
||||
|
|
|
|||
|
|
@ -695,7 +695,6 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
|
|||
mLastRezzedStatus(-1)
|
||||
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_AVATAR);
|
||||
//VTResume(); // VTune
|
||||
|
||||
// mVoiceVisualizer is created by the hud effects manager and uses the HUD Effects pipeline
|
||||
|
|
@ -1739,8 +1738,6 @@ LLViewerObject* LLVOAvatar::lineSegmentIntersectRiggedAttachments(const LLVector
|
|||
//-----------------------------------------------------------------------------
|
||||
BOOL LLVOAvatar::parseSkeletonFile(const std::string& filename)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_AVATAR);
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// parse the file
|
||||
//-------------------------------------------------------------------------
|
||||
|
|
@ -1782,8 +1779,6 @@ BOOL LLVOAvatar::parseSkeletonFile(const std::string& filename)
|
|||
//-----------------------------------------------------------------------------
|
||||
BOOL LLVOAvatar::setupBone(const LLVOAvatarBoneInfo* info, LLViewerJoint* parent, S32 &volume_num, S32 &joint_num)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_AVATAR);
|
||||
|
||||
LLViewerJoint* joint = NULL;
|
||||
|
||||
if (info->mIsJoint)
|
||||
|
|
@ -1849,8 +1844,6 @@ BOOL LLVOAvatar::setupBone(const LLVOAvatarBoneInfo* info, LLViewerJoint* parent
|
|||
//-----------------------------------------------------------------------------
|
||||
BOOL LLVOAvatar::buildSkeleton(const LLVOAvatarSkeletonInfo *info)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_AVATAR);
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// allocate joints
|
||||
//-------------------------------------------------------------------------
|
||||
|
|
@ -1921,8 +1914,6 @@ void LLVOAvatar::startDefaultMotions()
|
|||
//-----------------------------------------------------------------------------
|
||||
void LLVOAvatar::buildCharacter()
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_AVATAR);
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// remove all references to our existing skeleton
|
||||
// so we can rebuild it
|
||||
|
|
@ -2072,8 +2063,6 @@ void LLVOAvatar::buildCharacter()
|
|||
//-----------------------------------------------------------------------------
|
||||
void LLVOAvatar::releaseMeshData()
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_AVATAR);
|
||||
|
||||
if (sInstances.size() < AVATAR_RELEASE_THRESHOLD || mIsDummy)
|
||||
{
|
||||
return;
|
||||
|
|
@ -2128,7 +2117,6 @@ void LLVOAvatar::releaseMeshData()
|
|||
void LLVOAvatar::restoreMeshData()
|
||||
{
|
||||
llassert(!isSelf());
|
||||
LLMemType mt(LLMemType::MTYPE_AVATAR);
|
||||
|
||||
//llinfos << "Restoring" << llendl;
|
||||
mMeshValid = TRUE;
|
||||
|
|
@ -2344,8 +2332,6 @@ U32 LLVOAvatar::processUpdateMessage(LLMessageSystem *mesgsys,
|
|||
U32 block_num, const EObjectUpdateType update_type,
|
||||
LLDataPacker *dp)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_AVATAR);
|
||||
|
||||
LLVector3 old_vel = getVelocity();
|
||||
const BOOL has_name = !getNVPair("FirstName");
|
||||
|
||||
|
|
@ -2425,7 +2411,6 @@ void LLVOAvatar::dumpAnimationState()
|
|||
//------------------------------------------------------------------------
|
||||
void LLVOAvatar::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_AVATAR);
|
||||
LLFastTimer t(FTM_AVATAR_UPDATE);
|
||||
|
||||
if (isDead())
|
||||
|
|
@ -3463,8 +3448,6 @@ bool LLVOAvatar::isVisuallyMuted() const
|
|||
//------------------------------------------------------------------------
|
||||
BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_AVATAR);
|
||||
|
||||
// clear debug text
|
||||
mDebugText.clear();
|
||||
if (LLVOAvatar::sShowAnimationDebug)
|
||||
|
|
@ -4793,8 +4776,6 @@ const LLUUID& LLVOAvatar::getStepSound() const
|
|||
//-----------------------------------------------------------------------------
|
||||
void LLVOAvatar::processAnimationStateChanges()
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_AVATAR);
|
||||
|
||||
if ( isAnyAnimationSignaled(AGENT_WALK_ANIMS, NUM_AGENT_WALK_ANIMS) )
|
||||
{
|
||||
startMotion(ANIM_AGENT_WALK_ADJUST);
|
||||
|
|
@ -4885,8 +4866,6 @@ void LLVOAvatar::processAnimationStateChanges()
|
|||
//-----------------------------------------------------------------------------
|
||||
BOOL LLVOAvatar::processSingleAnimationStateChange( const LLUUID& anim_id, BOOL start )
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_AVATAR);
|
||||
|
||||
BOOL result = FALSE;
|
||||
|
||||
if ( start ) // start animation
|
||||
|
|
@ -5021,8 +5000,6 @@ LLUUID LLVOAvatar::remapMotionID(const LLUUID& id)
|
|||
//-----------------------------------------------------------------------------
|
||||
BOOL LLVOAvatar::startMotion(const LLUUID& id, F32 time_offset)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_AVATAR);
|
||||
|
||||
lldebugs << "motion requested " << id.asString() << " " << gAnimLibrary.animationName(id) << llendl;
|
||||
|
||||
LLUUID remap_id = remapMotionID(id);
|
||||
|
|
@ -5851,8 +5828,6 @@ BOOL LLVOAvatar::isActive() const
|
|||
//-----------------------------------------------------------------------------
|
||||
void LLVOAvatar::setPixelAreaAndAngle(LLAgent &agent)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_AVATAR);
|
||||
|
||||
if (mDrawable.isNull())
|
||||
{
|
||||
return;
|
||||
|
|
@ -7297,8 +7272,6 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
|
|||
return;
|
||||
}
|
||||
|
||||
LLMemType mt(LLMemType::MTYPE_AVATAR);
|
||||
|
||||
BOOL is_first_appearance_message = !mFirstAppearanceMessageReceived;
|
||||
mFirstAppearanceMessageReceived = TRUE;
|
||||
|
||||
|
|
@ -7499,7 +7472,6 @@ void LLVOAvatar::onBakedTextureMasksLoaded( BOOL success, LLViewerFetchedTexture
|
|||
if (!userdata) return;
|
||||
|
||||
//llinfos << "onBakedTextureMasksLoaded: " << src_vi->getID() << llendl;
|
||||
const LLMemType mt(LLMemType::MTYPE_AVATAR);
|
||||
const LLUUID id = src_vi->getID();
|
||||
|
||||
LLTextureMaskData* maskData = (LLTextureMaskData*) userdata;
|
||||
|
|
|
|||
|
|
@ -257,8 +257,6 @@ BOOL LLVOAvatarSelf::loadAvatarSelf()
|
|||
|
||||
BOOL LLVOAvatarSelf::buildSkeletonSelf(const LLVOAvatarSkeletonInfo *info)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_AVATAR);
|
||||
|
||||
// add special-purpose "screen" joint
|
||||
mScreenp = new LLViewerJoint("mScreen", NULL);
|
||||
// for now, put screen at origin, as it is only used during special
|
||||
|
|
@ -652,8 +650,6 @@ BOOL LLVOAvatarSelf::loadLayersets()
|
|||
// virtual
|
||||
BOOL LLVOAvatarSelf::updateCharacter(LLAgent &agent)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_AVATAR);
|
||||
|
||||
// update screen joint size
|
||||
if (mScreenp)
|
||||
{
|
||||
|
|
@ -1008,8 +1004,6 @@ void LLVOAvatarSelf::idleUpdateTractorBeam()
|
|||
// virtual
|
||||
void LLVOAvatarSelf::restoreMeshData()
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_AVATAR);
|
||||
|
||||
//llinfos << "Restoring" << llendl;
|
||||
mMeshValid = TRUE;
|
||||
updateJointLODs();
|
||||
|
|
|
|||
|
|
@ -675,7 +675,6 @@ static LLFastTimer::DeclareTimer FTM_REBUILD_GRASS_VB("Grass VB");
|
|||
|
||||
void LLGrassPartition::getGeometry(LLSpatialGroup* group)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
|
||||
LLFastTimer ftm(FTM_REBUILD_GRASS_VB);
|
||||
|
||||
std::sort(mFaceList.begin(), mFaceList.end(), LLFace::CompareDistanceGreater());
|
||||
|
|
|
|||
|
|
@ -599,7 +599,6 @@ static LLFastTimer::DeclareTimer FTM_REBUILD_PARTICLE_GEOM("Particle Geom");
|
|||
|
||||
void LLParticlePartition::getGeometry(LLSpatialGroup* group)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
|
||||
LLFastTimer ftm(FTM_REBUILD_PARTICLE_GEOM);
|
||||
|
||||
std::sort(mFaceList.begin(), mFaceList.end(), LLFace::CompareDistanceGreater());
|
||||
|
|
|
|||
|
|
@ -3941,7 +3941,6 @@ static LLFastTimer::DeclareTimer FTM_REGISTER_FACE("Register Face");
|
|||
void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep, U32 type)
|
||||
{
|
||||
LLFastTimer t(FTM_REGISTER_FACE);
|
||||
LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
|
||||
|
||||
if (facep->getViewerObject()->isSelected() && LLSelectMgr::getInstance()->mHideSelectedObjects)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -138,7 +138,6 @@ void LLWorld::destroyClass()
|
|||
|
||||
LLViewerRegion* LLWorld::addRegion(const U64 ®ion_handle, const LLHost &host)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_REGIONS);
|
||||
llinfos << "Add region with handle: " << region_handle << " on host " << host << llendl;
|
||||
LLViewerRegion *regionp = getRegionFromHandle(region_handle);
|
||||
if (regionp)
|
||||
|
|
@ -644,7 +643,6 @@ void LLWorld::updateVisibilities()
|
|||
|
||||
void LLWorld::updateRegions(F32 max_update_time)
|
||||
{
|
||||
LLMemType mt_ur(LLMemType::MTYPE_IDLE_UPDATE_REGIONS);
|
||||
LLTimer update_timer;
|
||||
BOOL did_one = FALSE;
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@
|
|||
#include "llviewercontrol.h"
|
||||
#include "llfasttimer.h"
|
||||
#include "llfontgl.h"
|
||||
#include "llmemtype.h"
|
||||
#include "llnamevalue.h"
|
||||
#include "llpointer.h"
|
||||
#include "llprimitive.h"
|
||||
|
|
@ -461,8 +460,6 @@ void LLPipeline::connectRefreshCachedSettingsSafe(const std::string name)
|
|||
|
||||
void LLPipeline::init()
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PIPELINE_INIT);
|
||||
|
||||
refreshCachedSettings();
|
||||
|
||||
gOctreeMaxCapacity = gSavedSettings.getU32("OctreeMaxNodeCapacity");
|
||||
|
|
@ -1131,7 +1128,6 @@ void LLPipeline::releaseScreenBuffers()
|
|||
void LLPipeline::createGLBuffers()
|
||||
{
|
||||
stop_glerror();
|
||||
LLMemType mt_cb(LLMemType::MTYPE_PIPELINE_CREATE_BUFFERS);
|
||||
assertInitialized();
|
||||
|
||||
updateRenderDeferred();
|
||||
|
|
@ -1268,7 +1264,6 @@ void LLPipeline::createLUTBuffers()
|
|||
|
||||
void LLPipeline::restoreGL()
|
||||
{
|
||||
LLMemType mt_cb(LLMemType::MTYPE_PIPELINE_RESTORE_GL);
|
||||
assertInitialized();
|
||||
|
||||
if (mVertexShadersEnabled)
|
||||
|
|
@ -1330,7 +1325,6 @@ BOOL LLPipeline::canUseAntiAliasing() const
|
|||
|
||||
void LLPipeline::unloadShaders()
|
||||
{
|
||||
LLMemType mt_us(LLMemType::MTYPE_PIPELINE_UNLOAD_SHADERS);
|
||||
LLViewerShaderMgr::instance()->unloadShaders();
|
||||
|
||||
mVertexShadersLoaded = 0;
|
||||
|
|
@ -1362,7 +1356,6 @@ S32 LLPipeline::getMaxLightingDetail() const
|
|||
|
||||
S32 LLPipeline::setLightingDetail(S32 level)
|
||||
{
|
||||
LLMemType mt_ld(LLMemType::MTYPE_PIPELINE_LIGHTING_DETAIL);
|
||||
refreshCachedSettings();
|
||||
|
||||
if (level < 0)
|
||||
|
|
@ -1524,7 +1517,6 @@ LLDrawPool *LLPipeline::findPool(const U32 type, LLViewerTexture *tex0)
|
|||
|
||||
LLDrawPool *LLPipeline::getPool(const U32 type, LLViewerTexture *tex0)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PIPELINE);
|
||||
LLDrawPool *poolp = findPool(type, tex0);
|
||||
if (poolp)
|
||||
{
|
||||
|
|
@ -1541,7 +1533,6 @@ LLDrawPool *LLPipeline::getPool(const U32 type, LLViewerTexture *tex0)
|
|||
// static
|
||||
LLDrawPool* LLPipeline::getPoolFromTE(const LLTextureEntry* te, LLViewerTexture* imagep)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PIPELINE);
|
||||
U32 type = getPoolTypeFromTE(te, imagep);
|
||||
return gPipeline.getPool(type, imagep);
|
||||
}
|
||||
|
|
@ -1549,8 +1540,6 @@ LLDrawPool* LLPipeline::getPoolFromTE(const LLTextureEntry* te, LLViewerTexture*
|
|||
//static
|
||||
U32 LLPipeline::getPoolTypeFromTE(const LLTextureEntry* te, LLViewerTexture* imagep)
|
||||
{
|
||||
LLMemType mt_gpt(LLMemType::MTYPE_PIPELINE_GET_POOL_TYPE);
|
||||
|
||||
if (!te || !imagep)
|
||||
{
|
||||
return 0;
|
||||
|
|
@ -1579,7 +1568,6 @@ U32 LLPipeline::getPoolTypeFromTE(const LLTextureEntry* te, LLViewerTexture* ima
|
|||
|
||||
void LLPipeline::addPool(LLDrawPool *new_poolp)
|
||||
{
|
||||
LLMemType mt_a(LLMemType::MTYPE_PIPELINE_ADD_POOL);
|
||||
assertInitialized();
|
||||
mPools.insert(new_poolp);
|
||||
addToQuickLookup( new_poolp );
|
||||
|
|
@ -1587,7 +1575,6 @@ void LLPipeline::addPool(LLDrawPool *new_poolp)
|
|||
|
||||
void LLPipeline::allocDrawable(LLViewerObject *vobj)
|
||||
{
|
||||
LLMemType mt_ad(LLMemType::MTYPE_PIPELINE_ALLOCATE_DRAWABLE);
|
||||
LLDrawable *drawable = new LLDrawable();
|
||||
vobj->mDrawable = drawable;
|
||||
|
||||
|
|
@ -1686,8 +1673,6 @@ void LLPipeline::unlinkDrawable(LLDrawable *drawable)
|
|||
|
||||
U32 LLPipeline::addObject(LLViewerObject *vobj)
|
||||
{
|
||||
LLMemType mt_ao(LLMemType::MTYPE_PIPELINE_ADD_OBJECT);
|
||||
|
||||
if (RenderDelayCreation)
|
||||
{
|
||||
mCreateQ.push_back(vobj);
|
||||
|
|
@ -1703,7 +1688,6 @@ U32 LLPipeline::addObject(LLViewerObject *vobj)
|
|||
void LLPipeline::createObjects(F32 max_dtime)
|
||||
{
|
||||
LLFastTimer ftm(FTM_PIPELINE_CREATE);
|
||||
LLMemType mt(LLMemType::MTYPE_PIPELINE_CREATE_OBJECTS);
|
||||
|
||||
LLTimer update_timer;
|
||||
|
||||
|
|
@ -1889,7 +1873,6 @@ static LLFastTimer::DeclareTimer FTM_UPDATE_MOVE("Update Move");
|
|||
void LLPipeline::updateMove()
|
||||
{
|
||||
LLFastTimer t(FTM_UPDATE_MOVE);
|
||||
LLMemType mt_um(LLMemType::MTYPE_PIPELINE_UPDATE_MOVE);
|
||||
|
||||
if (FreezeTime)
|
||||
{
|
||||
|
|
@ -2242,7 +2225,6 @@ static LLFastTimer::DeclareTimer FTM_CULL("Object Culling");
|
|||
void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_clip, LLPlane* planep)
|
||||
{
|
||||
LLFastTimer t(FTM_CULL);
|
||||
LLMemType mt_uc(LLMemType::MTYPE_PIPELINE_UPDATE_CULL);
|
||||
|
||||
grabReferences(result);
|
||||
|
||||
|
|
@ -2566,7 +2548,6 @@ void LLPipeline::rebuildPriorityGroups()
|
|||
{
|
||||
LLFastTimer t(FTM_REBUILD_PRIORITY_GROUPS);
|
||||
LLTimer update_timer;
|
||||
LLMemType mt(LLMemType::MTYPE_PIPELINE);
|
||||
assertInitialized();
|
||||
|
||||
gMeshRepo.notifyLoadedMeshes();
|
||||
|
|
@ -2637,7 +2618,6 @@ void LLPipeline::rebuildGroups()
|
|||
void LLPipeline::updateGeom(F32 max_dtime)
|
||||
{
|
||||
LLTimer update_timer;
|
||||
LLMemType mt(LLMemType::MTYPE_PIPELINE_UPDATE_GEOM);
|
||||
LLPointer<LLDrawable> drawablep;
|
||||
|
||||
LLFastTimer t(FTM_GEO_UPDATE);
|
||||
|
|
@ -2731,8 +2711,6 @@ void LLPipeline::updateGeom(F32 max_dtime)
|
|||
|
||||
void LLPipeline::markVisible(LLDrawable *drawablep, LLCamera& camera)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PIPELINE_MARK_VISIBLE);
|
||||
|
||||
if(drawablep && !drawablep->isDead())
|
||||
{
|
||||
if (drawablep->isSpatialBridge())
|
||||
|
|
@ -2770,8 +2748,6 @@ void LLPipeline::markVisible(LLDrawable *drawablep, LLCamera& camera)
|
|||
|
||||
void LLPipeline::markMoved(LLDrawable *drawablep, BOOL damped_motion)
|
||||
{
|
||||
LLMemType mt_mm(LLMemType::MTYPE_PIPELINE_MARK_MOVED);
|
||||
|
||||
if (!drawablep)
|
||||
{
|
||||
//llerrs << "Sending null drawable to moved list!" << llendl;
|
||||
|
|
@ -2816,8 +2792,6 @@ void LLPipeline::markMoved(LLDrawable *drawablep, BOOL damped_motion)
|
|||
|
||||
void LLPipeline::markShift(LLDrawable *drawablep)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PIPELINE_MARK_SHIFT);
|
||||
|
||||
if (!drawablep || drawablep->isDead())
|
||||
{
|
||||
return;
|
||||
|
|
@ -2843,8 +2817,6 @@ static LLFastTimer::DeclareTimer FTM_SHIFT_HUD("Shift HUD");
|
|||
|
||||
void LLPipeline::shiftObjects(const LLVector3 &offset)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PIPELINE_SHIFT_OBJECTS);
|
||||
|
||||
assertInitialized();
|
||||
|
||||
glClear(GL_DEPTH_BUFFER_BIT);
|
||||
|
|
@ -2898,8 +2870,6 @@ void LLPipeline::shiftObjects(const LLVector3 &offset)
|
|||
|
||||
void LLPipeline::markTextured(LLDrawable *drawablep)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PIPELINE_MARK_TEXTURED);
|
||||
|
||||
if (drawablep && !drawablep->isDead() && assertInitialized())
|
||||
{
|
||||
mRetexturedList.insert(drawablep);
|
||||
|
|
@ -2950,8 +2920,6 @@ void LLPipeline::markMeshDirty(LLSpatialGroup* group)
|
|||
|
||||
void LLPipeline::markRebuild(LLSpatialGroup* group, BOOL priority)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PIPELINE);
|
||||
|
||||
if (group && !group->isDead() && group->mSpatialPartition)
|
||||
{
|
||||
if (group->mSpatialPartition->mPartitionType == LLViewerRegion::PARTITION_HUD)
|
||||
|
|
@ -2991,8 +2959,6 @@ void LLPipeline::markRebuild(LLSpatialGroup* group, BOOL priority)
|
|||
|
||||
void LLPipeline::markRebuild(LLDrawable *drawablep, LLDrawable::EDrawableFlags flag, BOOL priority)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PIPELINE_MARK_REBUILD);
|
||||
|
||||
if (drawablep && !drawablep->isDead() && assertInitialized())
|
||||
{
|
||||
if (!drawablep->isState(LLDrawable::BUILT))
|
||||
|
|
@ -3039,7 +3005,6 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result)
|
|||
}
|
||||
|
||||
LLFastTimer ftm(FTM_STATESORT);
|
||||
LLMemType mt(LLMemType::MTYPE_PIPELINE_STATE_SORT);
|
||||
|
||||
//LLVertexBuffer::unbind();
|
||||
|
||||
|
|
@ -3140,7 +3105,6 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result)
|
|||
|
||||
void LLPipeline::stateSort(LLSpatialGroup* group, LLCamera& camera)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PIPELINE_STATE_SORT);
|
||||
if (group->changeLOD())
|
||||
{
|
||||
for (LLSpatialGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i)
|
||||
|
|
@ -3159,7 +3123,6 @@ void LLPipeline::stateSort(LLSpatialGroup* group, LLCamera& camera)
|
|||
|
||||
void LLPipeline::stateSort(LLSpatialBridge* bridge, LLCamera& camera)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PIPELINE_STATE_SORT);
|
||||
if (bridge->getSpatialGroup()->changeLOD())
|
||||
{
|
||||
bool force_update = false;
|
||||
|
|
@ -3169,8 +3132,6 @@ void LLPipeline::stateSort(LLSpatialBridge* bridge, LLCamera& camera)
|
|||
|
||||
void LLPipeline::stateSort(LLDrawable* drawablep, LLCamera& camera)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PIPELINE_STATE_SORT);
|
||||
|
||||
if (!drawablep
|
||||
|| drawablep->isDead()
|
||||
|| !hasRenderType(drawablep->getRenderType()))
|
||||
|
|
@ -3461,7 +3422,6 @@ void renderSoundHighlights(LLDrawable* drawablep)
|
|||
|
||||
void LLPipeline::postSort(LLCamera& camera)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PIPELINE_POST_SORT);
|
||||
LLFastTimer ftm(FTM_STATESORT_POSTSORT);
|
||||
|
||||
assertInitialized();
|
||||
|
|
@ -3713,7 +3673,6 @@ void LLPipeline::postSort(LLCamera& camera)
|
|||
|
||||
void render_hud_elements()
|
||||
{
|
||||
LLMemType mt_rhe(LLMemType::MTYPE_PIPELINE_RENDER_HUD_ELS);
|
||||
LLFastTimer t(FTM_RENDER_UI);
|
||||
gPipeline.disableLights();
|
||||
|
||||
|
|
@ -3768,8 +3727,6 @@ void render_hud_elements()
|
|||
|
||||
void LLPipeline::renderHighlights()
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PIPELINE_RENDER_HL);
|
||||
|
||||
assertInitialized();
|
||||
|
||||
// Draw 3D UI elements here (before we clear the Z buffer in POOL_HUD)
|
||||
|
|
@ -3933,7 +3890,6 @@ U32 LLPipeline::sCurRenderPoolType = 0 ;
|
|||
|
||||
void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PIPELINE_RENDER_GEOM);
|
||||
LLFastTimer t(FTM_RENDER_GEOMETRY);
|
||||
|
||||
assertInitialized();
|
||||
|
|
@ -4185,7 +4141,6 @@ void LLPipeline::renderGeomDeferred(LLCamera& camera)
|
|||
{
|
||||
LLAppViewer::instance()->pingMainloopTimeout("Pipeline:RenderGeomDeferred");
|
||||
|
||||
LLMemType mt_rgd(LLMemType::MTYPE_PIPELINE_RENDER_GEOM_DEFFERRED);
|
||||
LLFastTimer t(FTM_RENDER_GEOMETRY);
|
||||
|
||||
LLFastTimer t2(FTM_DEFERRED_POOLS);
|
||||
|
|
@ -4282,7 +4237,6 @@ void LLPipeline::renderGeomDeferred(LLCamera& camera)
|
|||
|
||||
void LLPipeline::renderGeomPostDeferred(LLCamera& camera)
|
||||
{
|
||||
LLMemType mt_rgpd(LLMemType::MTYPE_PIPELINE_RENDER_GEOM_POST_DEF);
|
||||
LLFastTimer t(FTM_POST_DEFERRED_POOLS);
|
||||
U32 cur_type = 0;
|
||||
|
||||
|
|
@ -4378,7 +4332,6 @@ void LLPipeline::renderGeomPostDeferred(LLCamera& camera)
|
|||
|
||||
void LLPipeline::renderGeomShadow(LLCamera& camera)
|
||||
{
|
||||
LLMemType mt_rgs(LLMemType::MTYPE_PIPELINE_RENDER_GEOM_SHADOW);
|
||||
U32 cur_type = 0;
|
||||
|
||||
LLGLEnable cull(GL_CULL_FACE);
|
||||
|
|
@ -4532,8 +4485,6 @@ void LLPipeline::renderPhysicsDisplay()
|
|||
|
||||
void LLPipeline::renderDebug()
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PIPELINE);
|
||||
|
||||
assertInitialized();
|
||||
|
||||
gGL.color4f(1,1,1,1);
|
||||
|
|
@ -4859,7 +4810,6 @@ static LLFastTimer::DeclareTimer FTM_REBUILD_POOLS("Rebuild Pools");
|
|||
void LLPipeline::rebuildPools()
|
||||
{
|
||||
LLFastTimer t(FTM_REBUILD_POOLS);
|
||||
LLMemType mt(LLMemType::MTYPE_PIPELINE_REBUILD_POOLS);
|
||||
|
||||
assertInitialized();
|
||||
|
||||
|
|
@ -4899,8 +4849,6 @@ void LLPipeline::rebuildPools()
|
|||
|
||||
void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp )
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PIPELINE_QUICK_LOOKUP);
|
||||
|
||||
assertInitialized();
|
||||
|
||||
switch( new_poolp->getType() )
|
||||
|
|
@ -5066,7 +5014,6 @@ void LLPipeline::removePool( LLDrawPool* poolp )
|
|||
void LLPipeline::removeFromQuickLookup( LLDrawPool* poolp )
|
||||
{
|
||||
assertInitialized();
|
||||
LLMemType mt(LLMemType::MTYPE_PIPELINE);
|
||||
switch( poolp->getType() )
|
||||
{
|
||||
case LLDrawPool::POOL_SIMPLE:
|
||||
|
|
@ -6483,7 +6430,6 @@ void LLPipeline::doResetVertexBuffers()
|
|||
|
||||
void LLPipeline::renderObjects(U32 type, U32 mask, BOOL texture, BOOL batch_texture)
|
||||
{
|
||||
LLMemType mt_ro(LLMemType::MTYPE_PIPELINE_RENDER_OBJECTS);
|
||||
assertInitialized();
|
||||
gGL.loadMatrix(gGLModelView);
|
||||
gGLLastMatrix = NULL;
|
||||
|
|
@ -6556,7 +6502,6 @@ static LLFastTimer::DeclareTimer FTM_RENDER_BLOOM("Bloom");
|
|||
|
||||
void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
|
||||
{
|
||||
LLMemType mt_ru(LLMemType::MTYPE_PIPELINE_RENDER_BLOOM);
|
||||
if (!(gPipeline.canUseVertexShaders() &&
|
||||
sRenderGlow))
|
||||
{
|
||||
|
|
@ -9615,7 +9560,6 @@ static LLFastTimer::DeclareTimer FTM_IMPOSTOR_RESIZE("Impostor Resize");
|
|||
|
||||
void LLPipeline::generateImpostor(LLVOAvatar* avatar)
|
||||
{
|
||||
LLMemType mt_gi(LLMemType::MTYPE_PIPELINE_GENERATE_IMPOSTOR);
|
||||
LLGLState::checkStates();
|
||||
LLGLState::checkTextureChannels();
|
||||
LLGLState::checkClientArrays();
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@
|
|||
#include "lltut.h"
|
||||
#include "llbuffer.h"
|
||||
#include "llerror.h"
|
||||
#include "llmemtype.h"
|
||||
|
||||
|
||||
namespace tut
|
||||
|
|
|
|||
Loading…
Reference in New Issue