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

Unified Diff: src/utils/debugger/SkDebugCanvas.cpp

Issue 1576183002: SkTCopyOnFirstWrite-based SkPaintFilterCanvas API (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: minor cleanup Created 4 years, 11 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/SkPaintFilterCanvas.cpp ('k') | tests/CanvasTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/debugger/SkDebugCanvas.cpp
diff --git a/src/utils/debugger/SkDebugCanvas.cpp b/src/utils/debugger/SkDebugCanvas.cpp
index 9f11a9e3f31d11c253a3ee8e1764391c92cb93cb..63739aee814a41a1a4b338d6009590f20eec56d8 100644
--- a/src/utils/debugger/SkDebugCanvas.cpp
+++ b/src/utils/debugger/SkDebugCanvas.cpp
@@ -69,16 +69,15 @@ public:
, fFilterQuality(quality) {}
protected:
- bool onFilter(const SkPaint* paint, Type, SkTLazy<SkPaint>* filteredPaint) const override {
- if (paint) {
- filteredPaint->set(*paint);
+ bool onFilter(SkTCopyOnFirstWrite<SkPaint>* paint, Type) const override {
+ if (*paint) {
if (nullptr != fOverdrawXfermode.get()) {
- filteredPaint->get()->setAntiAlias(false);
- filteredPaint->get()->setXfermode(fOverdrawXfermode.get());
+ paint->writable()->setAntiAlias(false);
+ paint->writable()->setXfermode(fOverdrawXfermode.get());
}
if (fOverrideFilterQuality) {
- filteredPaint->get()->setFilterQuality(fFilterQuality);
+ paint->writable()->setFilterQuality(fFilterQuality);
}
}
return true;
« no previous file with comments | « src/utils/SkPaintFilterCanvas.cpp ('k') | tests/CanvasTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698