aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-09-09 02:01:52 +0000
committerGravatar skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-09-09 02:01:52 +0000
commit3590a248bb110a5346b6e2cbdda5cc3345cbe01b (patch)
treebccb725a9dce898463ce2038e35a100d60d824bd
parent7c57e0e7ccb05a4b7ce05b883ba06380d5578881 (diff)
Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@5452 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r--gm/techtalk1.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/gm/techtalk1.cpp b/gm/techtalk1.cpp
index bc0b7bcd3a..30567a674b 100644
--- a/gm/techtalk1.cpp
+++ b/gm/techtalk1.cpp
@@ -55,7 +55,7 @@ static void setGLFrame(SkPaint* paint) {
static void show_mesh(SkCanvas* canvas, const SkRect& r) {
SkPaint paint;
setGLFrame(&paint);
-
+
canvas->drawRect(r, paint);
canvas->drawLine(r.fLeft, r.fTop, r.fRight, r.fBottom, paint);
}
@@ -87,13 +87,13 @@ static void show_mesh_between(SkCanvas* canvas, const SkPath& p0, const SkPath&
SkPath d0, d1;
tesselate(p0, &d0);
tesselate(p1, &d1);
-
+
SkPoint pts0[256*2], pts1[256];
int count = d0.getPoints(pts0, SK_ARRAY_COUNT(pts0));
int count1 = d1.getPoints(pts1, SK_ARRAY_COUNT(pts1));
SkASSERT(count == count1);
memcpy(&pts0[count], pts1, count * sizeof(SkPoint));
-
+
uint16_t indices[256*6];
uint16_t* ndx = indices;
for (int i = 0; i < count; ++i) {
@@ -125,9 +125,9 @@ typedef void (*DrawProc)(SkCanvas* canvas, bool showGL, int flags);
static void draw_line(SkCanvas* canvas, bool showGL, int flags) {
SkPaint paint;
paint.setAntiAlias(true);
-
+
canvas->drawLine(50, 50, 400, 100, paint);
-
+
canvas->rotate(40);
setFade(&paint, showGL);
paint.setStrokeWidth(40);
@@ -161,7 +161,7 @@ static void draw_rect(SkCanvas* canvas, bool showGL, int flags) {
r.toQuad(&pts[0]);
r.inset(rad*2, rad*2);
r.toQuad(&pts[4]);
-
+
const uint16_t indices[] = {
0, 4, 1, 5, 2, 6, 3, 7, 0, 4
};
@@ -172,9 +172,9 @@ static void draw_rect(SkCanvas* canvas, bool showGL, int flags) {
static void draw_oval(SkCanvas* canvas, bool showGL, int flags) {
SkPaint paint;
paint.setAntiAlias(true);
-
+
SkRect r = SkRect::MakeLTRB(50, 70, 250, 370);
-
+
setFade(&paint, showGL);
canvas->drawOval(r, paint);
if (showGL) {
@@ -193,9 +193,9 @@ static void draw_oval(SkCanvas* canvas, bool showGL, int flags) {
} break;
}
}
-
+
canvas->translate(320, 0);
-
+
paint.setStyle(SkPaint::kStroke_Style);
paint.setStrokeWidth(25);
canvas->drawOval(r, paint);
@@ -327,7 +327,7 @@ protected:
SkRect src = SkRect::MakeWH(640, 480);
SkMatrix matrix;
matrix.setRectToRect(src, dst, SkMatrix::kCenter_ScaleToFit);
-
+
canvas->concat(matrix);
fProc(canvas, fShowGL, fFlags);
}
@@ -360,7 +360,7 @@ ADD_GM(TalkGM, (3, false))
ADD_GM(TalkGM, (3, true))
ADD_GM(TalkGM, (4, false))
ADD_GM(TalkGM, (4, true))
-
+
//static GM* MyFactory(void*) { return new TalkGM(0, false); }
//static GMRegistry reg(MyFactory);