diff options
author | reed@google.com <reed@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-01 13:50:10 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-01 13:50:10 +0000 |
commit | cbce3e40689fb9c48aad5d6a7b622756ac18dc2b (patch) | |
tree | b3b17a9890a2eacc49f7b9006704fbcf5525dc43 /skia/ext/skia_utils_mac_unittest.mm | |
parent | fd383c2eb1645db02399917a03e9d2ab926640c4 (diff) | |
download | chromium_src-cbce3e40689fb9c48aad5d6a7b622756ac18dc2b.zip chromium_src-cbce3e40689fb9c48aad5d6a7b622756ac18dc2b.tar.gz chromium_src-cbce3e40689fb9c48aad5d6a7b622756ac18dc2b.tar.bz2 |
Revert 159477 - remove reference to deprecated setBitmapDevice
this unblocks Skia DEPS roll
Review URL: https://codereview.chromium.org/11014019
TBR=reed@google.com
Review URL: https://codereview.chromium.org/11014023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159481 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia/ext/skia_utils_mac_unittest.mm')
-rw-r--r-- | skia/ext/skia_utils_mac_unittest.mm | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/skia/ext/skia_utils_mac_unittest.mm b/skia/ext/skia_utils_mac_unittest.mm index 1ced586..7d9bc93 100644 --- a/skia/ext/skia_utils_mac_unittest.mm +++ b/skia/ext/skia_utils_mac_unittest.mm @@ -126,7 +126,8 @@ void SkiaUtilsMacTest::RunBitLockerTest(BitLockerTest test) { if (!(test & TestNoBits)) { bitmap.setPixels(bits); } - SkCanvas canvas(bitmap); + SkCanvas canvas; + canvas.setBitmapDevice(bitmap); if (test & TestTranslate) canvas.translate(width / 2, 0); if (test & TestClip) { @@ -140,6 +141,14 @@ void SkiaUtilsMacTest::RunBitLockerTest(BitLockerTest test) { CGContextSetFillColorWithColor(cgContext, testColor); 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); + } + } } const unsigned results[][storageSize] = { {0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF}, // identity |