Index: src/utils/SkGatherPixelRefsAndRects.h |
diff --git a/src/utils/SkGatherPixelRefsAndRects.h b/src/utils/SkGatherPixelRefsAndRects.h |
index 51595259399dee09722723918d52f89755efa6bb..90ab0f6cffcae0c84fc73fcc9a022cbfc106c4ea 100644 |
--- a/src/utils/SkGatherPixelRefsAndRects.h |
+++ b/src/utils/SkGatherPixelRefsAndRects.h |
@@ -28,7 +28,9 @@ public: |
fSize.set(width, height); |
fPRCont = prCont; |
SkSafeRef(fPRCont); |
- fEmptyBitmap.setConfig(SkBitmap::kNo_Config, width, height); |
+ fEmptyBitmap.setConfig(SkImageInfo::Make(width, height, |
+ kUnknown_SkColorType, |
+ kIgnore_SkAlphaType)); |
} |
virtual ~SkGatherPixelRefsAndRectsDevice() { |
@@ -43,6 +45,10 @@ public: |
virtual SkBitmap::Config config() const SK_OVERRIDE { |
return SkBitmap::kNo_Config; |
} |
+ virtual SkImageInfo imageInfo() const SK_OVERRIDE { |
+ return fEmptyBitmap.info(); |
+ } |
+ |
virtual void writePixels(const SkBitmap& bitmap, int x, int y, |
SkCanvas::Config8888 config8888) SK_OVERRIDE { |
NotSupported(); |
@@ -326,13 +332,11 @@ private: |
NotSupported(); |
} |
- virtual SkBaseDevice* onCreateCompatibleDevice(SkBitmap::Config config, |
- int width, int height, |
- bool isOpaque, |
- Usage usage) SK_OVERRIDE { |
+ virtual SkBaseDevice* onCreateDevice(const SkImageInfo& info, Usage usage) SK_OVERRIDE { |
// we expect to only get called via savelayer, in which case it is fine. |
SkASSERT(kSaveLayer_Usage == usage); |
- return SkNEW_ARGS(SkGatherPixelRefsAndRectsDevice, (width, height, fPRCont)); |
+ return SkNEW_ARGS(SkGatherPixelRefsAndRectsDevice, |
+ (info.width(), info.height(), fPRCont)); |
} |
virtual void flush() SK_OVERRIDE {} |