Changeset 52539 in webkit


Ignore:
Timestamp:
Dec 23, 2009 6:23:38 PM (14 years ago)
Author:
eric@webkit.org
Message:

2009-12-23 Yuta Kitamura <yutak@chromium.org>

Reviewed by Eric Seidel.

PlatformContextSkia::beginLayerClippedToImage() needs to clip outside of the image.


This method should limit the current painting window to the bounds of the given
image, but it did not. Due to this bug, unnecessary contents were rendered in
some (limited) situations.

[Skia] PlatformContextSkia::beginLayerClippedToImage does not clip outside of the image
https://bugs.webkit.org/show_bug.cgi?id=32817


No new tests, because this is a fix of an existing test which is currently failing in
Chromium.

  • platform/graphics/skia/PlatformContextSkia.cpp: (PlatformContextSkia::beginLayerClippedToImage): Add clipRect() call.
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r52537 r52539  
     12009-12-23  Yuta Kitamura  <yutak@chromium.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        PlatformContextSkia::beginLayerClippedToImage() needs to clip outside of the image.
     6       
     7        This method should limit the current painting window to the bounds of the given
     8        image, but it did not. Due to this bug, unnecessary contents were rendered in
     9        some (limited) situations.
     10
     11        [Skia] PlatformContextSkia::beginLayerClippedToImage does not clip outside of the image
     12        https://bugs.webkit.org/show_bug.cgi?id=32817
     13       
     14        No new tests, because this is a fix of an existing test which is currently failing in
     15        Chromium.
     16
     17        * platform/graphics/skia/PlatformContextSkia.cpp:
     18        (PlatformContextSkia::beginLayerClippedToImage): Add clipRect() call.
     19
    1202009-12-23  Nikolas Zimmermann  <nzimmermann@rim.com>
    221
  • trunk/WebCore/platform/graphics/skia/PlatformContextSkia.cpp

    r51319 r52539  
    235235    SkRect bounds = { SkFloatToScalar(rect.x()), SkFloatToScalar(rect.y()),
    236236                      SkFloatToScalar(rect.right()), SkFloatToScalar(rect.bottom()) };
    237                      
     237
     238    canvas()->clipRect(bounds);
    238239    canvas()->saveLayerAlpha(&bounds, 255,
    239240                             static_cast<SkCanvas::SaveFlags>(SkCanvas::kHasAlphaLayer_SaveFlag | SkCanvas::kFullColorLayer_SaveFlag));
Note: See TracChangeset for help on using the changeset viewer.