Index: include/core/SkDevice.h |
diff --git a/include/core/SkDevice.h b/include/core/SkDevice.h |
index ec5771175436906f47071fdd51e1e0e97c6bd477..a0105b66865ca653fa9340dcfa7e8a038501cbd7 100644 |
--- a/include/core/SkDevice.h |
+++ b/include/core/SkDevice.h |
@@ -348,6 +348,13 @@ protected: |
/** |
* Create a new device based on CreateInfo. If the paint is not null, then it represents a |
* preview of how the new device will be composed with its creator device (this). |
+ * |
robertphillips
2015/04/29 14:55:54
"device back layer" -> "device back" ?
reed1
2015/04/29 15:20:47
Done.
|
+ * The subclass may be handed this device back layer (drawDevice), so it must always return |
+ * a device that it knows how to draw, and that it knows how to identify if it is not of the |
+ * same subclass (since drawDevice is passed a SkBaseDevice*). If the subclass cannot fulfill |
+ * that contract (e.g. PDF cannot support some settings on the paint) it should return NULL, |
+ * and the caller may then decide to explicitly create a bitmapdevice, knowing that later |
+ * it could not call drawDevice with it (but it could call drawSprite or drawBitmap). |
*/ |
virtual SkBaseDevice* onCreateDevice(const CreateInfo&, const SkPaint*) { |
return NULL; |