2 // Copyright (c) Microsoft. All rights reserved.
3 // This code is licensed under the MIT License (MIT).
4 // THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
5 // ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
6 // IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
7 // PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
9 // Developed by Minigraph
11 // Author: James Stanard
17 #include "TextRenderer.h"
21 namespace EngineProfiling
25 void BeginBlock(const std::wstring
& name
, CommandContext
* Context
= nullptr);
26 void EndBlock(CommandContext
* Context
= nullptr);
28 void DisplayFrameRate(TextContext
& Text
);
29 void DisplayPerfGraph(GraphicsContext
& Text
);
30 void Display(TextContext
& Text
, float x
, float y
, float w
, float h
);
38 ScopedTimer(const std::wstring
&) {}
39 ScopedTimer(const std::wstring
&, CommandContext
&) {}
45 ScopedTimer( const std::wstring
& name
) : m_Context(nullptr)
47 EngineProfiling::BeginBlock(name
);
49 ScopedTimer( const std::wstring
& name
, CommandContext
& Context
) : m_Context(&Context
)
51 EngineProfiling::BeginBlock(name
, m_Context
);
55 EngineProfiling::EndBlock(m_Context
);
59 CommandContext
* m_Context
;