View: optimize Fill/StrokePolygon with raw points array argument
Converting points array to `BPolygon` has significant cost, including heap allocation, when drawing a lot of polygons. Change-Id: I81e6b4031bac4beadcc79412c58eedddffc00a82 Reviewed-on: https://review.haiku-os.org/c/haiku/+/10337 Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
@@ -40,7 +40,7 @@ private:
|
||||
|
||||
bool _AddPoints(const BPoint* points, int32 count,
|
||||
bool computeBounds);
|
||||
void _ComputeBounds();
|
||||
static BRect _ComputeBounds(const BPoint* points, uint32 count);
|
||||
void _MapPoint(BPoint* point, const BRect& source,
|
||||
const BRect& destination);
|
||||
void _MapRectangle(BRect* rect, const BRect& source,
|
||||
|
||||
Reference in New Issue
Block a user