OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 "gm.h" | 8 #include "gm.h" |
9 | 9 |
10 #include "Resources.h" | 10 #include "Resources.h" |
11 #include "SampleCode.h" | 11 #include "SampleCode.h" |
12 #include "SkBlurMaskFilter.h" | 12 #include "SkBlurMaskFilter.h" |
13 #include "SkCanvas.h" | 13 #include "SkCanvas.h" |
14 #include "SkColorPriv.h" | 14 #include "SkColorPriv.h" |
15 #include "SkImageDecoder.h" | 15 #include "SkImageDecoder.h" |
16 #include "SkPath.h" | |
17 #include "SkRandom.h" | 16 #include "SkRandom.h" |
18 #include "SkStream.h" | 17 #include "SkStream.h" |
19 #include "SkTime.h" | 18 #include "SkTime.h" |
20 | 19 |
21 // Intended to exercise pixel snapping observed with scaled images (and | 20 // Intended to exercise pixel snapping observed with scaled images (and |
22 // with non-scaled images, but for a different reason): Bug 1145 | 21 // with non-scaled images, but for a different reason): Bug 1145 |
23 | 22 |
24 class IdentityScaleView : public SampleView { | 23 class IdentityScaleView : public SampleView { |
25 public: | 24 public: |
26 IdentityScaleView(const char imageFilename[]) { | 25 IdentityScaleView(const char imageFilename[]) { |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 } | 83 } |
85 | 84 |
86 private: | 85 private: |
87 typedef SampleView INHERITED; | 86 typedef SampleView INHERITED; |
88 }; | 87 }; |
89 | 88 |
90 ////////////////////////////////////////////////////////////////////////////// | 89 ////////////////////////////////////////////////////////////////////////////// |
91 | 90 |
92 static SkView* MyFactory() { return new IdentityScaleView("mandrill_256.png"); } | 91 static SkView* MyFactory() { return new IdentityScaleView("mandrill_256.png"); } |
93 static SkViewRegister reg(MyFactory); | 92 static SkViewRegister reg(MyFactory); |
OLD | NEW |