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

Unified Diff: src/animator/SkDrawBitmap.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 | « include/gpu/GrSurface.h ('k') | src/core/SkBitmap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/animator/SkDrawBitmap.cpp
diff --git a/src/animator/SkDrawBitmap.cpp b/src/animator/SkDrawBitmap.cpp
index 327e81365af40e2800646a0c07024a5b8699613c..ce96efbed267b11cccc46b9bf277acca2b23ead4 100644
--- a/src/animator/SkDrawBitmap.cpp
+++ b/src/animator/SkDrawBitmap.cpp
@@ -88,7 +88,8 @@ void SkDrawBitmap::onEndElement(SkAnimateMaker&) {
SkASSERT(width != -1);
SkASSERT(height != -1);
SkASSERT(rowBytes >= 0);
- fBitmap.setConfig((SkBitmap::Config) format, width, height, rowBytes);
+ SkColorType colorType = SkBitmapConfigToColorType((SkBitmap::Config)format);
+ fBitmap.setInfo(SkImageInfo::Make(width, height, colorType, kPremul_SkAlphaType), rowBytes);
fBitmap.allocPixels();
if (fColorSet)
fBitmap.eraseColor(fColor);
« no previous file with comments | « include/gpu/GrSurface.h ('k') | src/core/SkBitmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698