diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2012-09-20 14:01:09 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-09-20 14:01:09 +0200 |
commit | 6dbcd09121fe266c7704a524b5cbd7f2754659c0 (patch) | |
tree | 5ae0d16cec0cc61f576d51c57b3a4613c7e91e22 /Source/WebKit/chromium/tests/PlatformContextSkiaTest.cpp | |
parent | 6bbb7fbbac94d0f511a7bd0cbd50854ab643bfb2 (diff) | |
download | qtwebkit-6dbcd09121fe266c7704a524b5cbd7f2754659c0.tar.gz |
Imported WebKit commit 080af0beaa6f0ba8ff8f44cb8bd8b5dcf75ac0af (http://svn.webkit.org/repository/webkit/trunk@129119)
New snapshot with prospective build fix for incorrect QtWebKit master module header file creation
Diffstat (limited to 'Source/WebKit/chromium/tests/PlatformContextSkiaTest.cpp')
-rw-r--r-- | Source/WebKit/chromium/tests/PlatformContextSkiaTest.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Source/WebKit/chromium/tests/PlatformContextSkiaTest.cpp b/Source/WebKit/chromium/tests/PlatformContextSkiaTest.cpp index eb2c07512..c73b6149a 100644 --- a/Source/WebKit/chromium/tests/PlatformContextSkiaTest.cpp +++ b/Source/WebKit/chromium/tests/PlatformContextSkiaTest.cpp @@ -830,4 +830,21 @@ TEST(PlatformContextSkiaTest, PreserveOpaqueOnlyMattersForFirstLayer) EXPECT_PIXELS_MATCH_EXACT(bitmap, platformContext.opaqueRegion().asRect()); } +#if defined(SK_SUPPORT_HINTING_SCALE_FACTOR) +TEST(PlatformContextSkiaTest, hintingScaleFactorAppliedOnPaint) +{ + SkBitmap bitmap; + SkCanvas canvas(bitmap); + + SkScalar hintingScale = SkIntToScalar(2); + PlatformContextSkia platformContext(&canvas); + platformContext.setHintingScaleFactor(hintingScale); + + SkPaint paint; + EXPECT_EQ(paint.getHintingScaleFactor(), SK_Scalar1); + platformContext.setupPaintCommon(&paint); + EXPECT_EQ(paint.getHintingScaleFactor(), hintingScale); +} +#endif + } // namespace |