Skip to content

Commit

Permalink
Properly size circular buffer
Browse files Browse the repository at this point in the history
In most cases, it should now use less memory and be faster to construct.
In the other cases, blurring used to be incorrect because the buffer was too small.
  • Loading branch information
AI0867 committed Nov 5, 2017
1 parent 23af2a3 commit 0df5fe8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sdl/utils.cpp
Expand Up @@ -1603,7 +1603,7 @@ surface blur_alpha_surface(const surface &surf, int depth)
depth = max_blur;
}

boost::circular_buffer<Uint32> queue(max_blur);
boost::circular_buffer<Uint32> queue(depth*2+1);

const Uint32 ff = 0xff;

Expand Down

0 comments on commit 0df5fe8

Please sign in to comment.