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

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

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 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/SkDisplayMath.cpp ('k') | src/animator/SkDisplayPost.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 "SkDisplayMovie.h" 10 #include "SkDisplayMovie.h"
(...skipping 16 matching lines...) Expand all
27 } 27 }
28 28
29 SkDisplayMovie::~SkDisplayMovie() { 29 SkDisplayMovie::~SkDisplayMovie() {
30 } 30 }
31 31
32 void SkDisplayMovie::buildMovie() { 32 void SkDisplayMovie::buildMovie() {
33 if (fMovieBuilt) 33 if (fMovieBuilt)
34 return; 34 return;
35 SkAnimateMaker* movieMaker = fMovie.fMaker; 35 SkAnimateMaker* movieMaker = fMovie.fMaker;
36 SkAnimateMaker* parentMaker = movieMaker->fParentMaker; 36 SkAnimateMaker* parentMaker = movieMaker->fParentMaker;
37 if (src.size() == 0 || parentMaker == NULL) 37 if (src.size() == 0 || parentMaker == nullptr)
38 return; 38 return;
39 movieMaker->fPrefix.set(parentMaker->fPrefix); 39 movieMaker->fPrefix.set(parentMaker->fPrefix);
40 fDecodedSuccessfully = fMovie.fMaker->decodeURI(src.c_str()); 40 fDecodedSuccessfully = fMovie.fMaker->decodeURI(src.c_str());
41 if (fDecodedSuccessfully == false) { 41 if (fDecodedSuccessfully == false) {
42 42
43 if (movieMaker->getErrorCode() != SkXMLParserError::kNoError || movieMak er->getNativeCode() != -1) { 43 if (movieMaker->getErrorCode() != SkXMLParserError::kNoError || movieMak er->getNativeCode() != -1) {
44 movieMaker->setInnerError(parentMaker, src); 44 movieMaker->setInnerError(parentMaker, src);
45 parentMaker->setErrorCode(SkDisplayXMLParserError::kInMovie); 45 parentMaker->setErrorCode(SkDisplayXMLParserError::kInMovie);
46 } else { 46 } else {
47 parentMaker->setErrorNoun(src); 47 parentMaker->setErrorNoun(src);
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 98
99 void SkDisplayMovie::dumpEvents() { 99 void SkDisplayMovie::dumpEvents() {
100 fMovie.fMaker->fEvents.dump(*fMovie.fMaker); 100 fMovie.fMaker->fEvents.dump(*fMovie.fMaker);
101 } 101 }
102 #endif 102 #endif
103 103
104 bool SkDisplayMovie::enable(SkAnimateMaker&) { 104 bool SkDisplayMovie::enable(SkAnimateMaker&) {
105 if (fDecodedSuccessfully == false) 105 if (fDecodedSuccessfully == false)
106 return false; 106 return false;
107 SkAnimateMaker* movieMaker = fMovie.fMaker; 107 SkAnimateMaker* movieMaker = fMovie.fMaker;
108 movieMaker->fEvents.doEvent(*movieMaker, SkDisplayEvent::kOnload, NULL); 108 movieMaker->fEvents.doEvent(*movieMaker, SkDisplayEvent::kOnload, nullptr);
109 movieMaker->fEvents.removeEvent(SkDisplayEvent::kOnload, NULL); 109 movieMaker->fEvents.removeEvent(SkDisplayEvent::kOnload, nullptr);
110 fLoaded = true; 110 fLoaded = true;
111 movieMaker->fLoaded = true; 111 movieMaker->fLoaded = true;
112 return false; 112 return false;
113 } 113 }
114 114
115 bool SkDisplayMovie::hasEnable() const { 115 bool SkDisplayMovie::hasEnable() const {
116 return true; 116 return true;
117 } 117 }
118 118
119 void SkDisplayMovie::onEndElement(SkAnimateMaker& maker) { 119 void SkDisplayMovie::onEndElement(SkAnimateMaker& maker) {
120 #if defined SK_DEBUG && defined SK_DEBUG_ANIMATION_TIMING 120 #if defined SK_DEBUG && defined SK_DEBUG_ANIMATION_TIMING
121 fMovie.fMaker->fDebugTimeBase = maker.fDebugTimeBase; 121 fMovie.fMaker->fDebugTimeBase = maker.fDebugTimeBase;
122 #endif 122 #endif
123 fMovie.fMaker->fPrefix.set(maker.fPrefix); 123 fMovie.fMaker->fPrefix.set(maker.fPrefix);
124 fMovie.fMaker->fHostEventSinkID = maker.fHostEventSinkID; 124 fMovie.fMaker->fHostEventSinkID = maker.fHostEventSinkID;
125 fMovie.fMaker->fParentMaker = &maker; 125 fMovie.fMaker->fParentMaker = &maker;
126 buildMovie(); 126 buildMovie();
127 *maker.fMovies.append() = this; 127 *maker.fMovies.append() = this;
128 } 128 }
OLDNEW
« no previous file with comments | « src/animator/SkDisplayMath.cpp ('k') | src/animator/SkDisplayPost.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698