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

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

Issue 2362863002: G instead of R, thanks Gold (Closed)
Patch Set: Created 4 years, 3 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 2016 Google Inc. 2 * Copyright 2016 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 "SkColorPriv.h" 8 #include "SkColorPriv.h"
9 #include "SkColorSpace_Base.h" 9 #include "SkColorSpace_Base.h"
10 #include "SkColorSpacePriv.h" 10 #include "SkColorSpacePriv.h"
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 template <Order kOrder> 655 template <Order kOrder>
656 static inline void load_rgba_from_tables(const uint32_t* src, 656 static inline void load_rgba_from_tables(const uint32_t* src,
657 Sk4f& r, Sk4f& g, Sk4f& b, Sk4f& a, 657 Sk4f& r, Sk4f& g, Sk4f& b, Sk4f& a,
658 const float* const srcTables[3]) { 658 const float* const srcTables[3]) {
659 int kRShift, kGShift = 8, kBShift; 659 int kRShift, kGShift = 8, kBShift;
660 set_rb_shifts(kOrder, &kRShift, &kBShift); 660 set_rb_shifts(kOrder, &kRShift, &kBShift);
661 r = { srcTables[0][(src[0] >> kRShift) & 0xFF], 661 r = { srcTables[0][(src[0] >> kRShift) & 0xFF],
662 srcTables[0][(src[1] >> kRShift) & 0xFF], 662 srcTables[0][(src[1] >> kRShift) & 0xFF],
663 srcTables[0][(src[2] >> kRShift) & 0xFF], 663 srcTables[0][(src[2] >> kRShift) & 0xFF],
664 srcTables[0][(src[3] >> kRShift) & 0xFF], }; 664 srcTables[0][(src[3] >> kRShift) & 0xFF], };
665 g = { srcTables[1][(src[0] >> kRShift) & 0xFF], 665 g = { srcTables[1][(src[0] >> kGShift) & 0xFF],
666 srcTables[1][(src[1] >> kGShift) & 0xFF], 666 srcTables[1][(src[1] >> kGShift) & 0xFF],
667 srcTables[1][(src[2] >> kGShift) & 0xFF], 667 srcTables[1][(src[2] >> kGShift) & 0xFF],
668 srcTables[1][(src[3] >> kGShift) & 0xFF], }; 668 srcTables[1][(src[3] >> kGShift) & 0xFF], };
669 b = { srcTables[2][(src[0] >> kBShift) & 0xFF], 669 b = { srcTables[2][(src[0] >> kBShift) & 0xFF],
670 srcTables[2][(src[1] >> kBShift) & 0xFF], 670 srcTables[2][(src[1] >> kBShift) & 0xFF],
671 srcTables[2][(src[2] >> kBShift) & 0xFF], 671 srcTables[2][(src[2] >> kBShift) & 0xFF],
672 srcTables[2][(src[3] >> kBShift) & 0xFF], }; 672 srcTables[2][(src[3] >> kBShift) & 0xFF], };
673 a = (1.0f / 255.0f) * SkNx_cast<float>(Sk4u::Load(src) >> 24); 673 a = (1.0f / 255.0f) * SkNx_cast<float>(Sk4u::Load(src) >> 24);
674 } 674 }
675 675
(...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after
1431 } 1431 }
1432 } 1432 }
1433 1433
1434 //////////////////////////////////////////////////////////////////////////////// /////////////////// 1434 //////////////////////////////////////////////////////////////////////////////// ///////////////////
1435 1435
1436 std::unique_ptr<SkColorSpaceXform> SlowIdentityXform(SkColorSpace* space) { 1436 std::unique_ptr<SkColorSpaceXform> SlowIdentityXform(SkColorSpace* space) {
1437 return std::unique_ptr<SkColorSpaceXform>(new SkColorSpaceXform_Base 1437 return std::unique_ptr<SkColorSpaceXform>(new SkColorSpaceXform_Base
1438 <kTable_SrcGamma, kTable_DstGamma, kNone_ColorSpaceMatch> 1438 <kTable_SrcGamma, kTable_DstGamma, kNone_ColorSpaceMatch>
1439 (space, SkMatrix::I(), space)); 1439 (space, SkMatrix::I(), space));
1440 } 1440 }
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