Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Unified Diff: src/utils/SkPictureUtils.cpp

Issue 168653002: Change device factories to take SkImageInfo instead of SkBitmap::Config (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: fix PdfViewer Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/utils/SkGatherPixelRefsAndRects.h ('k') | tests/CanvasStateTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/SkPictureUtils.cpp
diff --git a/src/utils/SkPictureUtils.cpp b/src/utils/SkPictureUtils.cpp
index 92d0487c54ccfdb919336aa1e980adf620360d1f..a7ec7aea0ed634b037fa01acd4b0862467874b44 100644
--- a/src/utils/SkPictureUtils.cpp
+++ b/src/utils/SkPictureUtils.cpp
@@ -172,13 +172,10 @@ protected:
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 {}
« no previous file with comments | « src/utils/SkGatherPixelRefsAndRects.h ('k') | tests/CanvasStateTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698