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

Side by Side Diff: src/utils/SkMatrix44.cpp

Issue 147033002: Revert of Use SkMScalar as intermediates in SkMatrix44::setConcat. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 11 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 | « no previous file | 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 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 "SkMatrix44.h" 8 #include "SkMatrix44.h"
9 9
10 static inline bool eq4(const SkMScalar* SK_RESTRICT a, 10 static inline bool eq4(const SkMScalar* SK_RESTRICT a,
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 result[6] = result[7] = result[8] = result[9] = 0; 376 result[6] = result[7] = result[8] = result[9] = 0;
377 result[10] = a.fMat[2][2] * b.fMat[2][2]; 377 result[10] = a.fMat[2][2] * b.fMat[2][2];
378 result[11] = 0; 378 result[11] = 0;
379 result[12] = a.fMat[0][0] * b.fMat[3][0] + a.fMat[3][0]; 379 result[12] = a.fMat[0][0] * b.fMat[3][0] + a.fMat[3][0];
380 result[13] = a.fMat[1][1] * b.fMat[3][1] + a.fMat[3][1]; 380 result[13] = a.fMat[1][1] * b.fMat[3][1] + a.fMat[3][1];
381 result[14] = a.fMat[2][2] * b.fMat[3][2] + a.fMat[3][2]; 381 result[14] = a.fMat[2][2] * b.fMat[3][2] + a.fMat[3][2];
382 result[15] = 1; 382 result[15] = 1;
383 } else { 383 } else {
384 for (int j = 0; j < 4; j++) { 384 for (int j = 0; j < 4; j++) {
385 for (int i = 0; i < 4; i++) { 385 for (int i = 0; i < 4; i++) {
386 SkMScalar value = 0; 386 double value = 0;
387 for (int k = 0; k < 4; k++) { 387 for (int k = 0; k < 4; k++) {
388 value += a.fMat[k][i] * b.fMat[j][k]; 388 value += SkMScalarToDouble(a.fMat[k][i]) * b.fMat[j][k];
389 } 389 }
390 *result++ = value; 390 *result++ = SkDoubleToMScalar(value);
391 } 391 }
392 } 392 }
393 } 393 }
394 394
395 if (useStorage) { 395 if (useStorage) {
396 memcpy(fMat, storage, sizeof(storage)); 396 memcpy(fMat, storage, sizeof(storage));
397 } 397 }
398 this->dirtyTypeMask(); 398 this->dirtyTypeMask();
399 } 399 }
400 400
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
923 dst[SkMatrix::kMSkewY] = SkMScalarToScalar(fMat[0][1]); 923 dst[SkMatrix::kMSkewY] = SkMScalarToScalar(fMat[0][1]);
924 dst[SkMatrix::kMScaleY] = SkMScalarToScalar(fMat[1][1]); 924 dst[SkMatrix::kMScaleY] = SkMScalarToScalar(fMat[1][1]);
925 dst[SkMatrix::kMTransY] = SkMScalarToScalar(fMat[3][1]); 925 dst[SkMatrix::kMTransY] = SkMScalarToScalar(fMat[3][1]);
926 926
927 dst[SkMatrix::kMPersp0] = SkMScalarToScalar(fMat[0][3]); 927 dst[SkMatrix::kMPersp0] = SkMScalarToScalar(fMat[0][3]);
928 dst[SkMatrix::kMPersp1] = SkMScalarToScalar(fMat[1][3]); 928 dst[SkMatrix::kMPersp1] = SkMScalarToScalar(fMat[1][3]);
929 dst[SkMatrix::kMPersp2] = SkMScalarToScalar(fMat[3][3]); 929 dst[SkMatrix::kMPersp2] = SkMScalarToScalar(fMat[3][3]);
930 930
931 return dst; 931 return dst;
932 } 932 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698