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

Unified Diff: src/core/SkCanvas.cpp

Issue 173893002: use colortype instead of config (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 10 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/core/SkBlitter_Sprite.cpp ('k') | src/core/SkDevice.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkCanvas.cpp
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index 4462b4cc2ad2308ca3fcab2a343084143f7f62eb..93dc14bd1e5e6700c7b2bef784255dc86b4fff90 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -518,7 +518,7 @@ SkCanvas::SkCanvas(int width, int height)
inc_canvas();
SkBitmap bitmap;
- bitmap.setConfig(SkBitmap::kNo_Config, width, height);
+ bitmap.setConfig(SkImageInfo::MakeUnknown(width, height));
this->init(SkNEW_ARGS(SkBitmapDevice, (bitmap)))->unref();
}
@@ -950,9 +950,7 @@ SkImageInfo SkCanvas::imageInfo() const {
if (dev) {
return dev->imageInfo();
} else {
- // TODO: need a real unknown for alphatype it seems.
- SkAlphaType unknownAlphaType = kIgnore_SkAlphaType;
- return SkImageInfo::Make(0, 0, kUnknown_SkColorType, unknownAlphaType);
+ return SkImageInfo::MakeUnknown(0, 0);
}
}
« no previous file with comments | « src/core/SkBlitter_Sprite.cpp ('k') | src/core/SkDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698