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

Unified Diff: skia/ext/platform_canvas.cc

Issue 2509983004: Revert "Change call-sites now that SkCanvas is not ref-counted" (Closed)
Patch Set: Created 4 years, 1 month 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/ext/platform_canvas.h ('k') | skia/ext/platform_canvas_unittest.cc » ('j') | 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..cf78a4ea925ddcb22780f922c08753415844170f 100644
--- a/skia/ext/platform_canvas.cc
+++ b/skia/ext/platform_canvas.cc
@@ -5,7 +5,6 @@
#include "skia/ext/platform_canvas.h"
#include "base/logging.h"
-#include "base/memory/ptr_util.h"
#include "build/build_config.h"
#include "skia/ext/platform_device.h"
#include "third_party/skia/include/core/SkMetaData.h"
@@ -66,14 +65,14 @@ size_t PlatformCanvasStrideForWidth(unsigned width) {
return 4 * width;
}
-std::unique_ptr<SkCanvas> CreateCanvas(const sk_sp<SkBaseDevice>& device,
- OnFailureType failureType) {
+SkCanvas* CreateCanvas(const sk_sp<SkBaseDevice>& device,
+ OnFailureType failureType) {
if (!device) {
if (CRASH_ON_FAILURE == failureType)
SK_CRASH();
return nullptr;
}
- return base::MakeUnique<SkCanvas>(device.get());
+ return new SkCanvas(device.get());
}
SkMetaData& GetMetaData(const SkCanvas& canvas) {
« no previous file with comments | « skia/ext/platform_canvas.h ('k') | skia/ext/platform_canvas_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698