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 "GrAtlasTextContext.h" | 9 #include "GrAtlasTextContext.h" |
10 #include "GrBatchTest.h" | 10 #include "GrBatchTest.h" |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
267 } | 267 } |
268 } | 268 } |
269 | 269 |
270 GrColor color = paint.getColor(); | 270 GrColor color = paint.getColor(); |
271 bool needAA = paint.isAntiAlias() && | 271 bool needAA = paint.isAntiAlias() && |
272 !pipelineBuilder.getRenderTarget()->isUnifiedMultisampled(); | 272 !pipelineBuilder.getRenderTarget()->isUnifiedMultisampled(); |
273 | 273 |
274 // The fill path can handle rotation but not skew | 274 // The fill path can handle rotation but not skew |
275 // The stroke path needs the rect to remain axis aligned (no rotation or ske w) | 275 // The stroke path needs the rect to remain axis aligned (no rotation or ske w) |
276 // None of our draw rect calls can handle perspective yet | 276 // None of our draw rect calls can handle perspective yet |
277 SkASSERT(!viewMatrix.hasPerspective()); | |
joshualitt
2015/09/02 17:37:20
Could we move this to line 281? maybe its not nece
robertphillips
2015/09/03 15:25:31
Done.
| |
278 bool canApplyAA = width >=0 ? viewMatrix.rectStaysRect() : viewMatrix.preser vesRightAngles(); | 277 bool canApplyAA = width >=0 ? viewMatrix.rectStaysRect() : viewMatrix.preser vesRightAngles(); |
279 | 278 |
280 if (needAA && canApplyAA) { | 279 if (needAA && canApplyAA) { |
281 SkRect devBoundRect; | 280 SkRect devBoundRect; |
282 viewMatrix.mapRect(&devBoundRect, rect); | 281 viewMatrix.mapRect(&devBoundRect, rect); |
283 SkAutoTUnref<GrDrawBatch> batch; | 282 SkAutoTUnref<GrDrawBatch> batch; |
284 if (width >= 0) { | 283 if (width >= 0) { |
285 batch.reset(GrRectBatchFactory::CreateAAStroke(color, viewMatrix, re ct, devBoundRect, | 284 batch.reset(GrRectBatchFactory::CreateAAStroke(color, viewMatrix, re ct, devBoundRect, |
286 *strokeInfo)); | 285 *strokeInfo)); |
287 } else { | 286 } else { |
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
761 RETURN_FALSE_IF_ABANDONED | 760 RETURN_FALSE_IF_ABANDONED |
762 | 761 |
763 ASSERT_OWNED_RESOURCE(rt); | 762 ASSERT_OWNED_RESOURCE(rt); |
764 SkASSERT(rt); | 763 SkASSERT(rt); |
765 return true; | 764 return true; |
766 } | 765 } |
767 | 766 |
768 void GrDrawContext::drawBatch(GrPipelineBuilder* pipelineBuilder, GrDrawBatch* b atch) { | 767 void GrDrawContext::drawBatch(GrPipelineBuilder* pipelineBuilder, GrDrawBatch* b atch) { |
769 fDrawTarget->drawBatch(*pipelineBuilder, batch); | 768 fDrawTarget->drawBatch(*pipelineBuilder, batch); |
770 } | 769 } |
OLD | NEW |