Changeset 60548 in webkit


Ignore:
Timestamp:
Jun 2, 2010 2:01:49 AM (14 years ago)
Author:
eric@webkit.org
Message:

2010-06-02 Vangelis Kokkevis <vangelis@chromium.org>

Reviewed by Dimitri Glazkov.

[Chromium] Clamp dirtyRect updates of composited layer contents to the size
of the layer to avoid writing outside texture bounds.
https://bugs.webkit.org/show_bug.cgi?id=40030

  • platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::updateTextureContents):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r60547 r60548  
     12010-06-02  Vangelis Kokkevis  <vangelis@chromium.org>
     2
     3        Reviewed by Dimitri Glazkov.
     4
     5        [Chromium] Clamp dirtyRect updates of composited layer contents to the size
     6        of the layer to avoid writing outside texture bounds.
     7        https://bugs.webkit.org/show_bug.cgi?id=40030
     8
     9        * platform/graphics/chromium/LayerChromium.cpp:
     10        (WebCore::LayerChromium::updateTextureContents):
     11
    1122010-06-02  Yael Aharon  <yael.aharon@nokia.com>
    213
  • trunk/WebCore/platform/graphics/chromium/LayerChromium.cpp

    r60171 r60548  
    119119        OwnPtr<GraphicsContext> graphicsContext;
    120120        if (drawsContent()) { // Layer contents must be drawn into a canvas.
     121            // Clip the dirtyRect to the size of the layer to avoid drawing outside
     122            // the bounds of the backing texture.
     123            dirtyRect.intersect(IntRect(IntPoint(0, 0), m_bounds));
     124
    121125            canvas.set(new skia::PlatformCanvas(dirtyRect.width(), dirtyRect.height(), false));
    122126            skiaContext.set(new PlatformContextSkia(canvas.get()));
     
    136140            const SkBitmap& bitmap = canvas->getDevice()->accessBitmap(false);
    137141            skiaBitmap = &bitmap;
    138             requiredTextureSize = IntSize(max(m_bounds.width(), dirtyRect.width()),
    139                                           max(m_bounds.height(), dirtyRect.height()));
     142            requiredTextureSize = m_bounds;
    140143        } else { // Layer is a container.
    141144            // The layer contains an Image.
Note: See TracChangeset for help on using the changeset viewer.