mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-30 16:14:13 +00:00
parent
62848b1a68
commit
103236fdca
@ -470,7 +470,7 @@ Buffer *Session_component::realloc_buffer(Framebuffer::Mode mode, bool use_alpha
|
|||||||
{
|
{
|
||||||
typedef Pixel_rgb888 PT;
|
typedef Pixel_rgb888 PT;
|
||||||
|
|
||||||
_buffer_size = Chunky_texture<PT>::calc_num_bytes(mode.area, use_alpha);
|
size_t const buffer_size = Chunky_texture<PT>::calc_num_bytes(mode.area, use_alpha);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Preserve the content of the original buffer if nitpicker has
|
* Preserve the content of the original buffer if nitpicker has
|
||||||
@ -480,7 +480,7 @@ Buffer *Session_component::realloc_buffer(Framebuffer::Mode mode, bool use_alpha
|
|||||||
if (texture()) {
|
if (texture()) {
|
||||||
|
|
||||||
enum { PRESERVED_RAM = 128*1024 };
|
enum { PRESERVED_RAM = 128*1024 };
|
||||||
if (_env.pd().avail_ram().value > _buffer_size + PRESERVED_RAM) {
|
if (_env.pd().avail_ram().value > buffer_size + PRESERVED_RAM) {
|
||||||
src_texture = static_cast<Texture<PT> const *>(texture());
|
src_texture = static_cast<Texture<PT> const *>(texture());
|
||||||
} else {
|
} else {
|
||||||
warning("not enough RAM to preserve buffer content during resize");
|
warning("not enough RAM to preserve buffer content during resize");
|
||||||
@ -488,6 +488,9 @@ Buffer *Session_component::realloc_buffer(Framebuffer::Mode mode, bool use_alpha
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* set new buffer_size after _release_buffer(), which changes _buffer_size also */
|
||||||
|
_buffer_size = buffer_size;
|
||||||
|
|
||||||
Ram_quota const temporary_ram_upgrade = src_texture
|
Ram_quota const temporary_ram_upgrade = src_texture
|
||||||
? Ram_quota{_buffer_size} : Ram_quota{0};
|
? Ram_quota{_buffer_size} : Ram_quota{0};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user