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

Side by Side Diff: samplecode/SampleShaderText.cpp

Issue 1273613002: Revert of IWYU: 'core' target, files starting A-C. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « samplecode/SamplePathFuzz.cpp ('k') | samplecode/SampleStringArt.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 2011 Google Inc. 2 * Copyright 2011 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 "SampleCode.h" 8 #include "SampleCode.h"
9 #include "SkView.h"
9 #include "SkCanvas.h" 10 #include "SkCanvas.h"
10 #include "SkGradientShader.h" 11 #include "SkGradientShader.h"
11 #include "SkPath.h"
12 #include "SkView.h"
13 12
14 static void makebm(SkBitmap* bm, int w, int h) { 13 static void makebm(SkBitmap* bm, int w, int h) {
15 bm->allocN32Pixels(w, h); 14 bm->allocN32Pixels(w, h);
16 bm->eraseColor(SK_ColorTRANSPARENT); 15 bm->eraseColor(SK_ColorTRANSPARENT);
17 16
18 SkCanvas canvas(*bm); 17 SkCanvas canvas(*bm);
19 SkScalar s = SkIntToScalar(w < h ? w : h); 18 SkScalar s = SkIntToScalar(w < h ? w : h);
20 SkPoint pts[] = { { 0, 0 }, { s, s } }; 19 SkPoint pts[] = { { 0, 0 }, { s, s } };
21 SkColor colors[] = { SK_ColorRED, SK_ColorGREEN, SK_ColorBLUE }; 20 SkColor colors[] = { SK_ColorRED, SK_ColorGREEN, SK_ColorBLUE };
22 SkScalar pos[] = { 0, SK_Scalar1/2, SK_Scalar1 }; 21 SkScalar pos[] = { 0, SK_Scalar1/2, SK_Scalar1 };
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 } 188 }
190 189
191 private: 190 private:
192 typedef SampleView INHERITED; 191 typedef SampleView INHERITED;
193 }; 192 };
194 193
195 /////////////////////////////////////////////////////////////////////////////// 194 ///////////////////////////////////////////////////////////////////////////////
196 195
197 static SkView* MyFactory() { return new ShaderTextView; } 196 static SkView* MyFactory() { return new ShaderTextView; }
198 static SkViewRegister reg(MyFactory); 197 static SkViewRegister reg(MyFactory);
OLDNEW
« no previous file with comments | « samplecode/SamplePathFuzz.cpp ('k') | samplecode/SampleStringArt.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698