Commit 85eba253 authored by reed@google.com's avatar reed@google.com

SkBitmap::Config is deprecated, switch to using SkColorType

BUG=

Review URL: https://codereview.chromium.org/183833011

git-svn-id: svn://svn.chromium.org/blink/trunk@168504 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 5e4a452e
...@@ -103,7 +103,7 @@ PassOwnPtr<DragImage> DragImage::create(Image* image, RespectImageOrientationEnu ...@@ -103,7 +103,7 @@ PassOwnPtr<DragImage> DragImage::create(Image* image, RespectImageOrientationEnu
} }
SkBitmap skBitmap; SkBitmap skBitmap;
if (!bitmap->bitmap().copyTo(&skBitmap, SkBitmap::kARGB_8888_Config)) if (!bitmap->bitmap().copyTo(&skBitmap, kPMColor_SkColorType))
return nullptr; return nullptr;
return adoptPtr(new DragImage(skBitmap, deviceScaleFactor)); return adoptPtr(new DragImage(skBitmap, deviceScaleFactor));
} }
......
...@@ -313,7 +313,7 @@ PassOwnPtr<ScaledImageFragment> ImageFrameGenerator::decode(size_t index, ImageD ...@@ -313,7 +313,7 @@ PassOwnPtr<ScaledImageFragment> ImageFrameGenerator::decode(size_t index, ImageD
// This is confusing and should be cleaned up when we can deprecate the use // This is confusing and should be cleaned up when we can deprecate the use
// case for Android discardable memory. // case for Android discardable memory.
SkBitmap copyBitmap; SkBitmap copyBitmap;
if (!fullSizeBitmap.copyTo(&copyBitmap, fullSizeBitmap.config(), m_discardableAllocator.get())) if (!fullSizeBitmap.copyTo(&copyBitmap, fullSizeBitmap.colorType(), m_discardableAllocator.get()))
return nullptr; return nullptr;
if (isCacheComplete) if (isCacheComplete)
......
...@@ -100,7 +100,7 @@ bool ImageFrame::copyBitmapData(const ImageFrame& other) ...@@ -100,7 +100,7 @@ bool ImageFrame::copyBitmapData(const ImageFrame& other)
m_hasAlpha = other.m_hasAlpha; m_hasAlpha = other.m_hasAlpha;
m_bitmap->bitmap().reset(); m_bitmap->bitmap().reset();
const NativeImageSkia* otherBitmap = other.m_bitmap.get(); const NativeImageSkia* otherBitmap = other.m_bitmap.get();
return otherBitmap->bitmap().copyTo(&m_bitmap->bitmap(), otherBitmap->bitmap().config()); return otherBitmap->bitmap().copyTo(&m_bitmap->bitmap(), otherBitmap->bitmap().colorType());
} }
bool ImageFrame::setSize(int newWidth, int newHeight) bool ImageFrame::setSize(int newWidth, int newHeight)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment