From 6ba02c44d02c27e65ca3997e5ce16465b218aa21 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Tue, 13 Nov 2018 23:08:51 -0500 Subject: [PATCH] Better binds buffer sizes. --- Outputs/OpenGL/ScanTarget.cpp | 5 ----- Outputs/OpenGL/ScanTarget.hpp | 8 +++++++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Outputs/OpenGL/ScanTarget.cpp b/Outputs/OpenGL/ScanTarget.cpp index 327aeff36..671d5ab6b 100644 --- a/Outputs/OpenGL/ScanTarget.cpp +++ b/Outputs/OpenGL/ScanTarget.cpp @@ -13,11 +13,6 @@ using namespace Outputs::Display::OpenGL; namespace { -constexpr int WriteAreaWidth = 2048; -constexpr int WriteAreaHeight = 2048; - -constexpr int LineBufferWidth = 2048; -constexpr int LineBufferHeight = 2048; /// The texture unit from which to source 1bpp input data. constexpr GLenum SourceData1BppTextureUnit = GL_TEXTURE0; diff --git a/Outputs/OpenGL/ScanTarget.hpp b/Outputs/OpenGL/ScanTarget.hpp index 7f5f0a203..c0377a50f 100644 --- a/Outputs/OpenGL/ScanTarget.hpp +++ b/Outputs/OpenGL/ScanTarget.hpp @@ -30,6 +30,12 @@ class ScanTarget: public Outputs::Display::ScanTarget { void draw(bool synchronous, int output_width, int output_height); private: + static constexpr int WriteAreaWidth = 2048; + static constexpr int WriteAreaHeight = 2048; + + static constexpr int LineBufferWidth = 2048; + static constexpr int LineBufferHeight = 2048; + // Outputs::Display::ScanTarget overrides. void set_modals(Modals) override; Scan *begin_scan() override; @@ -78,7 +84,7 @@ class ScanTarget: public Outputs::Display::ScanTarget { } end_points[2]; uint16_t line; }; - std::array line_buffer_; + std::array line_buffer_; TextureTarget unprocessed_line_texture_; Line *active_line_ = nullptr;