diff options
author | reed@google.com <reed@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-01 14:31:16 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-01 14:31:16 +0000 |
commit | 2e2d0808af3afcbda6b2f0451a26189ee2bbbd1f (patch) | |
tree | baa7930b4564680b7651f6ef8f386842f7228d58 /skia | |
parent | 9ba307b26ca1005516bbef91a2c5c10ee60ea3ff (diff) | |
download | chromium_src-2e2d0808af3afcbda6b2f0451a26189ee2bbbd1f.zip chromium_src-2e2d0808af3afcbda6b2f0451a26189ee2bbbd1f.tar.gz chromium_src-2e2d0808af3afcbda6b2f0451a26189ee2bbbd1f.tar.bz2 |
remove calls to deprecated SkCanvas::setBitmapDevice.
Retry of 159477 but passes test again
Review URL: https://codereview.chromium.org/11019014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159485 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia')
-rw-r--r-- | skia/ext/skia_utils_mac_unittest.mm | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/skia/ext/skia_utils_mac_unittest.mm b/skia/ext/skia_utils_mac_unittest.mm index 7d9bc93..353c52a 100644 --- a/skia/ext/skia_utils_mac_unittest.mm +++ b/skia/ext/skia_utils_mac_unittest.mm @@ -113,6 +113,7 @@ void SkiaUtilsMacTest::TestSkBitmap(const SkBitmap& bitmap, bool isred) { EXPECT_GT(SkColorGetA(color), 245u); } +// setBitmapDevice has been deprecated/removed. Is this test still useful? void SkiaUtilsMacTest::RunBitLockerTest(BitLockerTest test) { const unsigned width = 2; const unsigned height = 2; @@ -123,11 +124,9 @@ void SkiaUtilsMacTest::RunBitLockerTest(BitLockerTest test) { memcpy(bits, original, sizeof(original)); SkBitmap bitmap; bitmap.setConfig(SkBitmap::kARGB_8888_Config, width, height); - if (!(test & TestNoBits)) { - bitmap.setPixels(bits); - } - SkCanvas canvas; - canvas.setBitmapDevice(bitmap); + bitmap.setPixels(bits); + + SkCanvas canvas(bitmap); if (test & TestTranslate) canvas.translate(width / 2, 0); if (test & TestClip) { @@ -142,8 +141,6 @@ void SkiaUtilsMacTest::RunBitLockerTest(BitLockerTest test) { CGRect cgRect = {{0, 0}, {width, height}}; CGContextFillRect(cgContext, cgRect); if (test & TestNoBits) { - bitmap.setPixels(bits); - canvas.setBitmapDevice(bitmap); if (test & TestClip) { SkRect clipRect = {0, height / 2, width, height}; canvas.clipRect(clipRect); |