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

Unified Diff: src/utils/SkDeferredCanvas.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/pdf/SkPDFDevice.cpp ('k') | src/utils/SkGatherPixelRefsAndRects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/SkDeferredCanvas.cpp
diff --git a/src/utils/SkDeferredCanvas.cpp b/src/utils/SkDeferredCanvas.cpp
index de9148b4a46efb5616c15d54dea83e50325bd033..fc85711cb7fd7b32317d4e7e772238819fbd47f9 100644
--- a/src/utils/SkDeferredCanvas.cpp
+++ b/src/utils/SkDeferredCanvas.cpp
@@ -168,10 +168,7 @@ public:
virtual GrRenderTarget* accessRenderTarget() SK_OVERRIDE;
- virtual SkBaseDevice* onCreateCompatibleDevice(SkBitmap::Config config,
- int width, int height,
- bool isOpaque,
- Usage usage) SK_OVERRIDE;
+ virtual SkBaseDevice* onCreateDevice(const SkImageInfo&, Usage) SK_OVERRIDE;
virtual void writePixels(const SkBitmap& bitmap, int x, int y,
SkCanvas::Config8888 config8888) SK_OVERRIDE;
@@ -515,10 +512,7 @@ const SkBitmap& DeferredDevice::onAccessBitmap() {
return immediateDevice()->accessBitmap(false);
}
-SkBaseDevice* DeferredDevice::onCreateCompatibleDevice(
- SkBitmap::Config config, int width, int height, bool isOpaque,
- Usage usage) {
-
+SkBaseDevice* DeferredDevice::onCreateDevice(const SkImageInfo& info, Usage usage) {
// Save layer usage not supported, and not required by SkDeferredCanvas.
SkASSERT(usage != kSaveLayer_Usage);
// Create a compatible non-deferred device.
@@ -526,7 +520,7 @@ SkBaseDevice* DeferredDevice::onCreateCompatibleDevice(
// will not be used with a deferred canvas (there is no API for that).
// And connecting a DeferredDevice to non-deferred canvas can result
// in unpredictable behavior.
- return immediateDevice()->createCompatibleDevice(config, width, height, isOpaque);
+ return immediateDevice()->createCompatibleDevice(info);
}
SkSurface* DeferredDevice::newSurface(const SkImageInfo& info) {
« no previous file with comments | « src/pdf/SkPDFDevice.cpp ('k') | src/utils/SkGatherPixelRefsAndRects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698