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

Side by Side Diff: src/views/animated/SkProgressBarView.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/views/animated/SkImageView.cpp ('k') | src/views/animated/SkScrollBarView.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 2011 Google Inc. 3 * Copyright 2011 Google Inc.
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 #include "SkProgressBarView.h" 8 #include "SkProgressBarView.h"
9 #include "SkAnimator.h" 9 #include "SkAnimator.h"
10 #include "SkWidgetViews.h" 10 #include "SkWidgetViews.h"
(...skipping 17 matching lines...) Expand all
28 //otherwise i'll just leave it as it is 28 //otherwise i'll just leave it as it is
29 //this implies that if a new max and progress are set, max must be set first 29 //this implies that if a new max and progress are set, max must be set first
30 } 30 }
31 31
32 /*virtual*/ void SkProgressBarView::onDraw(SkCanvas* canvas) 32 /*virtual*/ void SkProgressBarView::onDraw(SkCanvas* canvas)
33 { 33 {
34 SkPaint paint; 34 SkPaint paint;
35 SkAnimator::DifferenceType diff = fAnim.draw(canvas, &paint, SkTime::GetM Secs()); 35 SkAnimator::DifferenceType diff = fAnim.draw(canvas, &paint, SkTime::GetM Secs());
36 36
37 if (diff == SkAnimator::kDifferent) 37 if (diff == SkAnimator::kDifferent)
38 this->inval(NULL); 38 this->inval(nullptr);
39 else if (diff == SkAnimator::kPartiallyDifferent) 39 else if (diff == SkAnimator::kPartiallyDifferent)
40 { 40 {
41 SkRect bounds; 41 SkRect bounds;
42 fAnim.getInvalBounds(&bounds); 42 fAnim.getInvalBounds(&bounds);
43 this->inval(&bounds); 43 this->inval(&bounds);
44 } 44 }
45 } 45 }
46 46
47 /*virtual*/ bool SkProgressBarView::onEvent(const SkEvent& evt) 47 /*virtual*/ bool SkProgressBarView::onEvent(const SkEvent& evt)
48 { 48 {
49 if (evt.isType(SK_EventType_Inval)) 49 if (evt.isType(SK_EventType_Inval))
50 { 50 {
51 this->inval(NULL); 51 this->inval(nullptr);
52 return true; 52 return true;
53 } 53 }
54 if (evt.isType("recommendDim")) 54 if (evt.isType("recommendDim"))
55 { 55 {
56 SkScalar height; 56 SkScalar height;
57 57
58 if (evt.findScalar("y", &height)) 58 if (evt.findScalar("y", &height))
59 this->setHeight(height); 59 this->setHeight(height);
60 return true; 60 return true;
61 } 61 }
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 } 100 }
101 101
102 void SkProgressBarView::setProgress(int progress) 102 void SkProgressBarView::setProgress(int progress)
103 { 103 {
104 fProgress = progress; 104 fProgress = progress;
105 SkEvent e("user"); 105 SkEvent e("user");
106 e.setString("id", "setProgress"); 106 e.setString("id", "setProgress");
107 e.setS32("newProgress", progress); 107 e.setS32("newProgress", progress);
108 fAnim.doUserEvent(e); 108 fAnim.doUserEvent(e);
109 } 109 }
OLDNEW
« no previous file with comments | « src/views/animated/SkImageView.cpp ('k') | src/views/animated/SkScrollBarView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698