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

Unified Diff: src/core/SkPixelRef.cpp

Issue 752203002: Add an Android-framework-only stable ID to SkPixelRef. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Refine comments. Created 6 years, 1 month 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/SkPixelRef.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPixelRef.cpp
diff --git a/src/core/SkPixelRef.cpp b/src/core/SkPixelRef.cpp
index 0aa00e0bf58062fee2d3ddd7e706b81c18a44b0c..a2c37c6e72f92de7ce16d301632dacdb6dbb1fbf 100644
--- a/src/core/SkPixelRef.cpp
+++ b/src/core/SkPixelRef.cpp
@@ -87,7 +87,13 @@ static SkImageInfo validate_info(const SkImageInfo& info) {
return info.makeAlphaType(newAlphaType);
}
-SkPixelRef::SkPixelRef(const SkImageInfo& info) : fInfo(validate_info(info)) {
+SkPixelRef::SkPixelRef(const SkImageInfo& info)
+ : fInfo(validate_info(info))
+#ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK
+ , fStableID(SkNextPixelRefGenerationID())
+#endif
+
+{
this->setMutex(NULL);
fRec.zero();
fLockCount = 0;
@@ -97,7 +103,12 @@ SkPixelRef::SkPixelRef(const SkImageInfo& info) : fInfo(validate_info(info)) {
}
-SkPixelRef::SkPixelRef(const SkImageInfo& info, SkBaseMutex* mutex) : fInfo(validate_info(info)) {
+SkPixelRef::SkPixelRef(const SkImageInfo& info, SkBaseMutex* mutex)
+ : fInfo(validate_info(info))
+#ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK
+ , fStableID(SkNextPixelRefGenerationID())
+#endif
+{
this->setMutex(mutex);
fRec.zero();
fLockCount = 0;
« no previous file with comments | « include/core/SkPixelRef.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698