mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-06 09:36:08 +00:00
LibWeb/Painting: Do not clip border radius when it is out of viewport
Painting optimization to do less unnecessary work.
This commit is contained in:
parent
b835d2bd66
commit
708574d373
Notes:
sideshowbarker
2024-07-17 16:23:55 +09:00
Author: https://github.com/kalenikaliaksandr
Commit: 708574d373
Pull-request: https://github.com/SerenityOS/serenity/pull/21487
3 changed files with 10 additions and 2 deletions
|
@ -482,6 +482,8 @@ CommandResult DrawTriangleWave::execute(CommandExecutionState& state) const
|
|||
|
||||
CommandResult SampleUnderCorners::execute(CommandExecutionState& state) const
|
||||
{
|
||||
if (state.would_be_fully_clipped_by_painter(corner_clipper->border_rect().to_type<int>()))
|
||||
return CommandResult::Continue;
|
||||
auto& painter = state.painter();
|
||||
corner_clipper->sample_under_corners(painter);
|
||||
return CommandResult::Continue;
|
||||
|
@ -489,6 +491,8 @@ CommandResult SampleUnderCorners::execute(CommandExecutionState& state) const
|
|||
|
||||
CommandResult BlitCornerClipping::execute(CommandExecutionState& state) const
|
||||
{
|
||||
if (state.would_be_fully_clipped_by_painter(corner_clipper->border_rect().to_type<int>()))
|
||||
return CommandResult::Continue;
|
||||
auto& painter = state.painter();
|
||||
corner_clipper->blit_corner_clipping(painter);
|
||||
return CommandResult::Continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue