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

Side by Side Diff: samplecode/SampleStrokeText.cpp

Issue 12906016: Fix more clang tautological-constant-out-of-range-compare errors. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: address review Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/animator/SkDrawPaint.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 "SampleCode.h" 8 #include "SampleCode.h"
9 #include "SkView.h" 9 #include "SkView.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 99
100 dst->setConfig(config, w, h); 100 dst->setConfig(config, w, h);
101 dst->allocPixels(); 101 dst->allocPixels();
102 dst->eraseColor(SK_ColorWHITE); 102 dst->eraseColor(SK_ColorWHITE);
103 103
104 SkCanvas canvas(*dst); 104 SkCanvas canvas(*dst);
105 canvas.drawPath(path, paint); 105 canvas.drawPath(path, paint);
106 } 106 }
107 107
108 class StrokeTextView : public SampleView { 108 class StrokeTextView : public SampleView {
109 bool fAA;
110 public: 109 public:
111 StrokeTextView() : fAA(false) { 110 StrokeTextView() {
112 this->setBGColor(0xFFCC8844); 111 this->setBGColor(0xFFCC8844);
113 } 112 }
114 113
115 protected: 114 protected:
116 // overrides from SkEventSink 115 // overrides from SkEventSink
117 virtual bool onQuery(SkEvent* evt) { 116 virtual bool onQuery(SkEvent* evt) {
118 if (SampleCode::TitleQ(*evt)) { 117 if (SampleCode::TitleQ(*evt)) {
119 SampleCode::TitleR(evt, "StrokeText"); 118 SampleCode::TitleR(evt, "StrokeText");
120 return true; 119 return true;
121 } 120 }
(...skipping 17 matching lines...) Expand all
139 138
140 private: 139 private:
141 140
142 typedef SampleView INHERITED; 141 typedef SampleView INHERITED;
143 }; 142 };
144 143
145 ////////////////////////////////////////////////////////////////////////////// 144 //////////////////////////////////////////////////////////////////////////////
146 145
147 static SkView* MyFactory() { return new StrokeTextView; } 146 static SkView* MyFactory() { return new StrokeTextView; }
148 static SkViewRegister reg(MyFactory); 147 static SkViewRegister reg(MyFactory);
OLDNEW
« no previous file with comments | « no previous file | src/animator/SkDrawPaint.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698