Chromium Code Reviews| Index: include/core/SkPixelRef.h |
| diff --git a/include/core/SkPixelRef.h b/include/core/SkPixelRef.h |
| index e65f4a04c5b5e1538c291e69ff1d1d920130f82f..d658971a88d582e7dd9e61fee713d05d1c162972 100644 |
| --- a/include/core/SkPixelRef.h |
| +++ b/include/core/SkPixelRef.h |
| @@ -1,4 +1,3 @@ |
| - |
| /* |
| * Copyright 2008 The Android Open Source Project |
| * |
| @@ -6,7 +5,6 @@ |
| * found in the LICENSE file. |
| */ |
| - |
| #ifndef SkPixelRef_DEFINED |
| #define SkPixelRef_DEFINED |
| @@ -128,11 +126,19 @@ public: |
| */ |
| uint32_t getGenerationID() const; |
| - /** Call this if you have changed the contents of the pixels. This will in- |
| - turn cause a different generation ID value to be returned from |
| - getGenerationID(). |
| - */ |
| - void notifyPixelsChanged(); |
| + /** |
| + * Call this if you have changed the contents of the pixels. This will in- |
| + * turn cause a different generation ID value to be returned from |
| + * getGenerationID(). |
| + * |
|
robertphillips
2014/01/27 14:24:27
rm 'it' in "If it"?
reed1
2014/01/27 14:27:13
Done.
|
| + * If the alphatype has also changed, specify its new value as well. If it |
| + * the new pixels' alphatype is the same, this can be called with no |
| + * parameter. |
| + */ |
| + void notifyPixelsChanged(SkAlphaType); |
| + void notifyPixelsChanged() { |
| + this->notifyPixelsChanged(fInfo.fAlphaType); |
| + } |
| /** Returns true if this pixelref is marked as immutable, meaning that the |
| contents of its pixels will not change for the lifetime of the pixelref. |
| @@ -333,6 +339,7 @@ protected: |
| private: |
| SkBaseMutex* fMutex; // must remain in scope for the life of this object |
|
robertphillips
2014/01/27 14:24:27
fAlphaType?
reed1
2014/01/27 14:27:13
Done.
|
| + // mostly const. fAlpahType can be changed at runtime. |
| const SkImageInfo fInfo; |
| // LockRec is only valid if we're in a locked state (isLocked()) |