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

Side by Side Diff: src/animator/SkOperandIterpolator.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/SkMemberInfo.cpp ('k') | src/animator/SkPaintPart.h » ('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 "SkOperandInterpolator.h" 10 #include "SkOperandInterpolator.h"
(...skipping 20 matching lines...) Expand all
31 fTimes = (SkTimeCode*) fStorage; 31 fTimes = (SkTimeCode*) fStorage;
32 fValues = (SkOperand*) ((char*) fStorage + sizeof(SkTimeCode) * frameCount); 32 fValues = (SkOperand*) ((char*) fStorage + sizeof(SkTimeCode) * frameCount);
33 #ifdef SK_DEBUG 33 #ifdef SK_DEBUG
34 fTimesArray = (SkTimeCode(*)[10]) fTimes; 34 fTimesArray = (SkTimeCode(*)[10]) fTimes;
35 fValuesArray = (SkOperand(*)[10]) fValues; 35 fValuesArray = (SkOperand(*)[10]) fValues;
36 #endif 36 #endif
37 } 37 }
38 38
39 bool SkOperandInterpolator::setKeyFrame(int index, SkMSec time, const SkOperand values[], SkScalar blend) 39 bool SkOperandInterpolator::setKeyFrame(int index, SkMSec time, const SkOperand values[], SkScalar blend)
40 { 40 {
41 SkASSERT(values != NULL); 41 SkASSERT(values != nullptr);
42 blend = SkScalarPin(blend, 0, SK_Scalar1); 42 blend = SkScalarPin(blend, 0, SK_Scalar1);
43 43
44 bool success = ~index == SkTSearch<SkMSec>(&fTimes->fTime, index, time, size of(SkTimeCode)); 44 bool success = ~index == SkTSearch<SkMSec>(&fTimes->fTime, index, time, size of(SkTimeCode));
45 SkASSERT(success); 45 SkASSERT(success);
46 if (success) { 46 if (success) {
47 SkTimeCode* timeCode = &fTimes[index]; 47 SkTimeCode* timeCode = &fTimes[index];
48 timeCode->fTime = time; 48 timeCode->fTime = time;
49 timeCode->fBlend[0] = SK_Scalar1 - blend; 49 timeCode->fBlend[0] = SK_Scalar1 - blend;
50 timeCode->fBlend[1] = 0; 50 timeCode->fBlend[1] = 0;
51 timeCode->fBlend[2] = 0; 51 timeCode->fBlend[2] = 0;
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 SkASSERT(memcmp(v, iset(vv, 60, 120, 180), sizeof(v)) == 0); 140 SkASSERT(memcmp(v, iset(vv, 60, 120, 180), sizeof(v)) == 0);
141 141
142 result = inter.timeToValues(125, v); 142 result = inter.timeToValues(125, v);
143 SkASSERT(result == kNormal_Result); 143 SkASSERT(result == kNormal_Result);
144 result = inter.timeToValues(175, v); 144 result = inter.timeToValues(175, v);
145 SkASSERT(result == kNormal_Result); 145 SkASSERT(result == kNormal_Result);
146 #endif 146 #endif
147 } 147 }
148 148
149 #endif 149 #endif
OLDNEW
« no previous file with comments | « src/animator/SkMemberInfo.cpp ('k') | src/animator/SkPaintPart.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698