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

Unified Diff: src/core/SkDevice.cpp

Issue 143073008: add installPixels (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebase Created 6 years, 11 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/SkBitmapDevice.cpp ('k') | src/core/SkMallocPixelRef.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkDevice.cpp
diff --git a/src/core/SkDevice.cpp b/src/core/SkDevice.cpp
index 0c9e9d66b6bd5b62eb1db811206ddb83de4497fa..c08ae26159312bdc61380ce8704f16b37363566f 100644
--- a/src/core/SkDevice.cpp
+++ b/src/core/SkDevice.cpp
@@ -92,9 +92,8 @@ bool SkBaseDevice::readPixels(SkBitmap* bitmap, int x, int y,
SkBitmap tmp;
SkBitmap* bmp;
if (bitmap->isNull()) {
- tmp.setConfig(SkBitmap::kARGB_8888_Config, bitmap->width(),
- bitmap->height());
- if (!tmp.allocPixels()) {
+ if (!tmp.allocPixels(SkImageInfo::MakeN32Premul(bitmap->width(),
+ bitmap->height()))) {
return false;
}
bmp = &tmp;
« no previous file with comments | « src/core/SkBitmapDevice.cpp ('k') | src/core/SkMallocPixelRef.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698