Removed unused image::set_pixel_format
Its use was dropped when I got rid of the window framebuffer surface. Also removed the image.hpp include from video.hpp.
This commit is contained in:
parent
3922a48c5c
commit
3c5eb48601
3 changed files with 0 additions and 40 deletions
|
@ -823,41 +823,6 @@ manager::~manager()
|
|||
flush_cache();
|
||||
}
|
||||
|
||||
static SDL_PixelFormat last_pixel_format;
|
||||
|
||||
void set_pixel_format(SDL_PixelFormat* format)
|
||||
{
|
||||
assert(format != nullptr);
|
||||
|
||||
SDL_PixelFormat& f = *format;
|
||||
SDL_PixelFormat& l = last_pixel_format;
|
||||
// if the pixel format change, we clear the cache,
|
||||
// because some images are now optimized for the wrong display format
|
||||
// FIXME: 8 bpp use palette, need to compare them. For now assume a change
|
||||
if(format->BitsPerPixel == 8
|
||||
|| f.BitsPerPixel != l.BitsPerPixel
|
||||
|| f.BytesPerPixel != l.BytesPerPixel
|
||||
|| f.Rmask != l.Rmask
|
||||
|| f.Gmask != l.Gmask
|
||||
|| f.Bmask != l.Bmask
|
||||
// || f.Amask != l.Amask This field in not checked, not sure why.
|
||||
|| f.Rloss != l.Rloss
|
||||
|| f.Gloss != l.Gloss
|
||||
|| f.Bloss != l.Bloss
|
||||
// || f.Aloss != l.Aloss This field in not checked, not sure why.
|
||||
|| f.Rshift != l.Rshift
|
||||
|| f.Gshift != l.Gshift
|
||||
|| f.Bshift != l.Bshift
|
||||
// || f.Ashift != l.Ashift This field in not checked, not sure why.
|
||||
)
|
||||
{
|
||||
LOG_DP << "detected a new display format\n";
|
||||
flush_cache();
|
||||
}
|
||||
|
||||
last_pixel_format = *format;
|
||||
}
|
||||
|
||||
void set_color_adjustment(int r, int g, int b)
|
||||
{
|
||||
if(r != red_adjust || g != green_adjust || b != blue_adjust) {
|
||||
|
|
|
@ -175,10 +175,6 @@ namespace image {
|
|||
|
||||
const std::vector<std::string>& get_team_colors();
|
||||
|
||||
///sets the pixel format used by the images. Is called every time the
|
||||
///video mode changes. Invalidates all images.
|
||||
void set_pixel_format(SDL_PixelFormat* format);
|
||||
|
||||
///sets the amount scaled images should be scaled. Invalidates all
|
||||
///scaled images.
|
||||
void set_zoom(unsigned int zoom);
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
#include "display.hpp"
|
||||
#include "floating_label.hpp"
|
||||
#include "font/constants.hpp"
|
||||
#include "image.hpp"
|
||||
#include "log.hpp"
|
||||
#include "ogl/utils.hpp"
|
||||
#include "preferences/general.hpp"
|
||||
|
|
Loading…
Add table
Reference in a new issue