| OLD | NEW |
| 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 GrOptDrawState_DEFINED | 8 #ifndef GrOptDrawState_DEFINED |
| 9 #define GrOptDrawState_DEFINED | 9 #define GrOptDrawState_DEFINED |
| 10 | 10 |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 /// @} | 118 /// @} |
| 119 | 119 |
| 120 /////////////////////////////////////////////////////////////////////////// | 120 /////////////////////////////////////////////////////////////////////////// |
| 121 /// @name ScissorState | 121 /// @name ScissorState |
| 122 //// | 122 //// |
| 123 | 123 |
| 124 const GrScissorState& getScissorState() const { return fScissorState; } | 124 const GrScissorState& getScissorState() const { return fScissorState; } |
| 125 | 125 |
| 126 /// @} | 126 /// @} |
| 127 | 127 |
| 128 | |
| 129 /////////////////////////////////////////////////////////////////////////// | 128 /////////////////////////////////////////////////////////////////////////// |
| 130 /// @name Boolean Queries | 129 /// @name Boolean Queries |
| 131 //// | 130 //// |
| 132 | 131 |
| 133 bool isDitherState() const { return SkToBool(fFlags & kDither_Flag); } | 132 bool isDitherState() const { return SkToBool(fFlags & kDither_Flag); } |
| 134 bool isHWAntialiasState() const { return SkToBool(fFlags & kHWAA_Flag); } | 133 bool isHWAntialiasState() const { return SkToBool(fFlags & kHWAA_Flag); } |
| 135 bool isColorWriteDisabled() const { return SkToBool(fFlags & kDisableColorWr
ite_Flag); } | |
| 136 bool mustSkip() const { return NULL == this->getRenderTarget(); } | 134 bool mustSkip() const { return NULL == this->getRenderTarget(); } |
| 137 | 135 |
| 138 /// @} | 136 /// @} |
| 139 | 137 |
| 140 /** | 138 /** |
| 141 * Gets whether the target is drawing clockwise, counterclockwise, | 139 * Gets whether the target is drawing clockwise, counterclockwise, |
| 142 * or both faces. | 140 * or both faces. |
| 143 * @return the current draw face(s). | 141 * @return the current draw face(s). |
| 144 */ | 142 */ |
| 145 GrDrawState::DrawFace getDrawFace() const { return fDrawFace; } | 143 GrDrawState::DrawFace getDrawFace() const { return fDrawFace; } |
| (...skipping 26 matching lines...) Expand all Loading... |
| 172 * Calculates the primary and secondary output types of the shader. For cert
ain output types | 170 * Calculates the primary and secondary output types of the shader. For cert
ain output types |
| 173 * the function may adjust the blend coefficients. After this function is ca
lled the src and dst | 171 * the function may adjust the blend coefficients. After this function is ca
lled the src and dst |
| 174 * blend coeffs will represent those used by backend API. | 172 * blend coeffs will represent those used by backend API. |
| 175 */ | 173 */ |
| 176 void setOutputStateInfo(const GrDrawState& ds, GrXferProcessor::OptFlags, | 174 void setOutputStateInfo(const GrDrawState& ds, GrXferProcessor::OptFlags, |
| 177 const GrDrawTargetCaps&); | 175 const GrDrawTargetCaps&); |
| 178 | 176 |
| 179 enum Flags { | 177 enum Flags { |
| 180 kDither_Flag = 0x1, | 178 kDither_Flag = 0x1, |
| 181 kHWAA_Flag = 0x2, | 179 kHWAA_Flag = 0x2, |
| 182 kDisableColorWrite_Flag = 0x4, | |
| 183 }; | 180 }; |
| 184 | 181 |
| 185 typedef GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> RenderTarget; | 182 typedef GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> RenderTarget; |
| 186 typedef SkSTArray<8, GrPendingFragmentStage> FragmentStageArray; | 183 typedef SkSTArray<8, GrPendingFragmentStage> FragmentStageArray; |
| 187 typedef GrPendingProgramElement<const GrGeometryProcessor> ProgramGeometryPr
ocessor; | 184 typedef GrPendingProgramElement<const GrGeometryProcessor> ProgramGeometryPr
ocessor; |
| 188 typedef GrPendingProgramElement<const GrPrimitiveProcessor> ProgramPrimitive
Processor; | 185 typedef GrPendingProgramElement<const GrPrimitiveProcessor> ProgramPrimitive
Processor; |
| 189 typedef GrPendingProgramElement<const GrXferProcessor> ProgramXferProcessor; | 186 typedef GrPendingProgramElement<const GrXferProcessor> ProgramXferProcessor; |
| 190 RenderTarget fRenderTarget; | 187 RenderTarget fRenderTarget; |
| 191 GrScissorState fScissorState; | 188 GrScissorState fScissorState; |
| 192 SkMatrix fViewMatrix; | 189 SkMatrix fViewMatrix; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 205 | 202 |
| 206 // This function is equivalent to the offset into fFragmentStages where cove
rage stages begin. | 203 // This function is equivalent to the offset into fFragmentStages where cove
rage stages begin. |
| 207 int fNumColorStages; | 204 int fNumColorStages; |
| 208 | 205 |
| 209 GrProgramDesc fDesc; | 206 GrProgramDesc fDesc; |
| 210 | 207 |
| 211 typedef SkRefCnt INHERITED; | 208 typedef SkRefCnt INHERITED; |
| 212 }; | 209 }; |
| 213 | 210 |
| 214 #endif | 211 #endif |
| OLD | NEW |