Changeset 79950 in webkit


Ignore:
Timestamp:
Feb 28, 2011 5:33:49 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-02-28 Noel Gordon <noel.gordon@gmail.com>

Reviewed by James Robinson.

[chromium] GradientSkia: use the common Gradient stop sorting methods.
https://bugs.webkit.org/show_bug.cgi?id=54625

Remove a FIXME: call the Gradient.cpp stop storting routines, no need
to duplicate that code herein.

No change in behavior, so no new tests.

  • platform/graphics/skia/GradientSkia.cpp: (WebCore::Gradient::platformGradient):
Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r79947 r79950  
     12011-02-28  Noel Gordon  <noel.gordon@gmail.com>
     2        Reviewed by James Robinson.
     3
     4        [chromium] GradientSkia: use the common Gradient stop sorting methods.
     5        https://bugs.webkit.org/show_bug.cgi?id=54625
     6
     7        Remove a FIXME: call the Gradient.cpp stop storting routines, no need
     8        to duplicate that code herein.
     9
     10        No change in behavior, so no new tests.
     11
     12        * platform/graphics/skia/GradientSkia.cpp:
     13        (WebCore::Gradient::platformGradient):
     14
    1152011-02-28  Steve Block  <steveblock@google.com>
    216
  • trunk/Source/WebCore/platform/graphics/skia/GradientSkia.cpp

    r79063 r79950  
    111111}
    112112
    113 static inline bool compareStops(const Gradient::ColorStop& a, const Gradient::ColorStop& b)
    114 {
    115     return a.stop < b.stop;
    116 }
    117 
    118113SkShader* Gradient::platformGradient()
    119114{
     
    121116        return m_gradient;
    122117
    123     // FIXME: This and compareStops() are also in Gradient.cpp and
    124     // CSSGradientValue.cpp; probably should refactor in WebKit.
    125     if (!m_stopsSorted) {
    126         if (m_stops.size())
    127             std::stable_sort(m_stops.begin(), m_stops.end(), compareStops);
    128         m_stopsSorted = true;
    129     }
     118    sortStopsIfNecessary();
     119    ASSERT(m_stopsSorted);
    130120
    131121    size_t countUsed = totalStopsNeeded(m_stops.data(), m_stops.size());
Note: See TracChangeset for help on using the changeset viewer.