⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 287879 in webkit


Ignore:
Timestamp:
Jan 11, 2022, 7:41:14 AM (5 years ago)
Author:
weinig@apple.com
Message:

Remove AppleTV specific disabling of conic gradients, its not necessary
https://bugs.webkit.org/show_bug.cgi?id=235041

Reviewed by Darin Adler.

Source/WebCore:

There doesn't seem to be any reason to disable conic gradients on AppleTV. We do still
need to disable it on windows, but rather than hard coding this in WebCore, use a new
HAVE macro to conditionalize the code.

  • platform/graphics/cg/GradientCG.cpp:

(WebCore::Gradient::paint):

  • platform/graphics/cg/GradientRendererCG.cpp:

(WebCore::GradientRendererCG::drawConicGradient):

Source/WTF:

Add HAVE_CORE_GRAPHICS_CONIC_GRADIENTS macro and use it to control ENABLE_CSS_CONIC_GRADIENTS.

  • wtf/PlatformEnableCocoa.h:
  • wtf/PlatformHave.h:
Location:
trunk/Source
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r287848 r287879  
     12022-01-11  Sam Weinig  <weinig@apple.com>
     2
     3        Remove AppleTV specific disabling of conic gradients, its not necessary
     4        https://bugs.webkit.org/show_bug.cgi?id=235041
     5
     6        Reviewed by Darin Adler.
     7
     8        Add HAVE_CORE_GRAPHICS_CONIC_GRADIENTS macro and use it to control ENABLE_CSS_CONIC_GRADIENTS.
     9
     10        * wtf/PlatformEnableCocoa.h:
     11        * wtf/PlatformHave.h:
     12
    1132022-01-10  Alex Christensen  <achristensen@webkit.org>
    214
  • trunk/Source/WTF/wtf/PlatformEnableCocoa.h

    r287831 r287879  
    180180#endif
    181181
    182 // FIXME: Seems likely this can be enabled for tvOS.
    183 #if !defined(ENABLE_CSS_CONIC_GRADIENTS) && !PLATFORM(APPLETV)
     182#if !defined(ENABLE_CSS_CONIC_GRADIENTS)
    184183#define ENABLE_CSS_CONIC_GRADIENTS 1
    185184#endif
  • trunk/Source/WTF/wtf/PlatformHave.h

    r287848 r287879  
    918918#define HAVE_CORE_GRAPHICS_ROMMRGB_COLOR_SPACE 1
    919919#define HAVE_CORE_GRAPHICS_XYZ_COLOR_SPACE 1
     920#define HAVE_CORE_GRAPHICS_CONIC_GRADIENTS 1
    920921#endif
    921922
  • trunk/Source/WebCore/ChangeLog

    r287878 r287879  
     12022-01-11  Sam Weinig  <weinig@apple.com>
     2
     3        Remove AppleTV specific disabling of conic gradients, its not necessary
     4        https://bugs.webkit.org/show_bug.cgi?id=235041
     5
     6        Reviewed by Darin Adler.
     7
     8        There doesn't seem to be any reason to disable conic gradients on AppleTV. We do still
     9        need to disable it on windows, but rather than hard coding this in WebCore, use a new
     10        HAVE macro to conditionalize the code.
     11
     12        * platform/graphics/cg/GradientCG.cpp:
     13        (WebCore::Gradient::paint):
     14        * platform/graphics/cg/GradientRendererCG.cpp:
     15        (WebCore::GradientRendererCG::drawConicGradient):
     16
    1172022-01-11  Tim Nguyen  <ntim@apple.com>
    218
  • trunk/Source/WebCore/platform/graphics/cg/GradientCG.cpp

    r287411 r287879  
    161161        },
    162162        [&] (const ConicData& data) {
    163 // FIXME: Seems like this should be HAVE(CG_CONTEXT_DRAW_CONIC_GRADIENT).
    164 // FIXME: Can we change tvOS to be like the other Cocoa platforms?
    165 #if PLATFORM(COCOA) && !PLATFORM(APPLETV)
     163#if HAVE(CORE_GRAPHICS_CONIC_GRADIENTS)
    166164            CGContextSaveGState(platformContext);
    167165            CGContextTranslateCTM(platformContext, data.point0.x(), data.point0.y());
  • trunk/Source/WebCore/platform/graphics/cg/GradientRendererCG.cpp

    r287552 r287879  
    685685void GradientRendererCG::drawConicGradient(CGContextRef platformContext, CGPoint center, CGFloat angle)
    686686{
    687 // FIXME: Seems like this should be HAVE(CG_CONTEXT_DRAW_CONIC_GRADIENT).
    688 // FIXME: Can we change tvOS to be like the other Cocoa platforms?
    689 #if PLATFORM(COCOA) && !PLATFORM(APPLETV)
     687#if HAVE(CORE_GRAPHICS_CONIC_GRADIENTS)
    690688    WTF::switchOn(m_strategy,
    691689        [&] (Gradient& gradient) {
Note: See TracChangeset for help on using the changeset viewer.