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

Side by Side Diff: samplecode/SampleStrokePath.cpp

Issue 23576015: Change old PRG to be SkLCGRandom; change new one to SkRandom (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Fix some spurious SkMWCRandoms Created 7 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 | Annotate | Revision Log
« no previous file with comments | « samplecode/SampleSlides.cpp ('k') | samplecode/SampleText.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 "SkBlurMask.h" 9 #include "SkBlurMask.h"
10 #include "SkBlurMaskFilter.h" 10 #include "SkBlurMaskFilter.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 protected: 125 protected:
126 // overrides from SkEventSink 126 // overrides from SkEventSink
127 virtual bool onQuery(SkEvent* evt) { 127 virtual bool onQuery(SkEvent* evt) {
128 if (SampleCode::TitleQ(*evt)) { 128 if (SampleCode::TitleQ(*evt)) {
129 SampleCode::TitleR(evt, "StrokePath"); 129 SampleCode::TitleR(evt, "StrokePath");
130 return true; 130 return true;
131 } 131 }
132 return this->INHERITED::onQuery(evt); 132 return this->INHERITED::onQuery(evt);
133 } 133 }
134 134
135 SkMWCRandom rand; 135 SkRandom rand;
136 136
137 void drawSet(SkCanvas* canvas, SkPaint* paint) { 137 void drawSet(SkCanvas* canvas, SkPaint* paint) {
138 SkAutoCanvasRestore acr(canvas, true); 138 SkAutoCanvasRestore acr(canvas, true);
139 139
140 for (size_t i = 0; i < SK_ARRAY_COUNT(gRec); i++) { 140 for (size_t i = 0; i < SK_ARRAY_COUNT(gRec); i++) {
141 paint->setStyle(gRec[i].fStyle); 141 paint->setStyle(gRec[i].fStyle);
142 paint->setStrokeJoin(gRec[i].fJoin); 142 paint->setStrokeJoin(gRec[i].fJoin);
143 paint->setStrokeWidth(SkIntToScalar(gRec[i].fStrokeWidth)); 143 paint->setStrokeWidth(SkIntToScalar(gRec[i].fStrokeWidth));
144 canvas->drawPath(fPath, *paint); 144 canvas->drawPath(fPath, *paint);
145 canvas->translate(fWidth * 5 / 4, 0); 145 canvas->translate(fWidth * 5 / 4, 0);
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 return this->INHERITED::onFindClickHandler(x, y, modi); 215 return this->INHERITED::onFindClickHandler(x, y, modi);
216 } 216 }
217 private: 217 private:
218 typedef SampleView INHERITED; 218 typedef SampleView INHERITED;
219 }; 219 };
220 220
221 ////////////////////////////////////////////////////////////////////////////// 221 //////////////////////////////////////////////////////////////////////////////
222 222
223 static SkView* MyFactory() { return new StrokePathView; } 223 static SkView* MyFactory() { return new StrokePathView; }
224 static SkViewRegister reg(MyFactory); 224 static SkViewRegister reg(MyFactory);
OLDNEW
« no previous file with comments | « samplecode/SampleSlides.cpp ('k') | samplecode/SampleText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698