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

Unified Diff: samplecode/PerlinPatch.cpp

Issue 1419983006: demo tweaks, scale up perlin, add call to flush for fps (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « resources/nov-talk-sequence.txt ('k') | samplecode/SampleAnimatedText.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/PerlinPatch.cpp
diff --git a/samplecode/PerlinPatch.cpp b/samplecode/PerlinPatch.cpp
index 945b6921fe09b71c7a0dc40eff361d9595371f63..9bb95e52595d01cd4a4f142c7d4f6b763f4e20eb 100644
--- a/samplecode/PerlinPatch.cpp
+++ b/samplecode/PerlinPatch.cpp
@@ -75,23 +75,24 @@ class PerlinPatchView : public SampleView {
public:
PerlinPatchView() : fXFreq(0.025f), fYFreq(0.025f), fSeed(0.0f),
fTexX(100.0), fTexY(50.0), fTexScale(1.0f) {
+ const SkScalar s = 2;
// The order of the colors and points is clockwise starting at upper-left corner.
//top points
- fPts[0].set(100, 100);
- fPts[1].set(150, 50);
- fPts[2].set(250, 150);
- fPts[3].set(300, 100);
+ fPts[0].set(100 * s, 100 * s);
+ fPts[1].set(150 * s, 50 * s);
+ fPts[2].set(250 * s, 150 * s);
+ fPts[3].set(300 * s, 100 * s);
//right points
- fPts[4].set(275, 150);
- fPts[5].set(350, 250);
+ fPts[4].set(275 * s, 150 * s);
+ fPts[5].set(350 * s, 250 * s);
//bottom points
- fPts[6].set(300, 300);
- fPts[7].set(250, 250);
+ fPts[6].set(300 * s, 300 * s);
+ fPts[7].set(250 * s, 250 * s);
//left points
- fPts[8].set(150, 350);
- fPts[9].set(100, 300);
- fPts[10].set(50, 250);
- fPts[11].set(150, 150);
+ fPts[8].set(150 * s, 350 * s);
+ fPts[9].set(100 * s, 300 * s);
+ fPts[10].set(50 * s, 250 * s);
+ fPts[11].set(150 * s, 150 * s);
const SkColor colors[SkPatchUtils::kNumCorners] = {
0xFF5555FF, 0xFF8888FF, 0xFFCCCCFF
« no previous file with comments | « resources/nov-talk-sequence.txt ('k') | samplecode/SampleAnimatedText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698