Bug 24685 - Use Skia integer primitives for drawing Chromium Linux scrollbars
Summary: Use Skia integer primitives for drawing Chromium Linux scrollbars
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2009-03-18 16:54 PDT by Adam Langley
Modified: 2009-03-24 17:03 PDT (History)
0 users

See Also:

patch (6.88 KB, patch)
2009-03-18 16:55 PDT, Adam Langley
fishd: review-
Details | Formatted Diff | Diff
patch (7.13 KB, patch)
2009-03-24 16:37 PDT, Adam Langley
fishd: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Langley 2009-03-18 16:54:00 PDT
The Skia drawLine function takes subpixel values and attempts to draw
a line with subpixel precision. This is complex and slow for drawing
scrollbars which use only vertical and horizontal lines.

This changes the Chromium Linux scrollbar code to use drawIRect.

Layout test changes will be in the Chromium tree.
Comment 1 Adam Langley 2009-03-18 16:55:00 PDT
Created attachment 28737 [details]
Comment 2 Darin Fisher (:fishd, Google) 2009-03-23 11:40:21 PDT
Comment on attachment 28737 [details]

> +static void drawVertLine(SkCanvas* canvas, int x, int y1, int y2, const SkPaint& paint) {
> +  SkIRect skrect;
> +  skrect.set(x, y1, x + 1, y2 + 1);
> +  canvas->drawIRect(skrect, paint);
> +}

nit: please use webkit style (4 space indent, bracket on newline).  there are a lot of
these style violations in this patch as well as in the previous file.  please fix :)
Comment 3 Adam Langley 2009-03-24 16:37:15 PDT
Created attachment 28917 [details]
Comment 4 Darin Fisher (:fishd, Google) 2009-03-24 17:03:10 PDT
Landed as:  http://trac.webkit.org/changeset/41960