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

Unified Diff: dm/DMUtil.cpp

Issue 168653002: Change device factories to take SkImageInfo instead of SkBitmap::Config (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: fix PdfViewer 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 | « dm/DMUtil.h ('k') | experimental/PdfViewer/SkTrackDevice.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DMUtil.cpp
diff --git a/dm/DMUtil.cpp b/dm/DMUtil.cpp
index 52efda3d32f5ed3889e1a6cc8e61e8b21611dd97..849d1bf9d8acb2613585f0fc33d086dc9f854008 100644
--- a/dm/DMUtil.cpp
+++ b/dm/DMUtil.cpp
@@ -19,10 +19,10 @@ void RecordPicture(skiagm::GM* gm, SkPicture* picture, uint32_t recordFlags) {
picture->endRecording();
}
-void SetupBitmap(const SkBitmap::Config config, skiagm::GM* gm, SkBitmap* bitmap) {
+void SetupBitmap(const SkColorType ct, skiagm::GM* gm, SkBitmap* bitmap) {
const SkISize size = gm->getISize();
- bitmap->setConfig(config, size.width(), size.height());
- bitmap->allocPixels();
+ bitmap->allocPixels(SkImageInfo::Make(size.width(), size.height(),
+ ct, kPremul_SkAlphaType));
bitmap->eraseColor(0x00000000);
}
« no previous file with comments | « dm/DMUtil.h ('k') | experimental/PdfViewer/SkTrackDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698