[chromium] Do not multiply bounds by contentsScale in TiledLayerChromium and CanvasLa...
authordanakj@chromium.org <danakj@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Jun 2012 16:35:33 +0000 (16:35 +0000)
committerdanakj@chromium.org <danakj@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Jun 2012 16:35:33 +0000 (16:35 +0000)
commit114b563e95a8bc9462a5b0f33b5af48b9c1ea991
tree150acffb484c4f98a2e17cc1a21289eadeefcd0b
parentce8fd3fadfb4dcb15a514c685b7fe4677f57e7ef
[chromium] Do not multiply bounds by contentsScale in TiledLayerChromium and CanvasLayerTextureUpdater
https://bugs.webkit.org/show_bug.cgi?id=90103

Reviewed by Adrienne Walker.

Source/WebCore:

Non-integer scale factors can scale the bounds of a layer such that
different rounding is applied to the width and height in the content
bounds. We should never multiply bounds by contentsScale in order to
work correctly with non-integer scale factors. Instead, always use the
contentBounds/bounds ratio for width and height independently.

Tests: TiledLayerChromiumTest.nonIntegerContentsScaleIsNotDistortedDuringPaint
       TiledLayerChromiumTest.nonIntegerContentsScaleIsNotDistortedDuringInvalidation

* platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.cpp:
(WebCore::BitmapCanvasLayerTextureUpdater::prepareToUpdate):
* platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.h:
(BitmapCanvasLayerTextureUpdater):
* platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.cpp:
(WebCore::BitmapSkPictureCanvasLayerTextureUpdater::prepareToUpdate):
* platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h:
(BitmapSkPictureCanvasLayerTextureUpdater):
* platform/graphics/chromium/CanvasLayerTextureUpdater.cpp:
(WebCore::CanvasLayerTextureUpdater::paintContents):
* platform/graphics/chromium/CanvasLayerTextureUpdater.h:
(CanvasLayerTextureUpdater):
* platform/graphics/chromium/LayerTextureUpdater.h:
(WebCore::LayerTextureUpdater::prepareToUpdate):
* platform/graphics/chromium/ScrollbarLayerChromium.cpp:
(WebCore::ScrollbarLayerChromium::updatePart):
* platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.cpp:
(WebCore::SkPictureCanvasLayerTextureUpdater::prepareToUpdate):
* platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.h:
(SkPictureCanvasLayerTextureUpdater):
* platform/graphics/chromium/TiledLayerChromium.cpp:
(WebCore::TiledLayerChromium::setNeedsDisplayRect):
(WebCore::TiledLayerChromium::updateTiles):

Source/WebKit/chromium:

* tests/CCTiledLayerTestCommon.cpp:
(WebKitTests::FakeLayerTextureUpdater::prepareToUpdate):
* tests/CCTiledLayerTestCommon.h:
(FakeTiledLayerChromium):
* tests/TiledLayerChromiumTest.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@121436 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.cpp
Source/WebCore/platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.h
Source/WebCore/platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.cpp
Source/WebCore/platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h
Source/WebCore/platform/graphics/chromium/CanvasLayerTextureUpdater.cpp
Source/WebCore/platform/graphics/chromium/CanvasLayerTextureUpdater.h
Source/WebCore/platform/graphics/chromium/LayerTextureUpdater.h
Source/WebCore/platform/graphics/chromium/ScrollbarLayerChromium.cpp
Source/WebCore/platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.cpp
Source/WebCore/platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.h
Source/WebCore/platform/graphics/chromium/TiledLayerChromium.cpp
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/tests/CCTiledLayerTestCommon.cpp
Source/WebKit/chromium/tests/CCTiledLayerTestCommon.h
Source/WebKit/chromium/tests/TiledLayerChromiumTest.cpp