Change device factories to take SkImageInfo instead of SkBitmap::Config
patch from issue 167033002
BUG=skia:
R=reed@google.com
Author: reed@chromium.org
Review URL: https://codereview.chromium.org/168653002
git-svn-id: http://skia.googlecode.com/svn/trunk@13463 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/utils/SkPictureUtils.cpp b/src/utils/SkPictureUtils.cpp
index 92d0487..a7ec7ae 100644
--- a/src/utils/SkPictureUtils.cpp
+++ b/src/utils/SkPictureUtils.cpp
@@ -172,13 +172,10 @@
virtual void replaceBitmapBackendForRasterSurface(const SkBitmap&) SK_OVERRIDE {
not_supported();
}
- 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(GatherPixelRefDevice, (width, height, fPRSet));
+ return SkNEW_ARGS(GatherPixelRefDevice, (info.width(), info.height(), fPRSet));
}
virtual void flush() SK_OVERRIDE {}