aboutsummaryrefslogtreecommitdiffhomepage
path: root/experimental
diff options
context:
space:
mode:
authorGravatar halcanary <halcanary@google.com>2015-08-26 13:07:48 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-08-26 13:07:49 -0700
commit385fe4d4b62d7d1dd76116dd570df3290a2f487b (patch)
tree53d982ff238828331e86acd44071a44162a8688c /experimental
parent5015176adf046ef906a2313b6e6b64b72cc84898 (diff)
Style Change: SkNEW->new; SkDELETE->delete
Diffstat (limited to 'experimental')
-rw-r--r--experimental/SimpleCocoaApp/SimpleApp.mm15
1 files changed, 10 insertions, 5 deletions
diff --git a/experimental/SimpleCocoaApp/SimpleApp.mm b/experimental/SimpleCocoaApp/SimpleApp.mm
index 7dac2a4fff..6f9958f7fc 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");