| OLD | NEW |
| 1 | |
| 2 /* | 1 /* |
| 3 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
| 4 * | 3 * |
| 5 * 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 |
| 6 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 7 */ | 6 */ |
| 8 | 7 |
| 9 #include "SkMathPriv.h" | 8 #include "SkMathPriv.h" |
| 10 | 9 |
| 11 #define SCALE_FILTER_NAME MAKENAME(_filter_DX_shaderproc) | 10 #define SCALE_FILTER_NAME MAKENAME(_filter_DX_shaderproc) |
| 12 | 11 |
| 13 // Can't be static in the general case because some of these implementations | 12 // Can't be static in the general case because some of these implementations |
| 14 // will be defined and referenced in different object files. | 13 // will be defined and referenced in different object files. |
| 15 void SCALE_FILTER_NAME(const void* sIn, int x, int y, | 14 void SCALE_FILTER_NAME(const void* sIn, int x, int y, SkPMColor* SK_RESTRICT col
ors, int count); |
| 16 DSTTYPE* SK_RESTRICT colors, int count); | |
| 17 | 15 |
| 18 void SCALE_FILTER_NAME(const void* sIn, int x, int y, | 16 void SCALE_FILTER_NAME(const void* sIn, int x, int y, SkPMColor* SK_RESTRICT col
ors, int count) { |
| 19 DSTTYPE* SK_RESTRICT colors, int count) { | |
| 20 const SkBitmapProcState& s = *static_cast<const SkBitmapProcState*>(sIn); | 17 const SkBitmapProcState& s = *static_cast<const SkBitmapProcState*>(sIn); |
| 21 SkASSERT((s.fInvType & ~(SkMatrix::kTranslate_Mask | | 18 SkASSERT((s.fInvType & ~(SkMatrix::kTranslate_Mask | |
| 22 SkMatrix::kScale_Mask)) == 0); | 19 SkMatrix::kScale_Mask)) == 0); |
| 23 SkASSERT(s.fInvKy == 0); | 20 SkASSERT(s.fInvKy == 0); |
| 24 SkASSERT(count > 0 && colors != nullptr); | 21 SkASSERT(count > 0 && colors != nullptr); |
| 25 SkASSERT(s.fFilterLevel != kNone_SkFilterQuality); | 22 SkASSERT(s.fFilterLevel != kNone_SkFilterQuality); |
| 26 SkDEBUGCODE(CHECKSTATE(s);) | 23 SkDEBUGCODE(CHECKSTATE(s);) |
| 27 | 24 |
| 28 const unsigned maxX = s.fPixmap.width() - 1; | 25 const unsigned maxX = s.fPixmap.width() - 1; |
| 29 const SkFixed oneX = s.fFilterOneX; | 26 const SkFixed oneX = s.fFilterOneX; |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 } | 75 } |
| 79 | 76 |
| 80 /////////////////////////////////////////////////////////////////////////////// | 77 /////////////////////////////////////////////////////////////////////////////// |
| 81 | 78 |
| 82 #undef TILEX_PROCF | 79 #undef TILEX_PROCF |
| 83 #undef TILEY_PROCF | 80 #undef TILEY_PROCF |
| 84 #undef TILEX_LOW_BITS | 81 #undef TILEX_LOW_BITS |
| 85 #undef TILEY_LOW_BITS | 82 #undef TILEY_LOW_BITS |
| 86 #undef MAKENAME | 83 #undef MAKENAME |
| 87 #undef SRCTYPE | 84 #undef SRCTYPE |
| 88 #undef DSTTYPE | |
| 89 #undef CHECKSTATE | 85 #undef CHECKSTATE |
| 90 #undef SRC_TO_FILTER | 86 #undef SRC_TO_FILTER |
| 91 #undef FILTER_TO_DST | 87 #undef FILTER_TO_DST |
| 92 #undef PREAMBLE | 88 #undef PREAMBLE |
| 93 #undef POSTAMBLE | 89 #undef POSTAMBLE |
| 94 | 90 |
| 95 #undef SCALE_FILTER_NAME | 91 #undef SCALE_FILTER_NAME |
| OLD | NEW |