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

Side by Side Diff: samplecode/SampleVertices.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 | « samplecode/SampleUnitMapper.cpp ('k') | src/animator/SkDrawGradient.h » ('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 "SampleCode.h" 8 #include "SampleCode.h"
9 #include "SkView.h" 9 #include "SkView.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 29 matching lines...) Expand all
40 40
41 return SkShader::CreateBitmapShader(bm, SkShader::kRepeat_TileMode, 41 return SkShader::CreateBitmapShader(bm, SkShader::kRepeat_TileMode,
42 SkShader::kRepeat_TileMode); 42 SkShader::kRepeat_TileMode);
43 } 43 }
44 44
45 static SkShader* make_shader1(const SkIPoint& size) { 45 static SkShader* make_shader1(const SkIPoint& size) {
46 SkPoint pts[] = { { 0, 0 }, 46 SkPoint pts[] = { { 0, 0 },
47 { SkIntToScalar(size.fX), SkIntToScalar(size.fY) } }; 47 { SkIntToScalar(size.fX), SkIntToScalar(size.fY) } };
48 SkColor colors[] = { SK_ColorRED, SK_ColorGREEN, SK_ColorBLUE, SK_ColorRED } ; 48 SkColor colors[] = { SK_ColorRED, SK_ColorGREEN, SK_ColorBLUE, SK_ColorRED } ;
49 return SkGradientShader::CreateLinear(pts, colors, NULL, 49 return SkGradientShader::CreateLinear(pts, colors, NULL,
50 SK_ARRAY_COUNT(colors), SkShader::kMirror_TileMode, NULL); 50 SK_ARRAY_COUNT(colors), SkShader::kMirror_TileMode);
51 } 51 }
52 52
53 class VerticesView : public SampleView { 53 class VerticesView : public SampleView {
54 SkShader* fShader0; 54 SkShader* fShader0;
55 SkShader* fShader1; 55 SkShader* fShader1;
56 56
57 public: 57 public:
58 VerticesView() { 58 VerticesView() {
59 SkIPoint size; 59 SkIPoint size;
60 60
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 223
224 Rec fRecs[3]; 224 Rec fRecs[3];
225 225
226 typedef SampleView INHERITED; 226 typedef SampleView INHERITED;
227 }; 227 };
228 228
229 ////////////////////////////////////////////////////////////////////////////// 229 //////////////////////////////////////////////////////////////////////////////
230 230
231 static SkView* MyFactory() { return new VerticesView; } 231 static SkView* MyFactory() { return new VerticesView; }
232 static SkViewRegister reg(MyFactory); 232 static SkViewRegister reg(MyFactory);
OLDNEW
« no previous file with comments | « samplecode/SampleUnitMapper.cpp ('k') | src/animator/SkDrawGradient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698