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

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

Issue 2499723002: Revert of Set analytic AA as default. (Closed)
Patch Set: Created 4 years, 1 month 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 | « src/core/SkScan_AAAPath.cpp ('k') | tests/ImageFilterTest.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 "SkXfermode.h" 8 #include "SkXfermode.h"
9 #include "SkXfermode_proccoeff.h" 9 #include "SkXfermode_proccoeff.h"
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 931 matching lines...) Expand 10 before | Expand all | Expand 10 after
942 for (int i = 0; i < 4; ++i) { 942 for (int i = 0; i < 4; ++i) {
943 SkASSERT(r.fVec[i] >= min && r.fVec[i] <= max); 943 SkASSERT(r.fVec[i] >= min && r.fVec[i] <= max);
944 } 944 }
945 #endif 945 #endif
946 } 946 }
947 947
948 template <Sk4f (blend)(const Sk4f&, const Sk4f&)> SkPM4f proc_4f(const SkPM4f& s , const SkPM4f& d) { 948 template <Sk4f (blend)(const Sk4f&, const Sk4f&)> SkPM4f proc_4f(const SkPM4f& s , const SkPM4f& d) {
949 assert_unit(s); 949 assert_unit(s);
950 assert_unit(d); 950 assert_unit(d);
951 SkPM4f r = as_pm4f(blend(as_4f(s), as_4f(d))); 951 SkPM4f r = as_pm4f(blend(as_4f(s), as_4f(d)));
952 // Turn this assert off for now because srgb conversions may end up in rgb > a 952 assert_unit(r);
953 // assert_unit(r);
954 return r; 953 return r;
955 } 954 }
956 955
957 const ProcCoeff gProcCoeffs[] = { 956 const ProcCoeff gProcCoeffs[] = {
958 { clear_modeproc, proc_4f<clear_4f>, SkXfermode::kZero_Coeff, SkXfermode::kZero_Coeff }, 957 { clear_modeproc, proc_4f<clear_4f>, SkXfermode::kZero_Coeff, SkXfermode::kZero_Coeff },
959 { src_modeproc, proc_4f<src_4f>, SkXfermode::kOne_Coeff, SkXfermode::kZero_Coeff }, 958 { src_modeproc, proc_4f<src_4f>, SkXfermode::kOne_Coeff, SkXfermode::kZero_Coeff },
960 { dst_modeproc, proc_4f<dst_4f>, SkXfermode::kZero_Coeff, SkXfermode::kOne_Coeff }, 959 { dst_modeproc, proc_4f<dst_4f>, SkXfermode::kZero_Coeff, SkXfermode::kOne_Coeff },
961 { srcover_modeproc, proc_4f<srcover_4f>, SkXfermode::kOne_Coeff, SkXfermode::kISA_Coeff }, 960 { srcover_modeproc, proc_4f<srcover_4f>, SkXfermode::kOne_Coeff, SkXfermode::kISA_Coeff },
962 { dstover_modeproc, proc_4f<dstover_4f>, SkXfermode::kIDA_Coeff, SkXfermode::kOne_Coeff }, 961 { dstover_modeproc, proc_4f<dstover_4f>, SkXfermode::kIDA_Coeff, SkXfermode::kOne_Coeff },
963 { srcin_modeproc, proc_4f<srcin_4f>, SkXfermode::kDA_Coeff, SkXfermode::kZero_Coeff }, 962 { srcin_modeproc, proc_4f<srcin_4f>, SkXfermode::kDA_Coeff, SkXfermode::kZero_Coeff },
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
1514 case SkBlendMode::kHue: 1513 case SkBlendMode::kHue:
1515 case SkBlendMode::kSaturation: 1514 case SkBlendMode::kSaturation:
1516 case SkBlendMode::kColor: 1515 case SkBlendMode::kColor:
1517 case SkBlendMode::kLuminosity: return false; // TODO 1516 case SkBlendMode::kLuminosity: return false; // TODO
1518 } 1517 }
1519 if (p) { 1518 if (p) {
1520 p->append(stage); 1519 p->append(stage);
1521 } 1520 }
1522 return true; 1521 return true;
1523 } 1522 }
OLDNEW
« no previous file with comments | « src/core/SkScan_AAAPath.cpp ('k') | tests/ImageFilterTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698