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

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

Issue 776843004: Use static XPF for porter duff xp factories. (Closed) Base URL: https://skia.googlesource.com/skia.git@xferFactorySolo
Patch Set: Block case statements Created 6 years 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 | « no previous file | src/core/SkXfermode.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 2014 Google Inc. 2 * Copyright 2014 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 GrXferProcessor_DEFINED 8 #ifndef GrXferProcessor_DEFINED
9 #define GrXferProcessor_DEFINED 9 #define GrXferProcessor_DEFINED
10 10
(...skipping 25 matching lines...) Expand all
36 * We install a GrXPFactory (XPF) early on in the pipeline before all the final draw information is 36 * We install a GrXPFactory (XPF) early on in the pipeline before all the final draw information is
37 * known (e.g. whether there is fractional pixel coverage, will coverage be 1 or 4 channel, is the 37 * known (e.g. whether there is fractional pixel coverage, will coverage be 1 or 4 channel, is the
38 * draw opaque, etc.). Once the state of the draw is finalized, we use the XPF a long with all the 38 * draw opaque, etc.). Once the state of the draw is finalized, we use the XPF a long with all the
39 * draw information to create a GrXferProcessor (XP) which can implement the des ired blending for 39 * draw information to create a GrXferProcessor (XP) which can implement the des ired blending for
40 * the draw. 40 * the draw.
41 * 41 *
42 * Before the XP is created, the XPF is able to answer queries about what functi onality the XPs it 42 * Before the XP is created, the XPF is able to answer queries about what functi onality the XPs it
43 * creates will have. For example, can it create an XP that supports RGB coverag e or will the XP 43 * creates will have. For example, can it create an XP that supports RGB coverag e or will the XP
44 * blend with the destination color. 44 * blend with the destination color.
45 */ 45 */
46 class GrXPFactory : public GrProgramElement { 46 class GrXPFactory : public SkRefCnt {
47 public: 47 public:
48 virtual const GrXferProcessor* createXferProcessor() const = 0; 48 virtual const GrXferProcessor* createXferProcessor() const = 0;
49 49
50 /** 50 /**
51 * This function returns true if the GrXferProcessor generated from this fac tory will be able to 51 * This function returns true if the GrXferProcessor generated from this fac tory will be able to
52 * correctly blend when using RGB coverage. The knownColor and knownColorFla gs represent the 52 * correctly blend when using RGB coverage. The knownColor and knownColorFla gs represent the
53 * final computed color from the color stages. 53 * final computed color from the color stages.
54 */ 54 */
55 virtual bool supportsRGBCoverage(GrColor knownColor, uint32_t knownColorFlag s) const = 0; 55 virtual bool supportsRGBCoverage(GrColor knownColor, uint32_t knownColorFlag s) const = 0;
56 56
57 private: 57 private:
58 typedef GrProgramElement INHERITED; 58 typedef GrProgramElement INHERITED;
59 }; 59 };
60 60
61 #endif 61 #endif
62 62
OLDNEW
« no previous file with comments | « no previous file | src/core/SkXfermode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698