diff options
author | reed@google.com <reed@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-02 15:56:30 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-02 15:56:30 +0000 |
commit | f47d8ca1c22207d5d2d0d34724bcc41ae72bbc1a (patch) | |
tree | 51804fd4f5ae58849e8224350263392662a67439 /skia | |
parent | 5ba847593e0009ed9e40be8fc9adfc1ffda93310 (diff) | |
download | chromium_src-f47d8ca1c22207d5d2d0d34724bcc41ae72bbc1a.zip chromium_src-f47d8ca1c22207d5d2d0d34724bcc41ae72bbc1a.tar.gz chromium_src-f47d8ca1c22207d5d2d0d34724bcc41ae72bbc1a.tar.bz2 |
setConfig is deprecated, use setInfo or allocPixels instead.
kPNColor_SkColorType is now kN32_SkColorType
TBR=
BUG=skia:2706
Review URL: https://codereview.chromium.org/363933002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@281044 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia')
-rw-r--r-- | skia/config/SkUserConfig.h | 8 | ||||
-rw-r--r-- | skia/ext/bitmap_platform_device_cairo.cc | 2 | ||||
-rw-r--r-- | skia/ext/bitmap_platform_device_skia.cc | 2 | ||||
-rw-r--r-- | skia/ext/bitmap_platform_device_win.cc | 2 | ||||
-rw-r--r-- | skia/ext/pixel_ref_utils_unittest.cc | 6 | ||||
-rw-r--r-- | skia/ext/skia_utils_ios.mm | 8 | ||||
-rw-r--r-- | skia/ext/vector_platform_device_emf_win.cc | 11 | ||||
-rw-r--r-- | skia/ext/vector_platform_device_emf_win.h | 5 |
8 files changed, 6 insertions, 38 deletions
diff --git a/skia/config/SkUserConfig.h b/skia/config/SkUserConfig.h index 4e99d1d..07a8ef8 100644 --- a/skia/config/SkUserConfig.h +++ b/skia/config/SkUserConfig.h @@ -257,14 +257,6 @@ SK_API void SkDebugf_FileLine(const char* file, int line, bool fatal, #define SK_SUPPORT_LEGACY_BITMAP_CONFIG #endif -#ifndef SK_SUPPORT_LEGACY_N32_NAME - #define SK_SUPPORT_LEGACY_N32_NAME -#endif - -#ifndef SK_SUPPORT_LEGACY_SETCONFIG - #define SK_SUPPORT_LEGACY_SETCONFIG -#endif - // ===== End Chrome-specific definitions ===== #endif diff --git a/skia/ext/bitmap_platform_device_cairo.cc b/skia/ext/bitmap_platform_device_cairo.cc index f685830..6d5d77c 100644 --- a/skia/ext/bitmap_platform_device_cairo.cc +++ b/skia/ext/bitmap_platform_device_cairo.cc @@ -169,7 +169,7 @@ BitmapPlatformDevice::~BitmapPlatformDevice() { SkBaseDevice* BitmapPlatformDevice::onCreateDevice(const SkImageInfo& info, Usage /*usage*/) { - SkASSERT(info.colorType() == kPMColor_SkColorType); + SkASSERT(info.colorType() == kN32_SkColorType); return BitmapPlatformDevice::Create(info.width(), info.height(), info.isOpaque()); } diff --git a/skia/ext/bitmap_platform_device_skia.cc b/skia/ext/bitmap_platform_device_skia.cc index a105c77..0255444 100644 --- a/skia/ext/bitmap_platform_device_skia.cc +++ b/skia/ext/bitmap_platform_device_skia.cc @@ -53,7 +53,7 @@ BitmapPlatformDevice::~BitmapPlatformDevice() { SkBaseDevice* BitmapPlatformDevice::onCreateDevice(const SkImageInfo& info, Usage /*usage*/) { - SkASSERT(info.colorType() == kPMColor_SkColorType); + SkASSERT(info.colorType() == kN32_SkColorType); return BitmapPlatformDevice::Create(info.width(), info.height(), info.isOpaque()); } diff --git a/skia/ext/bitmap_platform_device_win.cc b/skia/ext/bitmap_platform_device_win.cc index f526488..e10a6de 100644 --- a/skia/ext/bitmap_platform_device_win.cc +++ b/skia/ext/bitmap_platform_device_win.cc @@ -272,7 +272,7 @@ const SkBitmap& BitmapPlatformDevice::onAccessBitmap() { SkBaseDevice* BitmapPlatformDevice::onCreateDevice(const SkImageInfo& info, Usage /*usage*/) { - SkASSERT(info.colorType() == kPMColor_SkColorType); + SkASSERT(info.colorType() == kN32_SkColorType); return BitmapPlatformDevice::CreateAndClear(info.width(), info.height(), info.isOpaque()); } diff --git a/skia/ext/pixel_ref_utils_unittest.cc b/skia/ext/pixel_ref_utils_unittest.cc index 1a0ff96..bddbe65 100644 --- a/skia/ext/pixel_ref_utils_unittest.cc +++ b/skia/ext/pixel_ref_utils_unittest.cc @@ -63,11 +63,7 @@ class TestDiscardableShader : public SkShader { }; void CreateBitmap(gfx::Size size, const char* uri, SkBitmap* bitmap) { - const SkImageInfo info = { - size.width(), size.height(), kPMColor_SkColorType, kPremul_SkAlphaType - }; - - bitmap->allocPixels(info); + bitmap->allocN32Pixels(size.width(), size.height()); bitmap->pixelRef()->setImmutable(); bitmap->pixelRef()->setURI(uri); } diff --git a/skia/ext/skia_utils_ios.mm b/skia/ext/skia_utils_ios.mm index 6f4814a..87900b7 100644 --- a/skia/ext/skia_utils_ios.mm +++ b/skia/ext/skia_utils_ios.mm @@ -18,13 +18,7 @@ SkBitmap CGImageToSkBitmap(CGImageRef image, CGSize size, bool is_opaque) { if (!image) return bitmap; - bitmap.setConfig(SkBitmap::kARGB_8888_Config, - size.width, - size.height, - 0, - is_opaque ? kOpaque_SkAlphaType : kPremul_SkAlphaType); - - if (!bitmap.allocPixels()) + if (!bitmap.allocN32Pixels(size.width, size.height, is_opaque)) return bitmap; void* data = bitmap.getPixels(); diff --git a/skia/ext/vector_platform_device_emf_win.cc b/skia/ext/vector_platform_device_emf_win.cc index 31059af..af245cd 100644 --- a/skia/ext/vector_platform_device_emf_win.cc +++ b/skia/ext/vector_platform_device_emf_win.cc @@ -693,18 +693,9 @@ void VectorPlatformDeviceEmf::LoadClipRegion() { LoadClippingRegionToDC(hdc_, clip_region_, t); } -#ifdef SK_SUPPORT_LEGACY_COMPATIBLEDEVICE_CONFIG -SkBaseDevice* VectorPlatformDeviceEmf::onCreateCompatibleDevice( - SkBitmap::Config config, int width, int height, bool isOpaque, - Usage /*usage*/) { - SkASSERT(config == SkBitmap::kARGB_8888_Config); - return VectorPlatformDeviceEmf::CreateDevice(width, height, isOpaque, NULL); -} -#endif - SkBaseDevice* VectorPlatformDeviceEmf::onCreateDevice(const SkImageInfo& info, Usage /*usage*/) { - SkASSERT(info.colorType() == kPMColor_SkColorType); + SkASSERT(info.colorType() == kN32_SkColorType); return VectorPlatformDeviceEmf::CreateDevice( info.width(), info.height(), info.isOpaque(), NULL); } diff --git a/skia/ext/vector_platform_device_emf_win.h b/skia/ext/vector_platform_device_emf_win.h index 844624f..2d00940 100644 --- a/skia/ext/vector_platform_device_emf_win.h +++ b/skia/ext/vector_platform_device_emf_win.h @@ -79,11 +79,6 @@ class VectorPlatformDeviceEmf : public SkBitmapDevice, public PlatformDevice { void LoadClipRegion(); protected: -#ifdef SK_SUPPORT_LEGACY_COMPATIBLEDEVICE_CONFIG - virtual SkBaseDevice* onCreateCompatibleDevice(SkBitmap::Config, int width, - int height, bool isOpaque, - Usage usage) OVERRIDE; -#endif virtual SkBaseDevice* onCreateDevice(const SkImageInfo& info, Usage usage) OVERRIDE; |