#include <GUIBenchmark.h>
Public Member Functions | |
| CGUIBenchmark (const eC_UInt &uiWidth, const eC_UInt &uiHeight, const eC_UInt &uiStride, const eC_UByte &ubBitsPerPixel, eC_UByte *pkFramebuffer) | |
| void | AddTestFont (const eC_String &kFontName) |
| void | AddTestImage (const eC_String &kImageName) |
| void | AllOff () |
| void | AllOn () |
| void | Run () |
| void | SetBlitImg (const eC_Bool &bActive) |
| void | SetBlitImgExt (const eC_Bool &bActive) |
| void | SetBlitImgNinePatch (const eC_Bool &bActive) |
| void | SetBlitSubImage (const eC_Bool &bActive) |
| void | SetFillScreen (const eC_Bool &bActive) |
| void | SetFontForSummary (const eC_String &kFontName) |
| void | SetNumberOfBlits (const eC_UInt &uiNumberOfBlits) |
| void | SetNumberOfPrimitives (const eC_UInt &uiNumberOfPrimitives) |
| void | SetNumberOfRuns (const eC_UInt &uiNumberOfRuns) |
| void | SetNumberOfTexts (const eC_UInt &uiNumberOfTexts) |
| void | SetPrimitiveArc (const eC_Bool &bActive) |
| void | SetPrimitiveEllipse (const eC_Bool &bActive) |
| void | SetPrimitiveLine (const eC_Bool &bActive) |
| void | SetPrimitiveRect (const eC_Bool &bActive) |
| void | SetPrimitiveRing (const eC_Bool &bActive) |
| void | SetRotate (const eC_Bool &bActive) |
| void | SetRotateSubImage (const eC_Bool &bActive) |
| void | SetSummaryWaitTime (const eC_UInt &uiWaitTime) |
| void | SetTextLong (const eC_Bool &bActive) |
| void | SetTextMedium (const eC_Bool &bActive) |
| void | SetTextSingle (const eC_Bool &bActive) |
This class provides a small stub for doing benchmarks.
it can benchmark primitives (e.g. rect, ellipse...) as well as blitting with different types.
which benchmark are done can be set via the SetXXX()-methods or AllOn() and AllOff() the number of runs, primitives and blits which should be used can also be set. images which should be used for the blitting can be added with AddTestImage()
to use this class simply create an instance and execute Run()
Note: to use images for benchmarks these need to be accessible by the CGUIResourceManager, so either as files, within an resource-file or as a header-file compiled to the binary.
| CGUIBenchmark::CGUIBenchmark | ( | const eC_UInt & | uiWidth, |
| const eC_UInt & | uiHeight, | ||
| const eC_UInt & | uiStride, | ||
| const eC_UByte & | ubBitsPerPixel, | ||
| eC_UByte * | pkFramebuffer | ||
| ) |
Constructor
| uiWidth | width of the benchmark-area |
| uiHeight | height of the benchmark area |
| uiStride | stride of one line in bytes |
| ubBitsPerPixel | bit-depth |
| pkFramebuffer | pointer to framebuffers, if any |
| void CGUIBenchmark::AddTestFont | ( | const eC_String & | kFontName | ) |
Add a font to the tests
| kFontName | name of the font |
| void CGUIBenchmark::AddTestImage | ( | const eC_String & | kImageName | ) |
Add an image to the tests
| kImageName | name of the image |
|
inline |
set all benchmarks to inactive
|
inline |
set all benchmarks to active
| void CGUIBenchmark::Run | ( | ) |
Run all configured benchmarks using all added images
|
inline |
activate or de-activate benchmark for simple blit
| bActive | if true benchmark will be executed |
|
inline |
activate or de-activate benchmark for extended blit
| bActive | if true benchmark will be executed |
|
inline |
activate or de-activate benchmark for blit using nine-patches
| bActive | if true benchmark will be executed |
|
inline |
activate or de-activate benchmark for blit of sub-image
| bActive | if true benchmark will be executed |
|
inline |
activate or de-activate benchmark for screen-filling
| bActive | if true benchmark will be executed |
| void CGUIBenchmark::SetFontForSummary | ( | const eC_String & | kFontName | ) |
Sets the font which is used for the summary
| kFontName |
|
inline |
Set the number of blits which should be used
| uiNumberOfBlits |
|
inline |
Set the number primitives which should be used
| uiNumberOfPrimitives |
|
inline |
Set the number of runs
| uiNumberOfRuns |
|
inline |
Set the number text which should be printed
| uiNumberOfTexts |
|
inline |
activate or de-activate benchmark for arcs
| bActive | if true benchmark will be executed |
|
inline |
activate or de-activate benchmark for ellipses
| bActive | if true benchmark will be executed |
|
inline |
activate or de-activate benchmark for lines
| bActive | if true benchmark will be executed |
|
inline |
activate or de-activate benchmark for rectangles
| bActive | if true benchmark will be executed |
|
inline |
activate or de-activate benchmark for rings
| bActive | if true benchmark will be executed |
|
inline |
activate or de-activate benchmark for rotated blit
| bActive | if true benchmark will be executed |
|
inline |
activate or de-activate benchmark for rotated blit with sub-image
| bActive | if true benchmark will be executed |
| void CGUIBenchmark::SetSummaryWaitTime | ( | const eC_UInt & | uiWaitTime | ) |
Sets the number of seconds as the wait time for the summary
| uiWaitTime |
|
inline |
activate or de-activate benchmark for text with great length (50 - 200)
| bActive | if true benchmark will be executed |
|
inline |
activate or de-activate benchmark for text with medium length (10 - 50)
| bActive | if true benchmark will be executed |
|
inline |
activate or de-activate benchmark for text with single characters
| bActive | if true benchmark will be executed |