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

Side by Side Diff: src/core/SkMatrix.cpp

Issue 26167002: Make skia almost compile again with clang. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « src/core/SkAAClip.cpp ('k') | src/core/SkQuadClipper.cpp » ('j') | 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 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
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 "SkMatrix.h" 8 #include "SkMatrix.h"
9 #include "Sk64.h" 9 #include "Sk64.h"
10 #include "SkFloatBits.h" 10 #include "SkFloatBits.h"
(...skipping 29 matching lines...) Expand all
40 enum { 40 enum {
41 kTranslate_Shift, 41 kTranslate_Shift,
42 kScale_Shift, 42 kScale_Shift,
43 kAffine_Shift, 43 kAffine_Shift,
44 kPerspective_Shift, 44 kPerspective_Shift,
45 kRectStaysRect_Shift 45 kRectStaysRect_Shift
46 }; 46 };
47 47
48 #ifdef SK_SCALAR_IS_FLOAT 48 #ifdef SK_SCALAR_IS_FLOAT
49 static const int32_t kScalar1Int = 0x3f800000; 49 static const int32_t kScalar1Int = 0x3f800000;
50 static const int32_t kPersp1Int = 0x3f800000;
51 #else 50 #else
52 #define scalarAsInt(x) (x) 51 #define scalarAsInt(x) (x)
53 static const int32_t kScalar1Int = (1 << 16); 52 static const int32_t kScalar1Int = (1 << 16);
54 static const int32_t kPersp1Int = (1 << 30); 53 static const int32_t kPersp1Int = (1 << 30);
55 #endif 54 #endif
56 55
57 uint8_t SkMatrix::computePerspectiveTypeMask() const { 56 uint8_t SkMatrix::computePerspectiveTypeMask() const {
58 #ifdef SK_SCALAR_SLOW_COMPARES 57 #ifdef SK_SCALAR_SLOW_COMPARES
59 if (SkScalarAs2sCompliment(fMat[kMPersp0]) | 58 if (SkScalarAs2sCompliment(fMat[kMPersp0]) |
60 SkScalarAs2sCompliment(fMat[kMPersp1]) | 59 SkScalarAs2sCompliment(fMat[kMPersp1]) |
(...skipping 2040 matching lines...) Expand 10 before | Expand all | Expand 10 after
2101 rotation1->fX = cos1; 2100 rotation1->fX = cos1;
2102 rotation1->fY = sin1; 2101 rotation1->fY = sin1;
2103 } 2102 }
2104 if (NULL != rotation2) { 2103 if (NULL != rotation2) {
2105 rotation2->fX = cos2; 2104 rotation2->fX = cos2;
2106 rotation2->fY = sin2; 2105 rotation2->fY = sin2;
2107 } 2106 }
2108 2107
2109 return true; 2108 return true;
2110 } 2109 }
OLDNEW
« no previous file with comments | « src/core/SkAAClip.cpp ('k') | src/core/SkQuadClipper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698