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

Unified Diff: skia/ext/platform_canvas.cc

Issue 2588093002: use the metadata on canvas instead of on device (Closed)
Patch Set: actually remove flag Created 4 years 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 | « skia/config/SkUserConfig.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/platform_canvas.cc
diff --git a/skia/ext/platform_canvas.cc b/skia/ext/platform_canvas.cc
index ec99dfe92a8f6a4541747729d907c52e5fd2e21b..c19464d8baaf5ec127d1c9f7f20907f48b4df4c7 100644
--- a/skia/ext/platform_canvas.cc
+++ b/skia/ext/platform_canvas.cc
@@ -77,9 +77,7 @@ std::unique_ptr<SkCanvas> CreateCanvas(const sk_sp<SkBaseDevice>& device,
}
SkMetaData& GetMetaData(const SkCanvas& canvas) {
- SkBaseDevice* device = canvas.getDevice();
- DCHECK(device != nullptr);
- return device->getMetaData();
+ return const_cast<SkCanvas&>(canvas).getMetaData();
}
#if defined(OS_MACOSX)
« no previous file with comments | « skia/config/SkUserConfig.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698