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

Side by Side Diff: src/animator/SkAnimator.cpp

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, 3 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 unified diff | Download patch
« no previous file with comments | « src/animator/SkAnimateSet.cpp ('k') | src/animator/SkAnimatorScript.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "SkAnimator.h" 10 #include "SkAnimator.h"
(...skipping 28 matching lines...) Expand all
39 "<Math id=\"Math\"/>" 39 "<Math id=\"Math\"/>"
40 "<Number id=\"Number\"/>" 40 "<Number id=\"Number\"/>"
41 "</screenplay>"; 41 "</screenplay>";
42 42
43 #define gMathPrimer gMathPrimerText 43 #define gMathPrimer gMathPrimerText
44 44
45 SkAnimator::SkAnimator() : fMaker(NULL) { 45 SkAnimator::SkAnimator() : fMaker(NULL) {
46 initialize(); 46 initialize();
47 } 47 }
48 48
49 SkAnimator::~SkAnimator() { 49 SkAnimator::~SkAnimator() { delete fMaker; }
50 SkDELETE(fMaker);
51 }
52 50
53 void SkAnimator::addExtras(SkExtras* extras) { 51 void SkAnimator::addExtras(SkExtras* extras) {
54 *fMaker->fExtras.append() = extras; 52 *fMaker->fExtras.append() = extras;
55 } 53 }
56 54
57 bool SkAnimator::appendStream(SkStream* stream) { 55 bool SkAnimator::appendStream(SkStream* stream) {
58 return decodeStream(stream); 56 return decodeStream(stream);
59 } 57 }
60 58
61 bool SkAnimator::decodeMemory(const void* buffer, size_t size) 59 bool SkAnimator::decodeMemory(const void* buffer, size_t size)
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 if (field == NULL) 377 if (field == NULL)
380 return NULL; 378 return NULL;
381 return getString(element, field); 379 return getString(element, field);
382 } 380 }
383 381
384 const char* SkAnimator::getURIBase() { 382 const char* SkAnimator::getURIBase() {
385 return fMaker->fPrefix.c_str(); 383 return fMaker->fPrefix.c_str();
386 } 384 }
387 385
388 void SkAnimator::initialize() { 386 void SkAnimator::initialize() {
389 SkDELETE(fMaker); 387 delete fMaker;
390 fMaker = SkNEW_ARGS(SkAnimateMaker, (this, NULL, NULL)); 388 fMaker = new SkAnimateMaker(this, NULL, NULL);
391 decodeMemory(gMathPrimer, sizeof(gMathPrimer)-1); 389 decodeMemory(gMathPrimer, sizeof(gMathPrimer)-1);
392 #ifdef SK_BUILD_FOR_ANDROID 390 #ifdef SK_BUILD_FOR_ANDROID
393 InitializeSkExtraPathEffects(this); 391 InitializeSkExtraPathEffects(this);
394 #endif 392 #endif
395 } 393 }
396 394
397 395
398 #ifdef SK_DEBUG 396 #ifdef SK_DEBUG
399 bool SkAnimator::isTrackingEvents() { 397 bool SkAnimator::isTrackingEvents() {
400 return false; 398 return false;
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
697 gUnitTests[i].fUnitTest(); 695 gUnitTests[i].fUnitTest();
698 SkDebugf("SkAnimator: End UnitTest for %s\n", gUnitTests[i].fTypeName); 696 SkDebugf("SkAnimator: End UnitTest for %s\n", gUnitTests[i].fTypeName);
699 } 697 }
700 } 698 }
701 #else 699 #else
702 void SkAnimator::Init(bool) {} 700 void SkAnimator::Init(bool) {}
703 #endif 701 #endif
704 702
705 void SkAnimator::Term() { 703 void SkAnimator::Term() {
706 } 704 }
OLDNEW
« no previous file with comments | « src/animator/SkAnimateSet.cpp ('k') | src/animator/SkAnimatorScript.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698