aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm
diff options
context:
space:
mode:
authorGravatar caryclark <caryclark@google.com>2015-07-15 14:23:50 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-07-15 14:23:50 -0700
commit18a240d15ca132fab01ba179bd1165d6a182f1cf (patch)
treed6524185db0e7288ae19d8d8aa6dd9a6a84fdcc4 /gm
parente148ac5262eeb3e9a3726f1e5335cbfe33c879d9 (diff)
make *imagefilter morphology iamge bitmapsource gm portable
TBR=reed@google.com Review URL: https://codereview.chromium.org/1236403002
Diffstat (limited to 'gm')
-rw-r--r--gm/bitmapsource.cpp2
-rw-r--r--gm/image.cpp2
-rw-r--r--gm/morphology.cpp2
-rw-r--r--gm/offsetimagefilter.cpp8
-rw-r--r--gm/pictureimagefilter.cpp2
5 files changed, 9 insertions, 7 deletions
diff --git a/gm/bitmapsource.cpp b/gm/bitmapsource.cpp
index a0a3eca663..33752a26e5 100644
--- a/gm/bitmapsource.cpp
+++ b/gm/bitmapsource.cpp
@@ -27,7 +27,7 @@ protected:
canvas.clear(0x00000000);
SkPaint paint;
paint.setAntiAlias(true);
- sk_tool_utils::set_portable_typeface(&paint);
+ sk_tool_utils::set_portable_typeface_always(&paint);
paint.setColor(0xFFFFFFFF);
paint.setTextSize(SkIntToScalar(96));
const char* str = "e";
diff --git a/gm/image.cpp b/gm/image.cpp
index 5e840fbb2f..68bcd7a26f 100644
--- a/gm/image.cpp
+++ b/gm/image.cpp
@@ -149,7 +149,7 @@ protected:
SkPaint textPaint;
textPaint.setAntiAlias(true);
- sk_tool_utils::set_portable_typeface(&textPaint);
+ sk_tool_utils::set_portable_typeface_always(&textPaint);
textPaint.setTextSize(8);
canvas->drawText(kLabel1, strlen(kLabel1), 10, 60, textPaint);
diff --git a/gm/morphology.cpp b/gm/morphology.cpp
index cb321c6efd..e12c8fb8aa 100644
--- a/gm/morphology.cpp
+++ b/gm/morphology.cpp
@@ -31,7 +31,7 @@ protected:
canvas.clear(0x0);
SkPaint paint;
paint.setAntiAlias(true);
- sk_tool_utils::set_portable_typeface(&paint);
+ sk_tool_utils::set_portable_typeface_always(&paint);
const char* str1 = "ABC";
const char* str2 = "XYZ";
paint.setColor(0xFFFFFFFF);
diff --git a/gm/offsetimagefilter.cpp b/gm/offsetimagefilter.cpp
index bb2eae19d5..3808021f5d 100644
--- a/gm/offsetimagefilter.cpp
+++ b/gm/offsetimagefilter.cpp
@@ -31,8 +31,8 @@ protected:
canvas.clear(0);
SkPaint paint;
paint.setAntiAlias(true);
- sk_tool_utils::set_portable_typeface(&paint);
- paint.setColor(0xD000D000);
+ sk_tool_utils::set_portable_typeface_always(&paint);
+ paint.setColor(sk_tool_utils::color_to_565(0xD000D000));
paint.setTextSize(96);
canvas.drawText("e", 1, 15, 65, paint);
}
@@ -67,7 +67,9 @@ protected:
fCheckerboard.allocN32Pixels(80, 80);
SkCanvas checkerboardCanvas(fCheckerboard);
- sk_tool_utils::draw_checkerboard(&checkerboardCanvas, 0xFFA0A0A0, 0xFF404040, 8);
+ sk_tool_utils::draw_checkerboard(&checkerboardCanvas,
+ sk_tool_utils::color_to_565(0xFFA0A0A0),
+ sk_tool_utils::color_to_565(0xFF404040), 8);
}
void onDraw(SkCanvas* canvas) override {
diff --git a/gm/pictureimagefilter.cpp b/gm/pictureimagefilter.cpp
index fd8ae62fa2..a951cb403d 100644
--- a/gm/pictureimagefilter.cpp
+++ b/gm/pictureimagefilter.cpp
@@ -28,7 +28,7 @@ protected:
canvas->clear(SK_ColorBLACK);
SkPaint paint;
paint.setAntiAlias(true);
- sk_tool_utils::set_portable_typeface(&paint);
+ sk_tool_utils::set_portable_typeface_always(&paint);
paint.setColor(0xFFFFFFFF);
paint.setTextSize(SkIntToScalar(96));
const char* str = "e";