Index: include/core/SkImage.h |
diff --git a/include/core/SkImage.h b/include/core/SkImage.h |
index 6070b6bf6bfefdd50ba5bc07ca8e118f54ef9165..4cff5db4c9192884b4b6faa1cf6014a8dccc8074 100644 |
--- a/include/core/SkImage.h |
+++ b/include/core/SkImage.h |
@@ -32,6 +32,10 @@ class GrTexture; |
* The content of SkImage is always immutable, though the actual storage may |
* change, if for example that image can be re-created via encoded data or |
* other means. |
+ * |
+ * SkImage always has a non-zero dimensions. If there is a request to create a new image, either |
+ * directly or via SkSurface, and either of the requested dimensions are zero, then NULL will be |
+ * returned. |
*/ |
class SK_API SkImage : public SkRefCnt { |
public: |
@@ -130,8 +134,8 @@ protected: |
fHeight(height), |
fUniqueID(NextUniqueID()) { |
- SkASSERT(width >= 0); |
- SkASSERT(height >= 0); |
+ SkASSERT(width > 0); |
+ SkASSERT(height > 0); |
} |
private: |