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

Side by Side Diff: gm/colorwheel.cpp

Issue 1237233004: make colorwheelnative displacement dropshadowimagefilter getposttextpath gm portable (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « no previous file | gm/displacement.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 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "Resources.h" 8 #include "Resources.h"
9 #include "SkData.h" 9 #include "SkData.h"
10 #include "gm.h" 10 #include "gm.h"
(...skipping 21 matching lines...) Expand all
32 DEF_SIMPLE_GM(colorwheel, canvas, 256, 256) { 32 DEF_SIMPLE_GM(colorwheel, canvas, 256, 256) {
33 sk_tool_utils::draw_checkerboard(canvas); 33 sk_tool_utils::draw_checkerboard(canvas);
34 draw_bitmap(canvas, "color_wheel.png", 0, 0); // top left 34 draw_bitmap(canvas, "color_wheel.png", 0, 0); // top left
35 draw_bitmap(canvas, "color_wheel.gif", 128, 0); // top right 35 draw_bitmap(canvas, "color_wheel.gif", 128, 0); // top right
36 draw_bitmap(canvas, "color_wheel.webp", 0, 128); // bottom left 36 draw_bitmap(canvas, "color_wheel.webp", 0, 128); // bottom left
37 draw_bitmap(canvas, "color_wheel.jpg", 128, 128); // bottom right 37 draw_bitmap(canvas, "color_wheel.jpg", 128, 128); // bottom right
38 } 38 }
39 39
40 DEF_SIMPLE_GM(colorwheelnative, canvas, 128, 28) { 40 DEF_SIMPLE_GM(colorwheelnative, canvas, 128, 28) {
41 SkPaint paint; 41 SkPaint paint;
42 sk_tool_utils::set_portable_typeface(&paint, NULL, SkTypeface::kBold); 42 sk_tool_utils::set_portable_typeface_always(&paint, NULL, SkTypeface::kBold) ;
43 paint.setTextSize(18.0f); 43 paint.setTextSize(18.0f);
44 44
45 canvas->clear(SK_ColorLTGRAY); 45 canvas->clear(sk_tool_utils::color_to_565(SK_ColorLTGRAY));
46 paint.setColor(SK_ColorRED); 46 paint.setColor(SK_ColorRED);
47 canvas->drawText("R", 1, 8.0f, 20.0f, paint); 47 canvas->drawText("R", 1, 8.0f, 20.0f, paint);
48 paint.setColor(SK_ColorGREEN); 48 paint.setColor(SK_ColorGREEN);
49 canvas->drawText("G", 1, 24.0f, 20.0f, paint); 49 canvas->drawText("G", 1, 24.0f, 20.0f, paint);
50 paint.setColor(SK_ColorBLUE); 50 paint.setColor(SK_ColorBLUE);
51 canvas->drawText("B", 1, 40.0f, 20.0f, paint); 51 canvas->drawText("B", 1, 40.0f, 20.0f, paint);
52 paint.setColor(SK_ColorCYAN); 52 paint.setColor(SK_ColorCYAN);
53 canvas->drawText("C", 1, 56.0f, 20.0f, paint); 53 canvas->drawText("C", 1, 56.0f, 20.0f, paint);
54 paint.setColor(SK_ColorMAGENTA); 54 paint.setColor(SK_ColorMAGENTA);
55 canvas->drawText("M", 1, 72.0f, 20.0f, paint); 55 canvas->drawText("M", 1, 72.0f, 20.0f, paint);
56 paint.setColor(SK_ColorYELLOW); 56 paint.setColor(SK_ColorYELLOW);
57 canvas->drawText("Y", 1, 88.0f, 20.0f, paint); 57 canvas->drawText("Y", 1, 88.0f, 20.0f, paint);
58 paint.setColor(SK_ColorBLACK); 58 paint.setColor(SK_ColorBLACK);
59 canvas->drawText("K", 1, 104.0f, 20.0f, paint); 59 canvas->drawText("K", 1, 104.0f, 20.0f, paint);
60 } 60 }
OLDNEW
« no previous file with comments | « no previous file | gm/displacement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698