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

Unified Diff: src/image/SkSurface_Raster.cpp

Issue 137133003: Revert of add SkBitmap::installPixelRef() (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: 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/image/SkImage_Raster.cpp ('k') | src/lazy/SkCachingPixelRef.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/image/SkSurface_Raster.cpp
diff --git a/src/image/SkSurface_Raster.cpp b/src/image/SkSurface_Raster.cpp
index 7010b5fb2abb1f790baa1e5c9fd947c6e7621099..1b218eb446222a1e64802c357b8a7ab3c28e362e 100644
--- a/src/image/SkSurface_Raster.cpp
+++ b/src/image/SkSurface_Raster.cpp
@@ -85,12 +85,15 @@
}
SkSurface_Raster::SkSurface_Raster(SkPixelRef* pr)
- : INHERITED(pr->info())
+ : INHERITED(pr->info().fWidth, pr->info().fHeight)
{
- fBitmap.installPixelRef(pr);
+ const SkImageInfo& info = pr->info();
+
+ fBitmap.setConfig(info, info.minRowBytes());
+ fBitmap.setPixelRef(pr);
fWeOwnThePixels = true;
- if (!pr->info().isOpaque()) {
+ if (!info.isOpaque()) {
fBitmap.eraseColor(SK_ColorTRANSPARENT);
}
}
« no previous file with comments | « src/image/SkImage_Raster.cpp ('k') | src/lazy/SkCachingPixelRef.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698