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

Unified Diff: src/core/SkPixmap.cpp

Issue 1505333002: SkBitmap::installPixels(const SkPixmap&); (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-12-09 (Wednesday) 13:58:05 EST Created 5 years 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/SkPictureImageGenerator.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPixmap.cpp
diff --git a/src/core/SkPixmap.cpp b/src/core/SkPixmap.cpp
index 718be88c57a826bdda276f8e214330b8484da6df..0098b1b2826fe6b07924e56ad0bd52d9d8c00502 100644
--- a/src/core/SkPixmap.cpp
+++ b/src/core/SkPixmap.cpp
@@ -222,9 +222,7 @@ bool SkPixmap::scalePixels(const SkPixmap& dst, SkFilterQuality quality) const {
}
SkBitmap bitmap;
- // we will only ready from this pixmap, but the bitmap setting takes void*, hence the cast
- void* readOnlyAddr = const_cast<void*>(this->addr());
- if (!bitmap.installPixels(this->info(), readOnlyAddr, this->rowBytes())) {
+ if (!bitmap.installPixels(*this)) {
return false;
}
bitmap.setIsVolatile(true); // so we don't try to cache it
« no previous file with comments | « src/core/SkPictureImageGenerator.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698