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

Unified Diff: src/core/SkCanvas.cpp

Issue 246493002: NewRasterDirect should *not* erase the pixels -- direct means the client is in-charge (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 8 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 | « no previous file | no next file » | 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 e8da12920f2a75768021e527d7d3cba1cdec4714..f501468a330de7659adc9a6b1233722bf88cb413 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -2672,10 +2672,5 @@ SkCanvas* SkCanvas::NewRasterDirect(const SkImageInfo& info, void* pixels, size_
if (!bitmap.installPixels(info, pixels, rowBytes)) {
return NULL;
}
-
- // should this functionality be moved into allocPixels()?
- if (!bitmap.info().isOpaque()) {
- bitmap.eraseColor(0);
- }
return SkNEW_ARGS(SkCanvas, (bitmap));
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698