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

Side by Side Diff: src/views/animated/SkScrollBarView.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/SkProgressBarView.cpp ('k') | src/views/animated/SkStaticTextView.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 "SkScrollBarView.h" 8 #include "SkScrollBarView.h"
9 #include "SkAnimator.h" 9 #include "SkAnimator.h"
10 #include "SkWidgetViews.h" 10 #include "SkWidgetViews.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 evt.setScalar("dimY", this->height()); 82 evt.setScalar("dimY", this->height());
83 fAnim.doUserEvent(evt); 83 fAnim.doUserEvent(evt);
84 } 84 }
85 85
86 /*virtual*/ void SkScrollBarView::onDraw(SkCanvas* canvas) 86 /*virtual*/ void SkScrollBarView::onDraw(SkCanvas* canvas)
87 { 87 {
88 SkPaint paint; 88 SkPaint paint;
89 SkAnimator::DifferenceType diff = fAnim.draw(canvas, &paint, SkTime::GetM Secs()); 89 SkAnimator::DifferenceType diff = fAnim.draw(canvas, &paint, SkTime::GetM Secs());
90 90
91 if (diff == SkAnimator::kDifferent) 91 if (diff == SkAnimator::kDifferent)
92 this->inval(NULL); 92 this->inval(nullptr);
93 else if (diff == SkAnimator::kPartiallyDifferent) 93 else if (diff == SkAnimator::kPartiallyDifferent)
94 { 94 {
95 SkRect bounds; 95 SkRect bounds;
96 fAnim.getInvalBounds(&bounds); 96 fAnim.getInvalBounds(&bounds);
97 this->inval(&bounds); 97 this->inval(&bounds);
98 } 98 }
99 } 99 }
100 100
101 /*virtual*/ bool SkScrollBarView::onEvent(const SkEvent& evt) 101 /*virtual*/ bool SkScrollBarView::onEvent(const SkEvent& evt)
102 { 102 {
103 if (evt.isType(SK_EventType_Inval)) 103 if (evt.isType(SK_EventType_Inval))
104 { 104 {
105 this->inval(NULL); 105 this->inval(nullptr);
106 return true; 106 return true;
107 } 107 }
108 if (evt.isType("recommendDim")) 108 if (evt.isType("recommendDim"))
109 { 109 {
110 SkScalar width; 110 SkScalar width;
111 111
112 if (evt.findScalar("x", &width)) 112 if (evt.findScalar("x", &width))
113 this->setWidth(width); 113 this->setWidth(width);
114 return true; 114 return true;
115 } 115 }
(...skipping 20 matching lines...) Expand all
136 } 136 }
137 137
138 SkEvent e("user"); 138 SkEvent e("user");
139 e.setString("id", "adjustScrollBar"); 139 e.setString("id", "adjustScrollBar");
140 e.setScalar("_totalLength", SkIntToScalar(total)); 140 e.setScalar("_totalLength", SkIntToScalar(total));
141 e.setScalar("_startPoint", SkIntToScalar(start)); 141 e.setScalar("_startPoint", SkIntToScalar(start));
142 e.setScalar("_shownLength", SkIntToScalar(shown)); 142 e.setScalar("_shownLength", SkIntToScalar(shown));
143 // e.setS32("hideBar", hideBar); 143 // e.setS32("hideBar", hideBar);
144 fAnim.doUserEvent(e); 144 fAnim.doUserEvent(e);
145 } 145 }
OLDNEW
« no previous file with comments | « src/views/animated/SkProgressBarView.cpp ('k') | src/views/animated/SkStaticTextView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698