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

Unified Diff: src/utils/SkDeferredCanvas.cpp

Issue 1010503002: Revert[6] of Change device creation to see the (optional) layer-paint (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 9 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') | no next file » | 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 8fe9f8a4b59e5651fa3f057b42978fd9ef220fca..647105d757238ed5a6998795fdae314c9a9a74e8 100644
--- a/src/utils/SkDeferredCanvas.cpp
+++ b/src/utils/SkDeferredCanvas.cpp
@@ -162,7 +162,7 @@ public:
GrRenderTarget* accessRenderTarget() SK_OVERRIDE;
- SkBaseDevice* onCreateCompatibleDevice(const CreateInfo&) SK_OVERRIDE;
+ SkBaseDevice* onCreateDevice(const CreateInfo&, const SkPaint*) SK_OVERRIDE;
SkSurface* newSurface(const SkImageInfo&, const SkSurfaceProps&) SK_OVERRIDE;
@@ -231,9 +231,6 @@ protected:
void lockPixels() SK_OVERRIDE {}
void unlockPixels() SK_OVERRIDE {}
- bool allowImageFilter(const SkImageFilter*) SK_OVERRIDE {
- return false;
- }
bool canHandleImageFilter(const SkImageFilter*) SK_OVERRIDE {
return false;
}
@@ -461,16 +458,13 @@ const SkBitmap& SkDeferredDevice::onAccessBitmap() {
return immediateDevice()->accessBitmap(false);
}
-SkBaseDevice* SkDeferredDevice::onCreateCompatibleDevice(const CreateInfo& cinfo) {
- // Save layer usage not supported, and not required by SkDeferredCanvas.
- SkASSERT(cinfo.fUsage != kSaveLayer_Usage);
-
+SkBaseDevice* SkDeferredDevice::onCreateDevice(const CreateInfo& cinfo, const SkPaint* layerPaint) {
// Create a compatible non-deferred device.
// We do not create a deferred device because we know the new device
// will not be used with a deferred canvas (there is no API for that).
// And connecting a SkDeferredDevice to non-deferred canvas can result
// in unpredictable behavior.
- return immediateDevice()->onCreateCompatibleDevice(cinfo);
+ return immediateDevice()->onCreateDevice(cinfo, layerPaint);
}
SkSurface* SkDeferredDevice::newSurface(const SkImageInfo& info, const SkSurfaceProps& props) {
« no previous file with comments | « src/pdf/SkPDFDevice.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698