| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 "GrGLProgram.h" | 8 #include "GrGLProgram.h" |
| 9 | 9 |
| 10 #include "GrAllocator.h" | 10 #include "GrAllocator.h" |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 SharedGLState* sharedState) { | 200 SharedGLState* sharedState) { |
| 201 const GrDrawState& drawState = fGpu->getDrawState(); | 201 const GrDrawState& drawState = fGpu->getDrawState(); |
| 202 | 202 |
| 203 GrColor color; | 203 GrColor color; |
| 204 GrColor coverage; | 204 GrColor coverage; |
| 205 if (blendOpts & GrDrawState::kEmitTransBlack_BlendOptFlag) { | 205 if (blendOpts & GrDrawState::kEmitTransBlack_BlendOptFlag) { |
| 206 color = 0; | 206 color = 0; |
| 207 coverage = 0; | 207 coverage = 0; |
| 208 } else if (blendOpts & GrDrawState::kEmitCoverage_BlendOptFlag) { | 208 } else if (blendOpts & GrDrawState::kEmitCoverage_BlendOptFlag) { |
| 209 color = 0xffffffff; | 209 color = 0xffffffff; |
| 210 coverage = drawState.getCoverage(); | 210 coverage = drawState.getCoverageColor(); |
| 211 } else { | 211 } else { |
| 212 color = drawState.getColor(); | 212 color = drawState.getColor(); |
| 213 coverage = drawState.getCoverage(); | 213 coverage = drawState.getCoverageColor(); |
| 214 } | 214 } |
| 215 | 215 |
| 216 this->setColor(drawState, color, sharedState); | 216 this->setColor(drawState, color, sharedState); |
| 217 this->setCoverage(drawState, coverage, sharedState); | 217 this->setCoverage(drawState, coverage, sharedState); |
| 218 this->setMatrixAndRenderTargetHeight(drawState); | 218 this->setMatrixAndRenderTargetHeight(drawState); |
| 219 | 219 |
| 220 if (NULL != dstCopy) { | 220 if (NULL != dstCopy) { |
| 221 if (fUniformHandles.fDstCopyTopLeftUni.isValid()) { | 221 if (fUniformHandles.fDstCopyTopLeftUni.isValid()) { |
| 222 fUniformManager.set2f(fUniformHandles.fDstCopyTopLeftUni, | 222 fUniformManager.set2f(fUniformHandles.fDstCopyTopLeftUni, |
| 223 static_cast<GrGLfloat>(dstCopy->offset().fX), | 223 static_cast<GrGLfloat>(dstCopy->offset().fX), |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 | 349 |
| 350 fMatrixState.fViewMatrix = drawState.getViewMatrix(); | 350 fMatrixState.fViewMatrix = drawState.getViewMatrix(); |
| 351 fMatrixState.fRenderTargetSize = size; | 351 fMatrixState.fRenderTargetSize = size; |
| 352 fMatrixState.fRenderTargetOrigin = rt->origin(); | 352 fMatrixState.fRenderTargetOrigin = rt->origin(); |
| 353 | 353 |
| 354 GrGLfloat viewMatrix[3 * 3]; | 354 GrGLfloat viewMatrix[3 * 3]; |
| 355 fMatrixState.getGLMatrix<3>(viewMatrix); | 355 fMatrixState.getGLMatrix<3>(viewMatrix); |
| 356 fUniformManager.setMatrix3f(fUniformHandles.fViewMatrixUni, viewMatrix); | 356 fUniformManager.setMatrix3f(fUniformHandles.fViewMatrixUni, viewMatrix); |
| 357 } | 357 } |
| 358 } | 358 } |
| OLD | NEW |