Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1921)

Unified Diff: Source/platform/graphics/GraphicsContext.cpp

Issue 201213002: Remove uses of SkBitmap::Config (deprecated) from core/ and platform/. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/platform/graphics/GraphicsContext.cpp
diff --git a/Source/platform/graphics/GraphicsContext.cpp b/Source/platform/graphics/GraphicsContext.cpp
index 3e9d6602fab72d5a902791d958f0e90c48af665b..bae0eef0c1d881408d328b430629671e9042b196 100644
--- a/Source/platform/graphics/GraphicsContext.cpp
+++ b/Source/platform/graphics/GraphicsContext.cpp
@@ -780,9 +780,7 @@ void GraphicsContext::drawLineForDocumentMarker(const FloatPoint& pt, float widt
const int rowPixels = 4 * deviceScaleFactor;
const int colPixels = 3 * deviceScaleFactor;
misspellBitmap[index] = new SkBitmap;
- misspellBitmap[index]->setConfig(SkBitmap::kARGB_8888_Config,
- rowPixels, colPixels);
- misspellBitmap[index]->allocPixels();
+ misspellBitmap[index]->allocN32Pixels(rowPixels, colPixels);
jbroman 2014/03/17 16:46:38 This does not handle the case where the allocation
misspellBitmap[index]->eraseARGB(0, 0, 0, 0);
const uint32_t transparentColor = 0x00000000;
@@ -837,8 +835,7 @@ void GraphicsContext::drawLineForDocumentMarker(const FloatPoint& pt, float widt
const int rowPixels = 32 * deviceScaleFactor; // Must be multiple of 4 for pattern below.
const int colPixels = 2 * deviceScaleFactor;
misspellBitmap[index] = new SkBitmap;
- misspellBitmap[index]->setConfig(SkBitmap::kARGB_8888_Config, rowPixels, colPixels);
- misspellBitmap[index]->allocPixels();
+ misspellBitmap[index]->allocN32Pixels(rowPixels, colPixels);
jbroman 2014/03/17 16:46:38 And here as well.
misspellBitmap[index]->eraseARGB(0, 0, 0, 0);
if (deviceScaleFactor == 1)

Powered by Google App Engine
This is Rietveld 408576698