0
0
mirror of https://github.com/yse/easy_profiler.git synced 2024-12-27 08:41:02 +08:00

Add colors header

This commit is contained in:
Sergey Yagovtsev 2016-03-03 15:35:23 +03:00
parent b422da141d
commit 9fa0b890d8
3 changed files with 23 additions and 2 deletions

20
include/profiler/color.h Normal file
View File

@ -0,0 +1,20 @@
#ifndef ____PROFILER_____COLOR_____H_____
#define ____PROFILER_____COLOR_____H_____
#include <stdint.h>
namespace profiler{
typedef uint16_t color_t; //16-bit RGB format (5-6-5)
namespace colors{
const color_t Red = 0xF800;
const color_t Green = 0x07E0;
const color_t Blue = 0x001F;
const color_t White = 0xFFFF;
const color_t Black = 0x0000;
}
}
#endif

View File

@ -160,6 +160,7 @@ void foo()
#include <stdint.h> #include <stdint.h>
#include <cstddef> #include <cstddef>
#include "profiler/color.h"
#ifdef _WIN32 #ifdef _WIN32
#ifdef _BUILD_PROFILER #ifdef _BUILD_PROFILER
@ -183,7 +184,6 @@ namespace profiler
typedef uint8_t block_type_t; typedef uint8_t block_type_t;
typedef uint64_t timestamp_t; typedef uint64_t timestamp_t;
typedef uint16_t color_t; //16-bit RGB format (5-6-5)
typedef uint32_t thread_id_t; typedef uint32_t thread_id_t;
const block_type_t BLOCK_TYPE_EVENT = 1; const block_type_t BLOCK_TYPE_EVENT = 1;

View File

@ -9,6 +9,7 @@ set(H_FILES
${ROOT}/include/profiler/profiler.h ${ROOT}/include/profiler/profiler.h
profile_manager.h profile_manager.h
spin_lock.h spin_lock.h
${ROOT}/include/profiler/color.h
) )
set(SOURCES set(SOURCES