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

Unified Diff: src/fonts/SkGScalerContext.cpp

Issue 322963002: hide SkBitmap::setConfig (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 6 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
« no previous file with comments | « src/effects/SkMatrixConvolutionImageFilter.cpp ('k') | src/gpu/GrSurface.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/fonts/SkGScalerContext.cpp
diff --git a/src/fonts/SkGScalerContext.cpp b/src/fonts/SkGScalerContext.cpp
index 551b01c961100a425de458accd9e7ff32220440c..e1ab921337dc1da23e11ca6825acf5a0d4540ce9 100644
--- a/src/fonts/SkGScalerContext.cpp
+++ b/src/fonts/SkGScalerContext.cpp
@@ -119,9 +119,8 @@ void SkGScalerContext::generateImage(const SkGlyph& glyph) {
fProxy->getPath(glyph, &path);
SkBitmap bm;
- bm.setConfig(SkBitmap::kARGB_8888_Config, glyph.fWidth, glyph.fHeight,
- glyph.rowBytes());
- bm.setPixels(glyph.fImage);
+ bm.installPixels(SkImageInfo::MakeN32Premul(glyph.fWidth, glyph.fHeight),
+ glyph.fImage, glyph.rowBytes());
bm.eraseColor(0);
SkCanvas canvas(bm);
« no previous file with comments | « src/effects/SkMatrixConvolutionImageFilter.cpp ('k') | src/gpu/GrSurface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698