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

Unified Diff: src/image/SkImage.cpp

Issue 1372153006: SkImage doesn't use props, so don't need to store it (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 2 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 | « include/core/SkImage.h ('k') | src/image/SkImagePriv.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/image/SkImage.cpp
diff --git a/src/image/SkImage.cpp b/src/image/SkImage.cpp
index ee76a7ea39ed825e357227fe812cb12c5f3b4e67..af9c27592c527e1383136f999ba56ede955eb07d 100644
--- a/src/image/SkImage.cpp
+++ b/src/image/SkImage.cpp
@@ -198,15 +198,10 @@ static bool raster_canvas_supports(const SkImageInfo& info) {
return false;
}
-static SkSurfaceProps copy_or_safe_defaults(const SkSurfaceProps* props) {
- return props ? *props : SkSurfaceProps(0, kUnknown_SkPixelGeometry);
-}
-
-SkImage_Base::SkImage_Base(int width, int height, uint32_t uniqueID, const SkSurfaceProps* props)
+SkImage_Base::SkImage_Base(int width, int height, uint32_t uniqueID)
: INHERITED(width, height, uniqueID)
- , fProps(copy_or_safe_defaults(props))
, fAddedToCache(false)
-{ }
+{}
SkImage_Base::~SkImage_Base() {
if (fAddedToCache.load()) {
@@ -276,7 +271,7 @@ SkImage* SkImage::NewFromBitmap(const SkBitmap& bm) {
#endif
// This will check for immutable (share or copy)
- return SkNewImageFromRasterBitmap(bm, nullptr);
+ return SkNewImageFromRasterBitmap(bm);
}
bool SkImage::asLegacyBitmap(SkBitmap* bitmap, LegacyBitmapMode mode) const {
« no previous file with comments | « include/core/SkImage.h ('k') | src/image/SkImagePriv.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698