PageRenderTime 43ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 0ms

/indra/newview/lltextureinfo.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 74 lines | 40 code | 9 blank | 25 comment | 0 complexity | 54f0da106c4337ab994a7ac163e27b1f MD5 | raw file
Possible License(s): LGPL-2.1
  1. /**
  2. * @file lltextureinfo.h
  3. * @brief Object for managing texture information.
  4. *
  5. * $LicenseInfo:firstyear=2000&license=viewerlgpl$
  6. * Second Life Viewer Source Code
  7. * Copyright (C) 2010, Linden Research, Inc.
  8. *
  9. * This library is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU Lesser General Public
  11. * License as published by the Free Software Foundation;
  12. * version 2.1 of the License only.
  13. *
  14. * This library is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  17. * Lesser General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU Lesser General Public
  20. * License along with this library; if not, write to the Free Software
  21. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  22. *
  23. * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
  24. * $/LicenseInfo$
  25. */
  26. #ifndef LL_LLTEXTUREINFO_H
  27. #define LL_LLTEXTUREINFO_H
  28. #include "lluuid.h"
  29. #include "lltextureinfodetails.h"
  30. #include <map>
  31. class LLTextureInfo
  32. {
  33. public:
  34. LLTextureInfo();
  35. ~LLTextureInfo();
  36. void setUpLogging(bool writeToViewerLog, bool sendToSim, U32 textureLogThreshold);
  37. bool has(const LLUUID& id);
  38. void setRequestStartTime(const LLUUID& id, U64 startTime);
  39. void setRequestSize(const LLUUID& id, U32 size);
  40. void setRequestOffset(const LLUUID& id, U32 offset);
  41. void setRequestType(const LLUUID& id, LLTextureInfoDetails::LLRequestType type);
  42. void setRequestCompleteTimeAndLog(const LLUUID& id, U64 completeTime);
  43. U32 getRequestStartTime(const LLUUID& id);
  44. U32 getRequestSize(const LLUUID& id);
  45. U32 getRequestOffset(const LLUUID& id);
  46. LLTextureInfoDetails::LLRequestType getRequestType(const LLUUID& id);
  47. U32 getRequestCompleteTime(const LLUUID& id);
  48. void resetTextureStatistics();
  49. U32 getTextureInfoMapSize();
  50. LLSD getAverages();
  51. private:
  52. void addRequest(const LLUUID& id);
  53. std::map<LLUUID, LLTextureInfoDetails *> mTextures;
  54. LLSD mAverages;
  55. bool mLogTextureDownloadsToViewerLog;
  56. bool mLogTextureDownloadsToSimulator;
  57. S32 mTotalBytes;
  58. S32 mTotalMilliseconds;
  59. S32 mTextureDownloadsStarted;
  60. S32 mTextureDownloadsCompleted;
  61. std::string mTextureDownloadProtocol;
  62. U32 mTextureLogThreshold; // in bytes
  63. U64 mCurrentStatsBundleStartTime;
  64. };
  65. #endif // LL_LLTEXTUREINFO_H