| OLD | NEW |
| 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 "SkView.h" |
| 10 #include "SkBlurMask.h" | 10 #include "SkBlurMask.h" |
| 11 #include "SkCanvas.h" | 11 #include "SkCanvas.h" |
| 12 #include "SkCornerPathEffect.h" | 12 #include "SkCornerPathEffect.h" |
| 13 #include "SkGradientShader.h" | 13 #include "SkGradientShader.h" |
| 14 #include "SkGraphics.h" | 14 #include "SkGraphics.h" |
| 15 #include "SkImageDecoder.h" | |
| 16 #include "SkPath.h" | 15 #include "SkPath.h" |
| 17 #include "SkRandom.h" | 16 #include "SkRandom.h" |
| 18 #include "SkRegion.h" | 17 #include "SkRegion.h" |
| 19 #include "SkShader.h" | 18 #include "SkShader.h" |
| 20 #include "SkUtils.h" | 19 #include "SkUtils.h" |
| 21 #include "SkColorPriv.h" | 20 #include "SkColorPriv.h" |
| 22 #include "SkColorFilter.h" | 21 #include "SkColorFilter.h" |
| 23 #include "SkTime.h" | 22 #include "SkTime.h" |
| 24 #include "SkTypeface.h" | 23 #include "SkTypeface.h" |
| 25 #include "SkXfermode.h" | 24 #include "SkXfermode.h" |
| 26 | 25 |
| 27 #include "SkStream.h" | 26 #include "SkStream.h" |
| 28 #include "SkColorPriv.h" | 27 #include "SkColorPriv.h" |
| 29 #include "SkImageDecoder.h" | |
| 30 #include "SkBlurMaskFilter.h" | 28 #include "SkBlurMaskFilter.h" |
| 31 | 29 |
| 32 static void setNamedTypeface(SkPaint* paint, const char name[]) { | 30 static void setNamedTypeface(SkPaint* paint, const char name[]) { |
| 33 SkTypeface* face = SkTypeface::CreateFromName(name, SkTypeface::kNormal); | 31 SkTypeface* face = SkTypeface::CreateFromName(name, SkTypeface::kNormal); |
| 34 paint->setTypeface(face); | 32 paint->setTypeface(face); |
| 35 SkSafeUnref(face); | 33 SkSafeUnref(face); |
| 36 } | 34 } |
| 37 | 35 |
| 38 static uint16_t gBG[] = { 0xFFFF, 0xCCCF, 0xCCCF, 0xFFFF }; | 36 static uint16_t gBG[] = { 0xFFFF, 0xCCCF, 0xCCCF, 0xFFFF }; |
| 39 | 37 |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 } | 195 } |
| 198 | 196 |
| 199 private: | 197 private: |
| 200 typedef SampleView INHERITED; | 198 typedef SampleView INHERITED; |
| 201 }; | 199 }; |
| 202 | 200 |
| 203 ////////////////////////////////////////////////////////////////////////////// | 201 ////////////////////////////////////////////////////////////////////////////// |
| 204 | 202 |
| 205 static SkView* MyFactory() { return new XfermodesBlurView; } | 203 static SkView* MyFactory() { return new XfermodesBlurView; } |
| 206 static SkViewRegister reg(MyFactory); | 204 static SkViewRegister reg(MyFactory); |
| OLD | NEW |