OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2010 Google Inc. | 2 * Copyright 2010 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 GrDrawTarget_DEFINED | 8 #ifndef GrDrawTarget_DEFINED |
9 #define GrDrawTarget_DEFINED | 9 #define GrDrawTarget_DEFINED |
10 | 10 |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 /** When we're using coverage AA but the blend is incompatible (given gpu | 106 /** When we're using coverage AA but the blend is incompatible (given gpu |
107 * limitations) we should disable AA. */ | 107 * limitations) we should disable AA. */ |
108 bool shouldDisableCoverageAAForBlend() { | 108 bool shouldDisableCoverageAAForBlend() { |
109 // Enable below if we should draw with AA even when it produces | 109 // Enable below if we should draw with AA even when it produces |
110 // incorrect blending. | 110 // incorrect blending. |
111 // return false; | 111 // return false; |
112 return !this->canApplyCoverage(); | 112 return !this->canApplyCoverage(); |
113 } | 113 } |
114 | 114 |
115 /** | 115 /** |
| 116 * Given the current draw state and hw support, will HW AA lines be used (if |
| 117 * a line primitive type is drawn)? |
| 118 */ |
| 119 bool willUseHWAALines() const; |
| 120 |
| 121 /** |
116 * There are three types of "sources" of geometry (vertices and indices) for | 122 * There are three types of "sources" of geometry (vertices and indices) for |
117 * draw calls made on the target. When performing an indexed draw, the | 123 * draw calls made on the target. When performing an indexed draw, the |
118 * indices and vertices can use different source types. Once a source is | 124 * indices and vertices can use different source types. Once a source is |
119 * specified it can be used for multiple draws. However, the time at which | 125 * specified it can be used for multiple draws. However, the time at which |
120 * the geometry data is no longer editable depends on the source type. | 126 * the geometry data is no longer editable depends on the source type. |
121 * | 127 * |
122 * Sometimes it is necessary to perform a draw while upstack code has | 128 * Sometimes it is necessary to perform a draw while upstack code has |
123 * already specified geometry that it isn't finished with. So there are push | 129 * already specified geometry that it isn't finished with. So there are push |
124 * and pop methods. This allows the client to push the sources, draw | 130 * and pop methods. This allows the client to push the sources, draw |
125 * something using alternate sources, and then pop to restore the original | 131 * something using alternate sources, and then pop to restore the original |
(...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
980 GrContext* fContext; | 986 GrContext* fContext; |
981 // To keep track that we always have at least as many debug marker adds as r
emoves | 987 // To keep track that we always have at least as many debug marker adds as r
emoves |
982 int fGpuTraceMar
kerCount; | 988 int fGpuTraceMar
kerCount; |
983 GrTraceMarkerSet fActiveTrace
Markers; | 989 GrTraceMarkerSet fActiveTrace
Markers; |
984 GrTraceMarkerSet fStoredTrace
Markers; | 990 GrTraceMarkerSet fStoredTrace
Markers; |
985 | 991 |
986 typedef SkRefCnt INHERITED; | 992 typedef SkRefCnt INHERITED; |
987 }; | 993 }; |
988 | 994 |
989 #endif | 995 #endif |
OLD | NEW |