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

Side by Side Diff: src/core/SkBitmapProcState_shaderproc.h

Issue 1753903002: fission bitmapprocstate (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: use real types instead of uint8_t, fix formatting Created 4 years, 9 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 | « src/core/SkBitmapProcState_sample.h ('k') | src/core/SkLightingShader.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 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 "SkMathPriv.h" 8 #include "SkMathPriv.h"
9 9
10 #define SCALE_FILTER_NAME MAKENAME(_filter_DX_shaderproc) 10 #define SCALE_FILTER_NAME MAKENAME(_filter_DX_shaderproc)
11 11
12 // 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
13 // will be defined and referenced in different object files. 13 // will be defined and referenced in different object files.
14 void SCALE_FILTER_NAME(const void* sIn, int x, int y, SkPMColor* SK_RESTRICT col ors, int count); 14 void SCALE_FILTER_NAME(const void* sIn, int x, int y, SkPMColor* SK_RESTRICT col ors, int count);
15 15
16 void SCALE_FILTER_NAME(const void* sIn, int x, int y, SkPMColor* SK_RESTRICT col ors, int count) { 16 void SCALE_FILTER_NAME(const void* sIn, int x, int y, SkPMColor* SK_RESTRICT col ors, int count) {
17 const SkBitmapProcState& s = *static_cast<const SkBitmapProcState*>(sIn); 17 const SkBitmapProcState& s = *static_cast<const SkBitmapProcState*>(sIn);
18 SkASSERT((s.fInvType & ~(SkMatrix::kTranslate_Mask | 18 SkASSERT((s.fInvType & ~(SkMatrix::kTranslate_Mask |
19 SkMatrix::kScale_Mask)) == 0); 19 SkMatrix::kScale_Mask)) == 0);
20 SkASSERT(s.fInvKy == 0); 20 SkASSERT(s.fInvKy == 0);
21 SkASSERT(count > 0 && colors != nullptr); 21 SkASSERT(count > 0 && colors != nullptr);
22 SkASSERT(s.fFilterLevel != kNone_SkFilterQuality); 22 SkASSERT(s.fFilterQuality != kNone_SkFilterQuality);
23 SkDEBUGCODE(CHECKSTATE(s);) 23 SkDEBUGCODE(CHECKSTATE(s);)
24 24
25 const unsigned maxX = s.fPixmap.width() - 1; 25 const unsigned maxX = s.fPixmap.width() - 1;
26 const SkFixed oneX = s.fFilterOneX; 26 const SkFixed oneX = s.fFilterOneX;
27 const SkFixed dx = s.fInvSx; 27 const SkFixed dx = s.fInvSx;
28 SkFixed fx; 28 SkFixed fx;
29 const SRCTYPE* SK_RESTRICT row0; 29 const SRCTYPE* SK_RESTRICT row0;
30 const SRCTYPE* SK_RESTRICT row1; 30 const SRCTYPE* SK_RESTRICT row1;
31 unsigned subY; 31 unsigned subY;
32 32
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 #undef TILEY_LOW_BITS 80 #undef TILEY_LOW_BITS
81 #undef MAKENAME 81 #undef MAKENAME
82 #undef SRCTYPE 82 #undef SRCTYPE
83 #undef CHECKSTATE 83 #undef CHECKSTATE
84 #undef SRC_TO_FILTER 84 #undef SRC_TO_FILTER
85 #undef FILTER_TO_DST 85 #undef FILTER_TO_DST
86 #undef PREAMBLE 86 #undef PREAMBLE
87 #undef POSTAMBLE 87 #undef POSTAMBLE
88 88
89 #undef SCALE_FILTER_NAME 89 #undef SCALE_FILTER_NAME
OLDNEW
« no previous file with comments | « src/core/SkBitmapProcState_sample.h ('k') | src/core/SkLightingShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698