From 3bc90179703b06dbdfaf3553faaab4a26c206ce6 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Tue, 27 Apr 2021 09:09:08 +0200 Subject: Slightly simplify gl_texture_fifo::compute_texture() The font size is set to the value necessary for the GL scene before computing the string width. Virtual Fl_Gl_Window_Driver::effective_size() becomes unnecessary. --- src/drivers/Cocoa/Fl_Cocoa_Gl_Window_Driver.cxx | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/drivers') diff --git a/src/drivers/Cocoa/Fl_Cocoa_Gl_Window_Driver.cxx b/src/drivers/Cocoa/Fl_Cocoa_Gl_Window_Driver.cxx index 84541e0fa..a11aca1e8 100644 --- a/src/drivers/Cocoa/Fl_Cocoa_Gl_Window_Driver.cxx +++ b/src/drivers/Cocoa/Fl_Cocoa_Gl_Window_Driver.cxx @@ -53,7 +53,6 @@ class Fl_Cocoa_Gl_Window_Driver : public Fl_Gl_Window_Driver { virtual void make_overlay_current(); virtual void redraw_overlay(); virtual void gl_start(); - virtual Fl_Fontsize effective_size(); virtual char *alpha_mask_for_string(const char *str, int n, int w, int h, Fl_Fontsize fs); virtual Fl_RGB_Image* capture_gl_rectangle(int x, int y, int w, int h); }; @@ -220,10 +219,6 @@ void Fl_Cocoa_Gl_Window_Driver::resize(int is_a_resize, int w, int h) { /* Some old Apple hardware doesn't implement the GL_EXT_texture_rectangle extension. For it, draw_string_legacy_glut() is used to draw text. */ -Fl_Fontsize Fl_Cocoa_Gl_Window_Driver::effective_size() { - return (Fl_Fontsize)round(fl_graphics_driver->size() * gl_scale); -} - char *Fl_Cocoa_Gl_Window_Driver::alpha_mask_for_string(const char *str, int n, int w, int h, Fl_Fontsize fs) { // write str to a bitmap just big enough -- cgit v1.2.3