| 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 #ifndef sk_tool_utils_DEFINED | 8 #ifndef sk_tool_utils_DEFINED | 
| 9 #define sk_tool_utils_DEFINED | 9 #define sk_tool_utils_DEFINED | 
| 10 | 10 | 
| 11 #include "SkColor.h" | 11 #include "SkColor.h" | 
| 12 #include "SkImageEncoder.h" | 12 #include "SkImageEncoder.h" | 
| 13 #include "SkImageInfo.h" | 13 #include "SkImageInfo.h" | 
| 14 #include "SkPixelSerializer.h" | 14 #include "SkPixelSerializer.h" | 
| 15 #include "SkRandom.h" | 15 #include "SkRandom.h" | 
| 16 #include "SkTDArray.h" | 16 #include "SkTDArray.h" | 
| 17 #include "SkTypeface.h" | 17 #include "SkTypeface.h" | 
| 18 | 18 | 
| 19 class SkBitmap; | 19 class SkBitmap; | 
| 20 class SkCanvas; | 20 class SkCanvas; | 
| 21 class SkPaint; | 21 class SkPaint; | 
| 22 class SkPath; | 22 class SkPath; | 
|  | 23 class SkRRect; | 
| 23 class SkShader; | 24 class SkShader; | 
| 24 class SkTestFont; | 25 class SkTestFont; | 
| 25 class SkTextBlobBuilder; | 26 class SkTextBlobBuilder; | 
| 26 | 27 | 
| 27 namespace sk_tool_utils { | 28 namespace sk_tool_utils { | 
| 28 | 29 | 
| 29     const char* colortype_name(SkColorType); | 30     const char* colortype_name(SkColorType); | 
| 30 | 31 | 
| 31     /** | 32     /** | 
| 32      * Map opaque colors from 8888 to 565. | 33      * Map opaque colors from 8888 to 565. | 
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 123     void create_frustum_normal_map(SkBitmap* bm, const SkIRect& dst); | 124     void create_frustum_normal_map(SkBitmap* bm, const SkIRect& dst); | 
| 124 | 125 | 
| 125     void create_tetra_normal_map(SkBitmap* bm, const SkIRect& dst); | 126     void create_tetra_normal_map(SkBitmap* bm, const SkIRect& dst); | 
| 126 | 127 | 
| 127     void make_big_path(SkPath& path); | 128     void make_big_path(SkPath& path); | 
| 128 | 129 | 
| 129     // Return a blurred version of 'src'. This doesn't use a separable filter | 130     // Return a blurred version of 'src'. This doesn't use a separable filter | 
| 130     // so it is slow! | 131     // so it is slow! | 
| 131     SkBitmap slow_blur(const SkBitmap& src, float sigma); | 132     SkBitmap slow_blur(const SkBitmap& src, float sigma); | 
| 132 | 133 | 
|  | 134     SkRect compute_central_occluder(const SkRRect& rr); | 
|  | 135 | 
| 133     // A helper object to test the topological sorting code (TopoSortBench.cpp &
      TopoSortTest.cpp) | 136     // A helper object to test the topological sorting code (TopoSortBench.cpp &
      TopoSortTest.cpp) | 
| 134     class TopoTestNode { | 137     class TopoTestNode { | 
| 135     public: | 138     public: | 
| 136         TopoTestNode(int id) : fID(id), fOutputPos(-1), fTempMark(false) { } | 139         TopoTestNode(int id) : fID(id), fOutputPos(-1), fTempMark(false) { } | 
| 137 | 140 | 
| 138         void dependsOn(TopoTestNode* src) { | 141         void dependsOn(TopoTestNode* src) { | 
| 139             *fDependencies.append() = src; | 142             *fDependencies.append() = src; | 
| 140         } | 143         } | 
| 141 | 144 | 
| 142         int id() const { return fID; } | 145         int id() const { return fID; } | 
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 216         int  fID; | 219         int  fID; | 
| 217         int  fOutputPos; | 220         int  fOutputPos; | 
| 218         bool fTempMark; | 221         bool fTempMark; | 
| 219 | 222 | 
| 220         SkTDArray<TopoTestNode*> fDependencies; | 223         SkTDArray<TopoTestNode*> fDependencies; | 
| 221     }; | 224     }; | 
| 222 | 225 | 
| 223 }  // namespace sk_tool_utils | 226 }  // namespace sk_tool_utils | 
| 224 | 227 | 
| 225 #endif  // sk_tool_utils_DEFINED | 228 #endif  // sk_tool_utils_DEFINED | 
| OLD | NEW | 
|---|