| 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 #include "GrOptDrawState.h" | 8 #include "GrOptDrawState.h" |
| 9 | 9 |
| 10 #include "GrDrawState.h" | 10 #include "GrDrawState.h" |
| 11 #include "GrDrawTargetCaps.h" | 11 #include "GrDrawTargetCaps.h" |
| 12 | 12 |
| 13 GrOptDrawState::GrOptDrawState(const GrDrawState& drawState, | 13 GrOptDrawState::GrOptDrawState(const GrDrawState& drawState, |
| 14 BlendOptFlags blendOptFlags, | 14 BlendOptFlags blendOptFlags, |
| 15 GrBlendCoeff optSrcCoeff, | 15 GrBlendCoeff optSrcCoeff, |
| 16 GrBlendCoeff optDstCoeff, | 16 GrBlendCoeff optDstCoeff, |
| 17 const GrDrawTargetCaps& caps) { | 17 const GrDrawTargetCaps& caps) { |
| 18 fRenderTarget.set(SkSafeRef(drawState.getRenderTarget()), | 18 fRenderTarget.set(SkSafeRef(drawState.getRenderTarget()), kWrite_GrIOType); |
| 19 GrIORef::kWrite_IOType); | |
| 20 fColor = drawState.getColor(); | 19 fColor = drawState.getColor(); |
| 21 fCoverage = drawState.getCoverage(); | 20 fCoverage = drawState.getCoverage(); |
| 22 fViewMatrix = drawState.getViewMatrix(); | 21 fViewMatrix = drawState.getViewMatrix(); |
| 23 fBlendConstant = drawState.getBlendConstant(); | 22 fBlendConstant = drawState.getBlendConstant(); |
| 24 fFlagBits = drawState.getFlagBits(); | 23 fFlagBits = drawState.getFlagBits(); |
| 25 fVAPtr = drawState.getVertexAttribs(); | 24 fVAPtr = drawState.getVertexAttribs(); |
| 26 fVACount = drawState.getVertexAttribCount(); | 25 fVACount = drawState.getVertexAttribCount(); |
| 27 fVAStride = drawState.getVertexStride(); | 26 fVAStride = drawState.getVertexStride(); |
| 28 fStencilSettings = drawState.getStencil(); | 27 fStencilSettings = drawState.getStencil(); |
| 29 fDrawFace = (DrawFace)drawState.getDrawFace(); | 28 fDrawFace = (DrawFace)drawState.getDrawFace(); |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 } | 379 } |
| 381 } | 380 } |
| 382 | 381 |
| 383 SkASSERT(0 == memcmp(this->fFixedFunctionVertexAttribIndices, | 382 SkASSERT(0 == memcmp(this->fFixedFunctionVertexAttribIndices, |
| 384 that.fFixedFunctionVertexAttribIndices, | 383 that.fFixedFunctionVertexAttribIndices, |
| 385 sizeof(this->fFixedFunctionVertexAttribIndices))); | 384 sizeof(this->fFixedFunctionVertexAttribIndices))); |
| 386 | 385 |
| 387 return true; | 386 return true; |
| 388 } | 387 } |
| 389 | 388 |
| OLD | NEW |