Chrysalis - Renderer Test Coverage


renderer/
File: renderer/src/CursorRenderer.cpp
Date: 2026-08-27 18:35:31
Lines:
0/21
0.0%
Functions:
0/5
0.0%
Branches:
0/18
0.0%
Decisions:
0/6
0.0%
Calls:
0/125
0.0%

Line Branch Decision Call Exec Source
1 #include "CursorRenderer.h"
2
3 using namespace Chrysalis;
4
5
0/1
✗ Call 0 not invoked.
✗ CursorRenderer::CursorRenderer(MainOpenGLProgram* program, CursorRendererData* data)
6
0/17
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
✗ Call 4 not invoked.
✗ Call 5 not invoked.
✗ Call 6 not invoked.
✗ Call 7 not invoked.
✗ Call 8 not invoked.
✗ Call 9 not invoked.
✗ Call 10 not invoked.
✗ Call 11 not invoked.
✗ Call 12 not invoked.
✗ Call 13 not invoked.
✗ Call 14 not invoked.
✗ Call 15 not invoked.
✗ Call 16 not invoked.
✗ : BaseAnimatedRenderer(data), program_(program) {}
7
8 ✗ void CursorRenderer::draw() {
9
0/10
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
✗ Call 4 not invoked.
✗ Call 5 not invoked.
✗ Call 6 not invoked.
✗ Call 7 not invoked.
✗ Call 8 not invoked.
✗ Call 9 not invoked.
✗ program_->setColor(1.f, 1.f, 1.f, opacity_);
10
0/27
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
✗ Call 4 not invoked.
✗ Call 5 not invoked.
✗ Call 6 not invoked.
✗ Call 7 not invoked.
✗ Call 8 not invoked.
✗ Call 9 not invoked.
✗ Call 10 not invoked.
✗ Call 11 not invoked.
✗ Call 12 not invoked.
✗ Call 13 not invoked.
✗ Call 14 not invoked.
✗ Call 15 not invoked.
✗ Call 16 not invoked.
✗ Call 17 not invoked.
✗ Call 18 not invoked.
✗ Call 19 not invoked.
✗ Call 20 not invoked.
✗ Call 21 not invoked.
✗ Call 22 not invoked.
✗ Call 23 not invoked.
✗ Call 24 not invoked.
✗ Call 25 not invoked.
✗ Call 26 not invoked.
✗ glDrawArrays(GL_LINES, 0, data_->size());
11 ✗ }
12
13 ✗ void CursorRenderer::hideCursor() {
14
0/4
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
✗ displayCursor_ = false;
15 ✗ }
16
17 ✗ void CursorRenderer::displayCursor(const float x, const float y) {
18
0/4
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
✗ displayCursor_ = true;
19
0/9
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
✗ Call 4 not invoked.
✗ Call 5 not invoked.
✗ Call 6 not invoked.
✗ Call 7 not invoked.
✗ Call 8 not invoked.
✗ data_->projectCursor(x, y);
20 ✗ }
21
22 ✗ void CursorRenderer::prepareNextFrame(int64_t startTime, const int64_t previousFrameTime, const int64_t currentFrameTime) {
23 static constexpr float duration = 300.f;
24
0/4
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
✗ const float target = displayCursor_ ? 1.f : 0.f;
25
0/2
✗ Decision 'true' not taken.
✗ Decision 'false' not taken.
0/7
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 7 not invoked.
✗ Call 8 not invoked.
✗ Call 9 not invoked.
✗ Call 10 not invoked.
✗ if (displayCursor_ && opacity_ < target) {
26 // Cursor in
27
0/13
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
✗ Call 4 not invoked.
✗ Call 5 not invoked.
✗ Call 6 not invoked.
✗ Call 7 not invoked.
✗ Call 8 not invoked.
✗ Call 9 not invoked.
✗ Call 10 not invoked.
✗ Call 11 not invoked.
✗ Call 12 not invoked.
✗ opacity_ = std::min(target, opacity_ + (currentFrameTime - previousFrameTime) / duration);
28
0/2
✗ Decision 'true' not taken.
✗ Decision 'false' not taken.
0/7
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 7 not invoked.
✗ Call 8 not invoked.
✗ Call 9 not invoked.
✗ Call 10 not invoked.
✗ } else if (!displayCursor_ && opacity_ > target) {
29 // Cursor out
30
0/13
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
✗ Call 4 not invoked.
✗ Call 5 not invoked.
✗ Call 6 not invoked.
✗ Call 7 not invoked.
✗ Call 8 not invoked.
✗ Call 9 not invoked.
✗ Call 10 not invoked.
✗ Call 11 not invoked.
✗ Call 12 not invoked.
✗ opacity_ = std::max(target, opacity_ - (currentFrameTime - previousFrameTime) / duration);
31 }
32
0/2
✗ Decision 'true' not taken.
✗ Decision 'false' not taken.
0/9
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
✗ Call 6 not invoked.
✗ Call 7 not invoked.
✗ Call 8 not invoked.
✗ Call 9 not invoked.
✗ Call 10 not invoked.
✗ if (opacity_ == target) complete();
33 ✗ }
34