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

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

Issue 2215323003: Start using RenderTargetProxy (omnibus) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update 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 | « include/core/SkMaskFilter.h ('k') | include/gpu/GrRenderTargetContext.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 2011 Google Inc. 3 * Copyright 2011 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 #ifndef GrPaint_DEFINED 10 #ifndef GrPaint_DEFINED
11 #define GrPaint_DEFINED 11 #define GrPaint_DEFINED
12 12
13 #include "GrColor.h" 13 #include "GrColor.h"
14 #include "GrColorSpaceXform.h" 14 #include "GrColorSpaceXform.h"
15 #include "GrXferProcessor.h" 15 #include "GrXferProcessor.h"
16 #include "effects/GrPorterDuffXferProcessor.h" 16 #include "effects/GrPorterDuffXferProcessor.h"
17 #include "GrFragmentProcessor.h" 17 #include "GrFragmentProcessor.h"
18 18
19 #include "SkBlendMode.h" 19 #include "SkBlendMode.h"
20 #include "SkRefCnt.h" 20 #include "SkRefCnt.h"
21 #include "SkRegion.h" 21 #include "SkRegion.h"
22 22
23 class GrTextureProxy;
24
23 /** 25 /**
24 * The paint describes how color and coverage are computed at each pixel by GrCo ntext draw 26 * The paint describes how color and coverage are computed at each pixel by GrCo ntext draw
25 * functions and the how color is blended with the destination pixel. 27 * functions and the how color is blended with the destination pixel.
26 * 28 *
27 * The paint allows installation of custom color and coverage stages. New types of stages are 29 * The paint allows installation of custom color and coverage stages. New types of stages are
28 * created by subclassing GrProcessor. 30 * created by subclassing GrProcessor.
29 * 31 *
30 * The primitive color computation starts with the color specified by setColor() . This color is the 32 * The primitive color computation starts with the color specified by setColor() . This color is the
31 * input to the first color stage. Each color stage feeds its output to the next color stage. 33 * input to the first color stage. Each color stage feeds its output to the next color stage.
32 * 34 *
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 /** 124 /**
123 * Helpers for adding color or coverage effects that sample a texture. The m atrix is applied 125 * Helpers for adding color or coverage effects that sample a texture. The m atrix is applied
124 * to the src space position to compute texture coordinates. 126 * to the src space position to compute texture coordinates.
125 */ 127 */
126 void addColorTextureProcessor(GrTexture*, sk_sp<GrColorSpaceXform>, const Sk Matrix&); 128 void addColorTextureProcessor(GrTexture*, sk_sp<GrColorSpaceXform>, const Sk Matrix&);
127 void addCoverageTextureProcessor(GrTexture*, const SkMatrix&); 129 void addCoverageTextureProcessor(GrTexture*, const SkMatrix&);
128 void addColorTextureProcessor(GrTexture*, sk_sp<GrColorSpaceXform>, const Sk Matrix&, 130 void addColorTextureProcessor(GrTexture*, sk_sp<GrColorSpaceXform>, const Sk Matrix&,
129 const GrTextureParams&); 131 const GrTextureParams&);
130 void addCoverageTextureProcessor(GrTexture*, const SkMatrix&, const GrTextur eParams&); 132 void addCoverageTextureProcessor(GrTexture*, const SkMatrix&, const GrTextur eParams&);
131 133
134 //--
135 void addColorTextureProcessor(GrTextureProxy*, sk_sp<GrColorSpaceXform>, con st SkMatrix&);
136 void addCoverageTextureProcessor(GrTextureProxy*, const SkMatrix&);
137 void addColorTextureProcessor(GrTextureProxy*, sk_sp<GrColorSpaceXform>, con st SkMatrix&,
138 const GrTextureParams&);
139 void addCoverageTextureProcessor(GrTextureProxy*, const SkMatrix&, const GrT extureParams&);
140 //--
141
132 int numColorFragmentProcessors() const { return fColorFragmentProcessors.cou nt(); } 142 int numColorFragmentProcessors() const { return fColorFragmentProcessors.cou nt(); }
133 int numCoverageFragmentProcessors() const { return fCoverageFragmentProcesso rs.count(); } 143 int numCoverageFragmentProcessors() const { return fCoverageFragmentProcesso rs.count(); }
134 int numTotalFragmentProcessors() const { return this->numColorFragmentProces sors() + 144 int numTotalFragmentProcessors() const { return this->numColorFragmentProces sors() +
135 this->numCoverageFragmentProcessor s(); } 145 this->numCoverageFragmentProcessor s(); }
136 146
137 GrXPFactory* getXPFactory() const { 147 GrXPFactory* getXPFactory() const {
138 return fXPFactory.get(); 148 return fXPFactory.get();
139 } 149 }
140 150
141 GrFragmentProcessor* getColorFragmentProcessor(int i) const { 151 GrFragmentProcessor* getColorFragmentProcessor(int i) const {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 197
188 bool fAntiAlias; 198 bool fAntiAlias;
189 bool fDisableOutputConversionToSRGB; 199 bool fDisableOutputConversionToSRGB;
190 bool fAllowSRGBInputs; 200 bool fAllowSRGBInputs;
191 bool fUsesDistanceVectorField; 201 bool fUsesDistanceVectorField;
192 202
193 GrColor4f fColor; 203 GrColor4f fColor;
194 }; 204 };
195 205
196 #endif 206 #endif
OLDNEW
« no previous file with comments | « include/core/SkMaskFilter.h ('k') | include/gpu/GrRenderTargetContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698