Changeset 104609 in webkit


Ignore:
Timestamp:
Jan 10, 2012, 11:50:40 AM (13 years ago)
Author:
reed@google.com
Message:

[skia] not all convex paths are convex, so recompute convexity for the problematic ones
https://bugs.webkit.org/show_bug.cgi?id=75960

Reviewed by Stephen White.

No new tests.
See related chrome issue
http://code.google.com/p/chromium/issues/detail?id=108605

  • platform/graphics/skia/GraphicsContextSkia.cpp:

(WebCore::setPathFromConvexPoints):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r104604 r104609  
     12012-01-10  Mike Reed  <reed@google.com>
     2
     3        [skia] not all convex paths are convex, so recompute convexity for the problematic ones
     4        https://bugs.webkit.org/show_bug.cgi?id=75960
     5
     6        Reviewed by Stephen White.
     7
     8        No new tests.
     9        See related chrome issue
     10        http://code.google.com/p/chromium/issues/detail?id=108605
     11
     12        * platform/graphics/skia/GraphicsContextSkia.cpp:
     13        (WebCore::setPathFromConvexPoints):
     14
    1152012-01-10  Gavin Barraclough  <barraclough@apple.com>
    216
  • trunk/Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp

    r97971 r104609  
    441441                     WebCoreFloatToSkScalar(points[i].y()));
    442442    }
    443     path->setIsConvex(true);
     443
     444    /*  The code used to just blindly call this
     445            path->setIsConvex(true);
     446        But webkit can sometimes send us non-convex 4-point values, so we mark the path's
     447        convexity as unknown, so it will get computed by skia at draw time.
     448        See crbug.com 108605
     449    */
     450    SkPath::Convexity convexity = SkPath::kConvex_Convexity;
     451    if (numPoints == 4)
     452        convexity = SkPath::kUnknown_Convexity;
     453    path->setConvexity(convexity);
    444454}
    445455
Note: See TracChangeset for help on using the changeset viewer.