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

Unified Diff: src/image/SkImage_Raster.cpp

Issue 1813793002: images with offset bitmap don't share genid (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2016-03-17 (Thursday) 12:13:54 EDT Created 4 years, 9 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 | tests/image-bitmap.cpp » ('j') | tests/image-bitmap.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/image/SkImage_Raster.cpp
diff --git a/src/image/SkImage_Raster.cpp b/src/image/SkImage_Raster.cpp
index 7f2f5c07ef71ed0e14348c72e4c71bb0d46b7fe9..6b67c6f87dfc30e0755098510447fb204c4f1582 100644
--- a/src/image/SkImage_Raster.cpp
+++ b/src/image/SkImage_Raster.cpp
@@ -82,7 +82,10 @@ public:
bool onAsLegacyBitmap(SkBitmap*, LegacyBitmapMode) const override;
SkImage_Raster(const SkBitmap& bm)
- : INHERITED(bm.width(), bm.height(), bm.getGenerationID())
+ : INHERITED(bm.width(), bm.height(),
+ bm.pixelRefOrigin().isZero()
+ ? bm.getGenerationID()
+ : (uint32_t)kNeedNewImageUniqueID)
, fBitmap(bm)
{
if (bm.pixelRef()->isPreLocked()) {
« no previous file with comments | « no previous file | tests/image-bitmap.cpp » ('j') | tests/image-bitmap.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698