diff options
author | Cary Clark <caryclark@google.com> | 2018-06-20 12:45:16 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-06-20 17:07:48 +0000 |
commit | 75fd449d81ab0b083ca97c5ae4dffb5cb9427fdb (patch) | |
tree | 974abd52cb35f283518924886cb73f51b6df9116 /docs | |
parent | 69162d0750b576e8f13e9303035d7e5e5e6e4d90 (diff) |
fix for new fiddle compiler
New compiler is stricter, requiring
some variable initialization, braces.
A bug in SkRect was fixed, changing
debug output.
TBR=jcgregario@google.com
Docs-Preview: https://skia.org/?cl=136179
Bug: skia:6898
Change-Id: I19ef1dab2d3154778d0613e7337fdcfb340dacc7
Reviewed-on: https://skia-review.googlesource.com/136179
Commit-Queue: Cary Clark <caryclark@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
Auto-Submit: Cary Clark <caryclark@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/SkBitmap_Reference.bmh | 8 | ||||
-rw-r--r-- | docs/SkPaint_Reference.bmh | 2 | ||||
-rw-r--r-- | docs/SkPath_Reference.bmh | 2 | ||||
-rw-r--r-- | docs/SkRect_Reference.bmh | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/docs/SkBitmap_Reference.bmh b/docs/SkBitmap_Reference.bmh index a7cfb1dda1..40c2d58369 100644 --- a/docs/SkBitmap_Reference.bmh +++ b/docs/SkBitmap_Reference.bmh @@ -2484,10 +2484,10 @@ precision. const int w = 4; const int h = 4; SkColor colors[][w] = { - 0x00000000, 0x2a0e002a, 0x55380055, 0x7f7f007f, - 0x2a000e2a, 0x551c1c55, 0x7f542a7f, 0xaaaa38aa, - 0x55003855, 0x7f2a547f, 0xaa7171aa, 0xd4d48dd4, - 0x7f007f7f, 0xaa38aaaa, 0xd48dd4d4, 0xffffffff, + { 0x00000000, 0x2a0e002a, 0x55380055, 0x7f7f007f }, + { 0x2a000e2a, 0x551c1c55, 0x7f542a7f, 0xaaaa38aa }, + { 0x55003855, 0x7f2a547f, 0xaa7171aa, 0xd4d48dd4 }, + { 0x7f007f7f, 0xaa38aaaa, 0xd48dd4d4, 0xffffffff } }; SkDebugf("Premultiplied:\n"); for (int y = 0; y < h; ++y) { diff --git a/docs/SkPaint_Reference.bmh b/docs/SkPaint_Reference.bmh index 001ea53244..9b9d001750 100644 --- a/docs/SkPaint_Reference.bmh +++ b/docs/SkPaint_Reference.bmh @@ -3890,7 +3890,7 @@ void draw(SkCanvas* canvas) { #Example SkPaint paint; paint.setTextEncoding((SkPaint::TextEncoding) 4); - SkDebugf("4 %c= text encoding\n", 4 == paint.getTextEncoding() ? '=' : '!'); + SkDebugf("4 %c= text encoding\n", (SkPaint::TextEncoding) 4 == paint.getTextEncoding() ? '=' : '!'); #StdOut 4 != text encoding diff --git a/docs/SkPath_Reference.bmh b/docs/SkPath_Reference.bmh index deb1a046f5..75840b3144 100644 --- a/docs/SkPath_Reference.bmh +++ b/docs/SkPath_Reference.bmh @@ -1576,7 +1576,7 @@ treated as a point. void draw(SkCanvas* canvas) { SkPoint points[] = {{1, 0}, {0, 0}, {0, 0}, {0, 0}}; SkScalar step = 1; - SkScalar prior, length, degenerate; + SkScalar prior, length = 0, degenerate = 0; do { prior = points[0].fX; step /= 2; diff --git a/docs/SkRect_Reference.bmh b/docs/SkRect_Reference.bmh index fd747b0137..71e26f2e33 100644 --- a/docs/SkRect_Reference.bmh +++ b/docs/SkRect_Reference.bmh @@ -669,7 +669,7 @@ left: -41 right: -20 centerX: -30.5 #In Property #Line # returns midpoint in y ## Returns average of top edge and bottom edge. Result does not change if Rect -is sorted. Result may overflow to infinity if Rect is far from the origin. +is sorted. #Return midpoint in y ## @@ -678,7 +678,7 @@ is sorted. Result may overflow to infinity if Rect is far from the origin. SkDebugf("left: %g right: %g centerX: %g ", rect.left(), rect.right(), rect.centerX()); SkDebugf("safe mid x: %g\n", rect.left() / 2 + rect.right() / 2); #StdOut -left: 2e+38 right: 3e+38 centerX: inf safe mid x: 2.5e+38 +left: 2e+38 right: 3e+38 centerX: 2.5e+38 safe mid x: 2.5e+38 ## ## |