RESOLVED FIXED 57371
Accelerated path drawing could be faster
https://bugs.webkit.org/show_bug.cgi?id=57371
Summary Accelerated path drawing could be faster
Stephen White
Reported 2011-03-29 11:57:08 PDT
The path drawing in accelerated Canvas2D is not as performant as it could be. In particular, it runs all polygons through the tesselator, even for simple convex polygons which don't need it.
Attachments
Patch (26.81 KB, patch)
2011-03-31 10:11 PDT, Stephen White
kbr: review+
Stephen White
Comment 1 2011-03-31 10:11:29 PDT
Kenneth Russell
Comment 2 2011-03-31 13:20:50 PDT
Comment on attachment 87755 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=87755&action=review Looks good. A couple of minor style issues, can fix upon landing. > Source/WebCore/platform/graphics/chromium/GLES2Canvas.cpp:559 > for (int i = 0; i < pathTesselation; ++i, t += tIncrement) { Style nit: now that the body is one line, no braces. > Source/WebCore/platform/graphics/chromium/GLES2Canvas.cpp:568 > for (int i = 0; i < pathTesselation; ++i, t += tIncrement) { No braces. > Source/WebCore/platform/graphics/gpu/LoopBlinnMathUtils.cpp:640 > + second = third; /* Remember ptr to current point. */ \ > + dprev = dcur; /* Remember current delta. */ \ What are these '\'s doing at the end of these lines? > Source/WebCore/platform/graphics/gpu/LoopBlinnMathUtils.cpp:650 > + second = third; /* Remember ptr to current point. */ \ > + dprev = dcur; /* Remember current delta. */ \ Same here.
Stephen White
Comment 3 2011-03-31 13:40:45 PDT
Comment on attachment 87755 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=87755&action=review Thanks for the review. >> Source/WebCore/platform/graphics/chromium/GLES2Canvas.cpp:559 >> for (int i = 0; i < pathTesselation; ++i, t += tIncrement) { > > Style nit: now that the body is one line, no braces. Fixed. >> Source/WebCore/platform/graphics/chromium/GLES2Canvas.cpp:568 >> for (int i = 0; i < pathTesselation; ++i, t += tIncrement) { > > No braces. Fixed. >> Source/WebCore/platform/graphics/gpu/LoopBlinnMathUtils.cpp:640 >> + dprev = dcur; /* Remember current delta. */ \ > > What are these '\'s doing at the end of these lines? Whoops! (This used to be inside a macro.) Fixed. >> Source/WebCore/platform/graphics/gpu/LoopBlinnMathUtils.cpp:650 >> + dprev = dcur; /* Remember current delta. */ \ > > Same here. Fixed.
Stephen White
Comment 4 2011-03-31 13:55:01 PDT
Note You need to log in before you can comment on or make changes to this bug.