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

Side by Side Diff: tools/PictureRenderer.cpp

Issue 1138263002: Revert of stop calling SkScalarDiv (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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
« no previous file with comments | « tests/PathCoverageTest.cpp ('k') | no next file » | 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 * 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
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 = SkScalarInvert(SkScalarLog(2) ); 43 static const SkScalar log2_conversion_factor = SkScalarDiv(1, 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
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
OLDNEW
« no previous file with comments | « tests/PathCoverageTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698