Changeset 70389 in webkit


Ignore:
Timestamp:
Oct 23, 2010 8:08:40 AM (14 years ago)
Author:
Patrick Gansterer
Message:

2010-10-23 Patrick Gansterer <Patrick Gansterer>

Reviewed by David Kilzer.

Add Gradient::hasAlpha
https://bugs.webkit.org/show_bug.cgi?id=48183

WinCE can do some performance improvements if the gradient is opaque.

  • platform/graphics/Gradient.cpp: (WebCore::Gradient::hasAlpha):
  • platform/graphics/Gradient.h:
Location:
trunk/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r70388 r70389  
     12010-10-23  Patrick Gansterer  <paroga@webkit.org>
     2
     3        Reviewed by David Kilzer.
     4
     5        Add Gradient::hasAlpha
     6        https://bugs.webkit.org/show_bug.cgi?id=48183
     7
     8        WinCE can do some performance improvements if the gradient is opaque.
     9
     10        * platform/graphics/Gradient.cpp:
     11        (WebCore::Gradient::hasAlpha):
     12        * platform/graphics/Gradient.h:
     13
    1142010-10-23  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
    215
  • trunk/WebCore/platform/graphics/Gradient.cpp

    r67804 r70389  
    197197}
    198198
     199bool Gradient::hasAlpha() const
     200{
     201    for (size_t i = 0; i < m_stops.size(); i++) {
     202        if (m_stops[i].alpha < 1)
     203            return true;
     204    }
     205
     206    return false;
     207}
     208
    199209void Gradient::setSpreadMethod(GradientSpreadMethod spreadMethod)
    200210{
  • trunk/WebCore/platform/graphics/Gradient.h

    r67816 r70389  
    8888
    8989        void getColor(float value, float* r, float* g, float* b, float* a) const;
     90        bool hasAlpha() const;
    9091
    9192        bool isRadial() const { return m_radial; }
Note: See TracChangeset for help on using the changeset viewer.