OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 "GrBatchTest.h" | 8 #include "GrBatchTest.h" |
9 #include "GrColor.h" | 9 #include "GrColor.h" |
10 #include "GrDrawContext.h" | 10 #include "GrDrawContext.h" |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 return true; | 378 return true; |
379 } | 379 } |
380 } | 380 } |
381 | 381 |
382 if (should_apply_coverage_aa(paint, fRenderTarget.get(), &useHWAA)) { | 382 if (should_apply_coverage_aa(paint, fRenderTarget.get(), &useHWAA)) { |
383 // The fill path can handle rotation but not skew. | 383 // The fill path can handle rotation but not skew. |
384 if (view_matrix_ok_for_aa_fill_rect(viewMatrix)) { | 384 if (view_matrix_ok_for_aa_fill_rect(viewMatrix)) { |
385 SkRect devBoundRect; | 385 SkRect devBoundRect; |
386 viewMatrix.mapRect(&devBoundRect, croppedRect); | 386 viewMatrix.mapRect(&devBoundRect, croppedRect); |
387 | 387 |
388 batch.reset(GrRectBatchFactory::CreateAAFill(paint.getColor(), viewM
atrix, | 388 batch.reset(GrRectBatchFactory::CreateAAFill(paint, viewMatrix, rect
, croppedRect, |
389 croppedRect, devBoundRe
ct)); | 389 devBoundRect)); |
390 if (batch) { | 390 if (batch) { |
391 GrPipelineBuilder pipelineBuilder(paint, useHWAA); | 391 GrPipelineBuilder pipelineBuilder(paint, useHWAA); |
392 if (ss) { | 392 if (ss) { |
393 pipelineBuilder.setUserStencil(ss); | 393 pipelineBuilder.setUserStencil(ss); |
394 } | 394 } |
395 this->getDrawTarget()->drawBatch(pipelineBuilder, this, clip, ba
tch); | 395 this->getDrawTarget()->drawBatch(pipelineBuilder, this, clip, ba
tch); |
396 return true; | 396 return true; |
397 } | 397 } |
398 } | 398 } |
399 } else { | 399 } else { |
(...skipping 898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1298 | 1298 |
1299 void GrDrawContext::drawBatch(const GrPipelineBuilder& pipelineBuilder, const Gr
Clip& clip, | 1299 void GrDrawContext::drawBatch(const GrPipelineBuilder& pipelineBuilder, const Gr
Clip& clip, |
1300 GrDrawBatch* batch) { | 1300 GrDrawBatch* batch) { |
1301 ASSERT_SINGLE_OWNER | 1301 ASSERT_SINGLE_OWNER |
1302 RETURN_IF_ABANDONED | 1302 RETURN_IF_ABANDONED |
1303 SkDEBUGCODE(this->validate();) | 1303 SkDEBUGCODE(this->validate();) |
1304 GR_AUDIT_TRAIL_AUTO_FRAME(fAuditTrail, "GrDrawContext::drawBatch"); | 1304 GR_AUDIT_TRAIL_AUTO_FRAME(fAuditTrail, "GrDrawContext::drawBatch"); |
1305 | 1305 |
1306 this->getDrawTarget()->drawBatch(pipelineBuilder, this, clip, batch); | 1306 this->getDrawTarget()->drawBatch(pipelineBuilder, this, clip, batch); |
1307 } | 1307 } |
OLD | NEW |