@@ -1392,6 +1392,7 @@ TEST_P(AiksTest, ColorWheel) {
1392
1392
1393
1393
auto callback = [&](AiksContext& renderer, RenderTarget& render_target) {
1394
1394
// UI state.
1395
+ static bool cache_the_wheel = true ;
1395
1396
static int current_blend_index = 3 ;
1396
1397
static float dst_alpha = 1 ;
1397
1398
static float src_alpha = 1 ;
@@ -1401,6 +1402,7 @@ TEST_P(AiksTest, ColorWheel) {
1401
1402
1402
1403
ImGui::Begin (" Controls" , nullptr , ImGuiWindowFlags_AlwaysAutoResize);
1403
1404
{
1405
+ ImGui::Checkbox (" Cache the wheel" , &cache_the_wheel);
1404
1406
ImGui::ListBox (" Blending mode" , ¤t_blend_index,
1405
1407
blend_mode_names.data (), blend_mode_names.size ());
1406
1408
ImGui::SliderFloat (" Source alpha" , &src_alpha, 0 , 1 );
@@ -1414,7 +1416,7 @@ TEST_P(AiksTest, ColorWheel) {
1414
1416
static Point content_scale;
1415
1417
Point new_content_scale = GetContentScale ();
1416
1418
1417
- if (new_content_scale != content_scale) {
1419
+ if (!cache_the_wheel || new_content_scale != content_scale) {
1418
1420
content_scale = new_content_scale;
1419
1421
1420
1422
// Render the color wheel to an image.
0 commit comments