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

Side by Side Diff: gm/convexpolyclip.cpp

Issue 283273002: remove unused (by clients) SkUnitMapper (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: fix legacy call Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « gm/colortype.cpp ('k') | gm/drawbitmaprect.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 /* 2 /*
3 * Copyright 2014 Google Inc. 3 * Copyright 2014 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "gm.h" 9 #include "gm.h"
10 10
(...skipping 28 matching lines...) Expand all
39 39
40 SkPaint paint; 40 SkPaint paint;
41 SkRect rect = SkRect::MakeWH(wScalar, hScalar); 41 SkRect rect = SkRect::MakeWH(wScalar, hScalar);
42 SkMatrix mat = SkMatrix::I(); 42 SkMatrix mat = SkMatrix::I();
43 for (int i = 0; i < 4; ++i) { 43 for (int i = 0; i < 4; ++i) {
44 paint.setShader(SkGradientShader::CreateRadial( 44 paint.setShader(SkGradientShader::CreateRadial(
45 pt, radius, 45 pt, radius,
46 colors, pos, 46 colors, pos,
47 SK_ARRAY_COUNT(colors), 47 SK_ARRAY_COUNT(colors),
48 SkShader::kRepeat_TileMode, 48 SkShader::kRepeat_TileMode,
49 NULL, 0, &mat))->unref(); 49 0, &mat))->unref();
50 canvas.drawRect(rect, paint); 50 canvas.drawRect(rect, paint);
51 rect.inset(wScalar / 8, hScalar / 8); 51 rect.inset(wScalar / 8, hScalar / 8);
52 mat.preTranslate(6 * wScalar, 6 * hScalar); 52 mat.preTranslate(6 * wScalar, 6 * hScalar);
53 mat.postScale(SK_Scalar1 / 3, SK_Scalar1 / 3); 53 mat.postScale(SK_Scalar1 / 3, SK_Scalar1 / 3);
54 } 54 }
55 55
56 paint.setAntiAlias(true); 56 paint.setAntiAlias(true);
57 paint.setTextSize(wScalar / 2.2f); 57 paint.setTextSize(wScalar / 2.2f);
58 paint.setShader(0); 58 paint.setShader(0);
59 paint.setColor(SK_ColorLTGRAY); 59 paint.setColor(SK_ColorLTGRAY);
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 292
293 SkTLList<Clip> fClips; 293 SkTLList<Clip> fClips;
294 SkBitmap fBmp; 294 SkBitmap fBmp;
295 295
296 typedef GM INHERITED; 296 typedef GM INHERITED;
297 }; 297 };
298 298
299 DEF_GM( return SkNEW(ConvexPolyClip); ) 299 DEF_GM( return SkNEW(ConvexPolyClip); )
300 300
301 } 301 }
OLDNEW
« no previous file with comments | « gm/colortype.cpp ('k') | gm/drawbitmaprect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698