OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 "PictureRenderer.h" | 8 #include "PictureRenderer.h" |
9 #include "picture_utils.h" | 9 #include "picture_utils.h" |
10 #include "SamplePipeControllers.h" | 10 #include "SamplePipeControllers.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 #include "SkStream.h" | 33 #include "SkStream.h" |
34 #include "SkString.h" | 34 #include "SkString.h" |
35 #include "SkSurface.h" | 35 #include "SkSurface.h" |
36 #include "SkTemplates.h" | 36 #include "SkTemplates.h" |
37 #include "SkTDArray.h" | 37 #include "SkTDArray.h" |
38 #include "SkThreadUtils.h" | 38 #include "SkThreadUtils.h" |
39 #include "SkTypes.h" | 39 #include "SkTypes.h" |
40 #include "sk_tool_utils.h" | 40 #include "sk_tool_utils.h" |
41 | 41 |
42 static inline SkScalar scalar_log2(SkScalar x) { | 42 static inline SkScalar scalar_log2(SkScalar x) { |
43 static const SkScalar log2_conversion_factor = SkScalarDiv(1, SkScalarLog(2)
); | 43 static const SkScalar log2_conversion_factor = SkScalarInvert(SkScalarLog(2)
); |
44 | 44 |
45 return SkScalarLog(x) * log2_conversion_factor; | 45 return SkScalarLog(x) * log2_conversion_factor; |
46 } | 46 } |
47 | 47 |
48 namespace sk_tools { | 48 namespace sk_tools { |
49 | 49 |
50 enum { | 50 enum { |
51 kDefaultTileWidth = 256, | 51 kDefaultTileWidth = 256, |
52 kDefaultTileHeight = 256 | 52 kDefaultTileHeight = 256 |
53 }; | 53 }; |
(...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
813 case kNone_BBoxHierarchyType: | 813 case kNone_BBoxHierarchyType: |
814 return NULL; | 814 return NULL; |
815 case kRTree_BBoxHierarchyType: | 815 case kRTree_BBoxHierarchyType: |
816 return SkNEW(SkRTreeFactory); | 816 return SkNEW(SkRTreeFactory); |
817 } | 817 } |
818 SkASSERT(0); // invalid bbhType | 818 SkASSERT(0); // invalid bbhType |
819 return NULL; | 819 return NULL; |
820 } | 820 } |
821 | 821 |
822 } // namespace sk_tools | 822 } // namespace sk_tools |
OLD | NEW |