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

Side by Side Diff: src/gpu/SkGrPriv.h

Issue 1454933002: Initial implementation of GPU no filter NinePatch (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweaks Created 5 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
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 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 #ifndef SkGrPriv_DEFINED 8 #ifndef SkGrPriv_DEFINED
9 #define SkGrPriv_DEFINED 9 #define SkGrPriv_DEFINED
10 10
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 /** This is used when there is a primitive color, but the shader should be ignor ed. Currently, 77 /** This is used when there is a primitive color, but the shader should be ignor ed. Currently,
78 the expectation is that the primitive color will be premultiplied, though it really should be 78 the expectation is that the primitive color will be premultiplied, though it really should be
79 unpremultiplied so that interpolation is done in unpremul space. The paint's alpha will be 79 unpremultiplied so that interpolation is done in unpremul space. The paint's alpha will be
80 applied to the primitive color after interpolation. */ 80 applied to the primitive color after interpolation. */
81 inline bool SkPaintToGrPaintWithPrimitiveColor(GrContext* context, const SkPaint & skPaint, 81 inline bool SkPaintToGrPaintWithPrimitiveColor(GrContext* context, const SkPaint & skPaint,
82 GrPaint* grPaint) { 82 GrPaint* grPaint) {
83 return SkPaintToGrPaintWithXfermode(context, skPaint, SkMatrix::I(), SkXferm ode::kDst_Mode, 83 return SkPaintToGrPaintWithXfermode(context, skPaint, SkMatrix::I(), SkXferm ode::kDst_Mode,
84 false, grPaint); 84 false, grPaint);
85 } 85 }
86 86
87 bool SkPaintToGrPaintWithTexture(GrContext* context,
bsalomon 2015/11/18 17:57:35 Comment explaining what this does? may or may not
joshualitt 2015/11/18 19:07:07 Acknowledged.
88 const SkPaint& paint,
89 const SkMatrix& viewM,
90 const GrFragmentProcessor* fp,
91 bool textureIsAlphaOnly,
92 GrPaint* grPaint);
93
87 ////////////////////////////////////////////////////////////////////////////// 94 //////////////////////////////////////////////////////////////////////////////
88 95
89 GrSurfaceDesc GrImageInfoToSurfaceDesc(const SkImageInfo&); 96 GrSurfaceDesc GrImageInfoToSurfaceDesc(const SkImageInfo&);
90 97
91 bool GrPixelConfig2ColorAndProfileType(GrPixelConfig, SkColorType*, SkColorProfi leType*); 98 bool GrPixelConfig2ColorAndProfileType(GrPixelConfig, SkColorType*, SkColorProfi leType*);
92 99
93 /** 100 /**
94 * If the compressed data in the SkData is supported (as a texture format, this returns 101 * If the compressed data in the SkData is supported (as a texture format, this returns
95 * the pixel-config that should be used, and sets outStartOfDataToUpload to the ptr into 102 * the pixel-config that should be used, and sets outStartOfDataToUpload to the ptr into
96 * the data where the actual raw data starts (skipping any header bytes). 103 * the data where the actual raw data starts (skipping any header bytes).
(...skipping 23 matching lines...) Expand all
120 GR_STATIC_ASSERT((int)kIDC_GrBlendCoeff == (int)SkXfermode::kIDC_Coeff); 127 GR_STATIC_ASSERT((int)kIDC_GrBlendCoeff == (int)SkXfermode::kIDC_Coeff);
121 GR_STATIC_ASSERT((int)kSA_GrBlendCoeff == (int)SkXfermode::kSA_Coeff); 128 GR_STATIC_ASSERT((int)kSA_GrBlendCoeff == (int)SkXfermode::kSA_Coeff);
122 GR_STATIC_ASSERT((int)kISA_GrBlendCoeff == (int)SkXfermode::kISA_Coeff); 129 GR_STATIC_ASSERT((int)kISA_GrBlendCoeff == (int)SkXfermode::kISA_Coeff);
123 GR_STATIC_ASSERT((int)kDA_GrBlendCoeff == (int)SkXfermode::kDA_Coeff); 130 GR_STATIC_ASSERT((int)kDA_GrBlendCoeff == (int)SkXfermode::kDA_Coeff);
124 GR_STATIC_ASSERT((int)kIDA_GrBlendCoeff == (int)SkXfermode::kIDA_Coeff); 131 GR_STATIC_ASSERT((int)kIDA_GrBlendCoeff == (int)SkXfermode::kIDA_Coeff);
125 GR_STATIC_ASSERT(SkXfermode::kCoeffCount == 10); 132 GR_STATIC_ASSERT(SkXfermode::kCoeffCount == 10);
126 133
127 #define SkXfermodeCoeffToGrBlendCoeff(X) ((GrBlendCoeff)(X)) 134 #define SkXfermodeCoeffToGrBlendCoeff(X) ((GrBlendCoeff)(X))
128 135
129 #endif 136 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698