From b04daca98e843b4818171c8af560abf3d5a4a676 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sun, 9 Feb 2020 19:13:21 -0500 Subject: [PATCH] Picks a safer default construction. --- Outputs/OpenGL/ScanTarget.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Outputs/OpenGL/ScanTarget.hpp b/Outputs/OpenGL/ScanTarget.hpp index 46300a0ce..f7eeb816e 100644 --- a/Outputs/OpenGL/ScanTarget.hpp +++ b/Outputs/OpenGL/ScanTarget.hpp @@ -108,7 +108,7 @@ class ScanTarget: public Outputs::Display::ScanTarget { // The sizes below might be less hassle as something more natural like ints, // but squeezing this struct into 64 bits makes the std::atomics more likely // to be lock free; they are under LLVM x86-64. - int write_area = 0; + int write_area = 1; // By convention this points to the vended area. Which is preceded by a guard pixel. So a sensible default construction is write_area = 1. uint16_t scan_buffer = 0; uint16_t line = 0; };