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

Side by Side Diff: samplecode/SampleLayers.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/SampleGradients.cpp ('k') | samplecode/SamplePatch.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 "SampleCode.h" 8 #include "SampleCode.h"
9 #include "SkView.h" 9 #include "SkView.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 13 matching lines...) Expand all
24 #include "SkTypeface.h" 24 #include "SkTypeface.h"
25 #include "SkUtils.h" 25 #include "SkUtils.h"
26 #include "SkKey.h" 26 #include "SkKey.h"
27 #include "SkXfermode.h" 27 #include "SkXfermode.h"
28 #include "SkDrawFilter.h" 28 #include "SkDrawFilter.h"
29 29
30 static void make_paint(SkPaint* paint, const SkMatrix& localMatrix) { 30 static void make_paint(SkPaint* paint, const SkMatrix& localMatrix) {
31 SkColor colors[] = { 0, SK_ColorWHITE }; 31 SkColor colors[] = { 0, SK_ColorWHITE };
32 SkPoint pts[] = { { 0, 0 }, { 0, SK_Scalar1*20 } }; 32 SkPoint pts[] = { { 0, 0 }, { 0, SK_Scalar1*20 } };
33 SkShader* s = SkGradientShader::CreateLinear(pts, colors, NULL, 2, SkShader: :kClamp_TileMode, 33 SkShader* s = SkGradientShader::CreateLinear(pts, colors, NULL, 2, SkShader: :kClamp_TileMode,
34 NULL, 0, &localMatrix); 34 0, &localMatrix);
35 35
36 paint->setShader(s)->unref(); 36 paint->setShader(s)->unref();
37 paint->setXfermodeMode(SkXfermode::kDstIn_Mode); 37 paint->setXfermodeMode(SkXfermode::kDstIn_Mode);
38 } 38 }
39 39
40 static void dump_layers(const char label[], SkCanvas* canvas) { 40 static void dump_layers(const char label[], SkCanvas* canvas) {
41 SkDebugf("Dump Layers(%s)\n", label); 41 SkDebugf("Dump Layers(%s)\n", label);
42 42
43 SkCanvas::LayerIter iter(canvas, true); 43 SkCanvas::LayerIter iter(canvas, true);
44 int index = 0; 44 int index = 0;
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 } 231 }
232 232
233 private: 233 private:
234 typedef SkView INHERITED; 234 typedef SkView INHERITED;
235 }; 235 };
236 236
237 ////////////////////////////////////////////////////////////////////////////// 237 //////////////////////////////////////////////////////////////////////////////
238 238
239 static SkView* MyFactory() { return new LayersView; } 239 static SkView* MyFactory() { return new LayersView; }
240 static SkViewRegister reg(MyFactory); 240 static SkViewRegister reg(MyFactory);
OLDNEW
« no previous file with comments | « samplecode/SampleGradients.cpp ('k') | samplecode/SamplePatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698