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

Unified Diff: experimental/SimpleCocoaApp/SimpleApp.mm

Issue 1316123003: Style Change: SkNEW->new; SkDELETE->delete (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-26 (Wednesday) 15:59:00 EDT Created 5 years, 4 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 | « dm/DMSrcSink.cpp ('k') | gm/aaclip.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/SimpleCocoaApp/SimpleApp.mm
diff --git a/experimental/SimpleCocoaApp/SimpleApp.mm b/experimental/SimpleCocoaApp/SimpleApp.mm
index 7dac2a4fffac34b1b6dec5418f9ef388257d80cf..6f9958f7fcc37cd9bdfe48dd5d53fb42550b7056 100644
--- a/experimental/SimpleCocoaApp/SimpleApp.mm
+++ b/experimental/SimpleCocoaApp/SimpleApp.mm
@@ -1,3 +1,9 @@
+/*
+ * Copyright 2011 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "SkCanvas.h"
#include "SkCGUtils.h"
#include "SkGraphics.h"
@@ -23,15 +29,14 @@ static SkPicture* LoadPicture(const char path[]) {
SkBitmap bm;
if (SkImageDecoder::DecodeFile(path, &bm)) {
bm.setImmutable();
- pic = SkNEW(SkPicture);
+ pic = new SkPicture;
SkCanvas* can = pic->beginRecording(bm.width(), bm.height());
can->drawBitmap(bm, 0, 0, NULL);
pic->endRecording();
} else {
SkFILEStream stream(path);
if (stream.isValid()) {
- pic = SkNEW_ARGS(SkPicture,
- (&stream, NULL, &SkImageDecoder::DecodeStream));
+ pic = new SkPicture(&stream, NULL, &SkImageDecoder::DecodeStream);
}
if (false) { // re-record
@@ -247,7 +252,7 @@ void application_init() {
canvas.divName(filename, false);
SkPicture* pic = LoadPicture(path.c_str());
pic->draw(&canvas);
- SkDELETE(pic);
+ delete pic;
}
SkDebugf("\n</div>\n\n");
@@ -261,7 +266,7 @@ void application_init() {
canvas.divName(filename, true);
SkPicture* pic = LoadPicture(path.c_str());
pic->draw(&canvas);
- SkDELETE(pic);
+ delete pic;
}
SkDebugf("];\n\n");
« no previous file with comments | « dm/DMSrcSink.cpp ('k') | gm/aaclip.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698