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

Side by Side Diff: gm/surface.cpp

Issue 1257773002: rename portable_typeface_always to portable_typeface (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove unncessary change to path test Created 5 years, 4 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 | « gm/samplerstress.cpp ('k') | gm/textbloblooper.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 "gm.h" 8 #include "gm.h"
9 #include "SkGradientShader.h" 9 #include "SkGradientShader.h"
10 #include "SkSurface.h" 10 #include "SkSurface.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 paint.setLCDRenderText(true); 46 paint.setLCDRenderText(true);
47 paint.setDither(true); 47 paint.setDither(true);
48 48
49 paint.setShader(make_shader())->unref(); 49 paint.setShader(make_shader())->unref();
50 canvas->drawRect(SkRect::MakeWH(W, H), paint); 50 canvas->drawRect(SkRect::MakeWH(W, H), paint);
51 paint.setShader(NULL); 51 paint.setShader(NULL);
52 52
53 paint.setColor(SK_ColorWHITE); 53 paint.setColor(SK_ColorWHITE);
54 paint.setTextSize(32); 54 paint.setTextSize(32);
55 paint.setTextAlign(SkPaint::kCenter_Align); 55 paint.setTextAlign(SkPaint::kCenter_Align);
56 sk_tool_utils::set_portable_typeface(&paint);
56 canvas->drawText(label, strlen(label), W / 2, H * 3 / 4, paint); 57 canvas->drawText(label, strlen(label), W / 2, H * 3 / 4, paint);
57 } 58 }
58 59
59 class SurfacePropsGM : public skiagm::GM { 60 class SurfacePropsGM : public skiagm::GM {
60 public: 61 public:
61 SurfacePropsGM() {} 62 SurfacePropsGM() {}
62 63
63 protected: 64 protected:
64 SkString onShortName() override { 65 SkString onShortName() override {
65 return SkString("surfaceprops"); 66 return SkString("surfaceprops");
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 151
151 SkAutoTUnref<SkImage> image2(surf2->newImageSnapshot()); 152 SkAutoTUnref<SkImage> image2(surf2->newImageSnapshot());
152 canvas->drawImage(image2, 10 + SkIntToScalar(image->width()) + 10, 10, N ULL); 153 canvas->drawImage(image2, 10 + SkIntToScalar(image->width()) + 10, 10, N ULL);
153 } 154 }
154 155
155 private: 156 private:
156 typedef GM INHERITED; 157 typedef GM INHERITED;
157 }; 158 };
158 DEF_GM( return new NewSurfaceGM ) 159 DEF_GM( return new NewSurfaceGM )
159 160
OLDNEW
« no previous file with comments | « gm/samplerstress.cpp ('k') | gm/textbloblooper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698