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

Side by Side Diff: gm/drawbitmaprect.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/convexpolyclip.cpp ('k') | gm/gradientDirtyLaundry.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 2011 Google Inc. 3 * Copyright 2011 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 #include "gm.h" 8 #include "gm.h"
9 #include "SkBlurMask.h" 9 #include "SkBlurMask.h"
10 #include "SkBlurMaskFilter.h" 10 #include "SkBlurMaskFilter.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 SkPaint paint; 57 SkPaint paint;
58 SkRect rect = SkRect::MakeWH(wScalar, hScalar); 58 SkRect rect = SkRect::MakeWH(wScalar, hScalar);
59 SkMatrix mat = SkMatrix::I(); 59 SkMatrix mat = SkMatrix::I();
60 for (int i = 0; i < 4; ++i) { 60 for (int i = 0; i < 4; ++i) {
61 paint.setShader(SkGradientShader::CreateRadial( 61 paint.setShader(SkGradientShader::CreateRadial(
62 pt, radius, 62 pt, radius,
63 colors, pos, 63 colors, pos,
64 SK_ARRAY_COUNT(colors), 64 SK_ARRAY_COUNT(colors),
65 SkShader::kRepeat_TileMode, 65 SkShader::kRepeat_TileMode,
66 NULL, 0, &mat))->unref(); 66 0, &mat))->unref();
67 canvas.drawRect(rect, paint); 67 canvas.drawRect(rect, paint);
68 rect.inset(wScalar / 8, hScalar / 8); 68 rect.inset(wScalar / 8, hScalar / 8);
69 mat.postScale(SK_Scalar1 / 4, SK_Scalar1 / 4); 69 mat.postScale(SK_Scalar1 / 4, SK_Scalar1 / 4);
70 } 70 }
71 // Let backends know we won't change this, so they don't have to deep copy i t defensively. 71 // Let backends know we won't change this, so they don't have to deep copy i t defensively.
72 bm->setImmutable(); 72 bm->setImmutable();
73 } 73 }
74 74
75 static const int gSize = 1024; 75 static const int gSize = 1024;
76 76
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 176
177 private: 177 private:
178 typedef GM INHERITED; 178 typedef GM INHERITED;
179 }; 179 };
180 180
181 ////////////////////////////////////////////////////////////////////////////// 181 //////////////////////////////////////////////////////////////////////////////
182 182
183 static GM* MyFactory(void*) { return new DrawBitmapRectGM; } 183 static GM* MyFactory(void*) { return new DrawBitmapRectGM; }
184 static GMRegistry reg(MyFactory); 184 static GMRegistry reg(MyFactory);
185 } 185 }
OLDNEW
« no previous file with comments | « gm/convexpolyclip.cpp ('k') | gm/gradientDirtyLaundry.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698