Changeset 37460 in webkit


Ignore:
Timestamp:
Oct 9, 2008 7:26:54 PM (15 years ago)
Author:
eric@webkit.org
Message:

Reviewed by Oliver Hunt.

Fix Canvex DOOM Game
Gradient clips were not getting cleared after filling the
gradient, this was causing nothing to draw in Canvex
https://bugs.webkit.org/show_bug.cgi?id=21498

Tests forthcoming.

  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::fillPath): (WebCore::GraphicsContext::strokePath): (WebCore::GraphicsContext::fillRect):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r37456 r37460  
     12008-10-09  Eric Seidel  <eric@webkit.org>
     2
     3        Reviewed by Oliver Hunt.
     4
     5        Fix Canvex DOOM Game
     6        Gradient clips were not getting cleared after filling the
     7        gradient, this was causing nothing to draw in Canvex
     8        https://bugs.webkit.org/show_bug.cgi?id=21498
     9       
     10        Tests forthcoming.
     11
     12        * WebCore.xcodeproj/project.pbxproj:
     13        * platform/graphics/cg/GraphicsContextCG.cpp:
     14        (WebCore::GraphicsContext::fillPath):
     15        (WebCore::GraphicsContext::strokePath):
     16        (WebCore::GraphicsContext::fillRect):
     17
    1182008-10-09  Eric Seidel  <eric@webkit.org>
    219
  • trunk/WebCore/platform/graphics/cg/GraphicsContextCG.cpp

    r37456 r37460  
    494494        break;
    495495    case GradientColorSpace:
     496        CGContextSaveGState(context);
    496497        if (fillRule() == RULE_EVENODD)
    497498            CGContextEOClip(context);
     
    499500            CGContextClip(context);
    500501        CGContextDrawShading(context, m_common->state.fillGradient->platformGradient());
     502        CGContextRestoreGState(context);
    501503        break;
    502504    }
     
    519521        break;
    520522    case GradientColorSpace:
     523        CGContextSaveGState(context);
    521524        CGContextReplacePathWithStrokedPath(context);
    522525        CGContextClip(context);
    523526        CGContextDrawShading(context, m_common->state.strokeGradient->platformGradient());
     527        CGContextRestoreGState(context);
    524528        break;
    525529    }
     
    530534    if (paintingDisabled())
    531535        return;
     536    CGContextRef context = platformContext();
    532537    switch (m_common->state.fillColorSpace) {
    533538    case SolidColorSpace:
    534539        if (fillColor().alpha())
    535             CGContextFillRect(platformContext(), rect);
     540            CGContextFillRect(context, rect);
    536541        break;
    537542    case PatternColorSpace:
    538543        applyFillPattern(this, m_common->state.fillPattern.get());
    539         CGContextFillRect(platformContext(), rect);
     544        CGContextFillRect(context, rect);
    540545        break;
    541546    case GradientColorSpace:
    542         clip(rect);
    543         CGContextDrawShading(platformContext(), m_common->state.fillGradient->platformGradient());
     547        CGContextSaveGState(context);
     548        CGContextClipToRect(context, rect);
     549        CGContextDrawShading(context, m_common->state.fillGradient->platformGradient());
     550        CGContextRestoreGState(context);
    544551        break;
    545552    }
Note: See TracChangeset for help on using the changeset viewer.