mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 04:37:44 +00:00
LibGfx: Remove try_
prefix from bitmap creation functions
Those don't have any non-try counterpart, so we might as well just omit it.
This commit is contained in:
parent
1971bff314
commit
82a152b696
186 changed files with 598 additions and 598 deletions
|
@ -164,7 +164,7 @@ void paint_box_shadow(PaintContext& context, CSSPixelRect const& content_rect, B
|
|||
DevicePixelRect top_edge_rect { top_left_corner_rect.width(), 0, 1, horizontal_top_edge_width };
|
||||
DevicePixelRect bottom_edge_rect { bottom_left_corner_rect.width(), shadow_bitmap_rect.height() - horizontal_edge_width, 1, horizontal_edge_width };
|
||||
|
||||
auto shadows_bitmap = Gfx::Bitmap::try_create(Gfx::BitmapFormat::BGRA8888, shadow_bitmap_rect.size().to_type<int>());
|
||||
auto shadows_bitmap = Gfx::Bitmap::create(Gfx::BitmapFormat::BGRA8888, shadow_bitmap_rect.size().to_type<int>());
|
||||
if (shadows_bitmap.is_error()) {
|
||||
dbgln("Unable to allocate temporary bitmap {} for box-shadow rendering: {}", shadow_bitmap_rect, shadows_bitmap.error());
|
||||
return;
|
||||
|
@ -361,7 +361,7 @@ void paint_text_shadow(PaintContext& context, Layout::LineBoxFragment const& fra
|
|||
text_rect.height() + margin + margin
|
||||
};
|
||||
// FIXME: Figure out the maximum bitmap size for all shadows and then allocate it once and reuse it?
|
||||
auto maybe_shadow_bitmap = Gfx::Bitmap::try_create(Gfx::BitmapFormat::BGRA8888, bounding_rect.size().to_type<int>());
|
||||
auto maybe_shadow_bitmap = Gfx::Bitmap::create(Gfx::BitmapFormat::BGRA8888, bounding_rect.size().to_type<int>());
|
||||
if (maybe_shadow_bitmap.is_error()) {
|
||||
dbgln("Unable to allocate temporary bitmap {} for text-shadow rendering: {}", bounding_rect.size(), maybe_shadow_bitmap.error());
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue