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

Side by Side Diff: include/gpu/SkGr.h

Issue 978713002: Add constant color GrFP. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix mulAlphaByKnownFourComponents Created 5 years, 8 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 | « include/gpu/GrInvariantOutput.h ('k') | include/gpu/effects/GrConstColorProcessor.h » ('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 /* 2 /*
3 * Copyright 2010 Google Inc. 3 * Copyright 2010 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 10
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 bool GrIsBitmapInCache(const GrContext*, const SkBitmap&, const GrTextureParams* ); 71 bool GrIsBitmapInCache(const GrContext*, const SkBitmap&, const GrTextureParams* );
72 72
73 GrTexture* GrRefCachedBitmapTexture(GrContext*, const SkBitmap&, const GrTexture Params*); 73 GrTexture* GrRefCachedBitmapTexture(GrContext*, const SkBitmap&, const GrTexture Params*);
74 74
75 //////////////////////////////////////////////////////////////////////////////// 75 ////////////////////////////////////////////////////////////////////////////////
76 76
77 // Converts a SkPaint to a GrPaint, ignoring the SkPaint's shader. 77 // Converts a SkPaint to a GrPaint, ignoring the SkPaint's shader.
78 // Sets the color of GrPaint to the value of the parameter paintColor 78 // Sets the color of GrPaint to the value of the parameter paintColor
79 // Callers may subsequently modify the GrPaint. Setting constantColor indicates 79 // Callers may subsequently modify the GrPaint. Setting constantColor indicates
80 // that the final paint will draw the same color at every pixel. This allows 80 // that the final paint will draw the same color at every pixel. This allows
81 // an optimization where the the color filter can be applied to the SkPaint's 81 // an optimization where the color filter can be applied to the SkPaint's
82 // color once while converting to GrPaint and then ignored. 82 // color once while converting to GrPaint and then ignored. TODO: Remove this
83 // bool and use the invariant info to automatically apply the color filter.
83 void SkPaint2GrPaintNoShader(GrContext* context, GrRenderTarget*, const SkPaint& skPaint, 84 void SkPaint2GrPaintNoShader(GrContext* context, GrRenderTarget*, const SkPaint& skPaint,
84 GrColor paintColor, bool constantColor, GrPaint* gr Paint); 85 GrColor paintColor, bool constantColor, GrPaint* gr Paint);
85 86
86 // This function is similar to skPaint2GrPaintNoShader but also converts 87 // This function is similar to skPaint2GrPaintNoShader but also converts
87 // skPaint's shader to a GrFragmentProcessor if possible. 88 // skPaint's shader to a GrFragmentProcessor if possible.
88 // constantColor has the same meaning as in skPaint2GrPaintNoShader. 89 // constantColor has the same meaning as in skPaint2GrPaintNoShader.
89 void SkPaint2GrPaintShader(GrContext* context, GrRenderTarget*, const SkPaint& s kPaint, 90 void SkPaint2GrPaintShader(GrContext* context, GrRenderTarget*, const SkPaint& s kPaint,
90 const SkMatrix& viewM, bool constantColor, GrPaint* g rPaint); 91 const SkMatrix& viewM, bool constantColor, GrPaint* g rPaint);
91 92
92 //////////////////////////////////////////////////////////////////////////////// 93 ////////////////////////////////////////////////////////////////////////////////
93 // Classes 94 // Classes
94 95
95 class SkGlyphCache; 96 class SkGlyphCache;
96 97
97 //////////////////////////////////////////////////////////////////////////////// 98 ////////////////////////////////////////////////////////////////////////////////
98 99
99 #endif 100 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrInvariantOutput.h ('k') | include/gpu/effects/GrConstColorProcessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698