Index: include/core/SkDevice.h |
diff --git a/include/core/SkDevice.h b/include/core/SkDevice.h |
index 4a61321ff76203b2e2264de518d6bd1cadefa753..95a6600b636a067c3d769970ab4e2ab7b7c27170 100644 |
--- a/include/core/SkDevice.h |
+++ b/include/core/SkDevice.h |
@@ -236,7 +236,7 @@ protected: |
virtual void drawPatch(const SkDraw&, const SkPoint cubics[12], const SkColor colors[4], |
const SkPoint texCoords[4], SkXfermode* xmode, const SkPaint& paint); |
/** The SkDevice passed will be an SkDevice which was returned by a call to |
- onCreateDevice on this device with kSaveLayer_Usage. |
+ onCreateCompatibleDevice on this device with kSaveLayer_Usage. |
*/ |
virtual void drawDevice(const SkDraw&, SkBaseDevice*, int x, int y, |
const SkPaint&) = 0; |
@@ -340,6 +340,16 @@ protected: |
void setPixelGeometry(SkPixelGeometry geo); |
+ struct CreateInfo { |
+ CreateInfo(const SkImageInfo& info, Usage usage) : fInfo(info), fUsage(usage) {} |
+ |
+ SkImageInfo fInfo; |
+ Usage fUsage; |
+ }; |
+ virtual SkBaseDevice* onCreateCompatibleDevice(const CreateInfo& cinfo) { |
+ return NULL; |
+ } |
+ |
private: |
friend class SkCanvas; |
friend struct DeviceCM; //for setMatrixClip |
@@ -366,10 +376,6 @@ private: |
// just called by SkCanvas for imagefilter |
SkBaseDevice* createCompatibleDeviceForImageFilter(const SkImageInfo&); |
- virtual SkBaseDevice* onCreateDevice(const SkImageInfo&, Usage) { |
- return NULL; |
- } |
- |
/** Causes any deferred drawing to the device to be completed. |
*/ |
virtual void flush() {} |