OLD | NEW |
---|---|
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2015 Google Inc. | 3 * Copyright 2015 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 #include "GrAARectRenderer.h" | 9 #include "GrAARectRenderer.h" |
10 #include "GrBatch.h" | 10 #include "GrBatch.h" |
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
405 } | 405 } |
406 // Does the rect bound the RT? | 406 // Does the rect bound the RT? |
407 SkPoint srcSpaceRTQuad[4]; | 407 SkPoint srcSpaceRTQuad[4]; |
408 invM.mapRectToQuad(srcSpaceRTQuad, rtRect); | 408 invM.mapRectToQuad(srcSpaceRTQuad, rtRect); |
409 if (rect_contains_inclusive(rect, srcSpaceRTQuad[0]) && | 409 if (rect_contains_inclusive(rect, srcSpaceRTQuad[0]) && |
410 rect_contains_inclusive(rect, srcSpaceRTQuad[1]) && | 410 rect_contains_inclusive(rect, srcSpaceRTQuad[1]) && |
411 rect_contains_inclusive(rect, srcSpaceRTQuad[2]) && | 411 rect_contains_inclusive(rect, srcSpaceRTQuad[2]) && |
412 rect_contains_inclusive(rect, srcSpaceRTQuad[3])) { | 412 rect_contains_inclusive(rect, srcSpaceRTQuad[3])) { |
413 // Will it blend? | 413 // Will it blend? |
414 GrColor clearColor; | 414 GrColor clearColor; |
415 if (paint.isOpaqueAndConstantColor(&clearColor)) { | 415 if (paint.isConstantBlendedColor(&clearColor)) { |
Chris Dalton
2015/06/02 00:07:36
Is this the usual path where rects get replaced by
bsalomon
2015/06/02 13:44:33
It is and I think you're right about that.
| |
416 fDrawTarget->clear(NULL, clearColor, true, rt); | 416 fDrawTarget->clear(NULL, clearColor, true, rt); |
417 return; | 417 return; |
418 } | 418 } |
419 } | 419 } |
420 } | 420 } |
421 } | 421 } |
422 | 422 |
423 GrColor color = paint.getColor(); | 423 GrColor color = paint.getColor(); |
424 SkRect devBoundRect; | 424 SkRect devBoundRect; |
425 bool needAA = paint.isAntiAlias() && !pipelineBuilder.getRenderTarget()->isM ultisampled(); | 425 bool needAA = paint.isAntiAlias() && !pipelineBuilder.getRenderTarget()->isM ultisampled(); |
(...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1266 return DrawVerticesBatch::Create(geometry, type, viewMatrix, | 1266 return DrawVerticesBatch::Create(geometry, type, viewMatrix, |
1267 positions.begin(), vertexCount, | 1267 positions.begin(), vertexCount, |
1268 indices.begin(), hasIndices ? vertexCount : 0, | 1268 indices.begin(), hasIndices ? vertexCount : 0, |
1269 colors.begin(), | 1269 colors.begin(), |
1270 texCoords.begin(), | 1270 texCoords.begin(), |
1271 bounds); | 1271 bounds); |
1272 } | 1272 } |
1273 | 1273 |
1274 #endif | 1274 #endif |
1275 | 1275 |
OLD | NEW |