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

Unified Diff: src/image/SkSurface_Raster.cpp

Issue 129423002: 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 1b218eb446222a1e64802c357b8a7ab3c28e362e..7010b5fb2abb1f790baa1e5c9fd947c6e7621099 100644
--- a/src/image/SkSurface_Raster.cpp
+++ b/src/image/SkSurface_Raster.cpp
@@ -85,15 +85,12 @@ SkSurface_Raster::SkSurface_Raster(const SkImageInfo& info, void* pixels, size_t
}
SkSurface_Raster::SkSurface_Raster(SkPixelRef* pr)
- : INHERITED(pr->info().fWidth, pr->info().fHeight)
+ : INHERITED(pr->info())
{
- const SkImageInfo& info = pr->info();
-
- fBitmap.setConfig(info, info.minRowBytes());
- fBitmap.setPixelRef(pr);
+ fBitmap.installPixelRef(pr);
fWeOwnThePixels = true;
- if (!info.isOpaque()) {
+ if (!pr->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