| 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 "GrDefaultPathRenderer.h" | 8 #include "GrDefaultPathRenderer.h" |
| 9 | 9 |
| 10 #include "GrBatch.h" | 10 #include "GrBatch.h" |
| (...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 this->initClassID<DefaultPathBatch>(); | 377 this->initClassID<DefaultPathBatch>(); |
| 378 fBatch.fCoverage = coverage; | 378 fBatch.fCoverage = coverage; |
| 379 fBatch.fIsHairline = isHairline; | 379 fBatch.fIsHairline = isHairline; |
| 380 fBatch.fViewMatrix = viewMatrix; | 380 fBatch.fViewMatrix = viewMatrix; |
| 381 fGeoData.push_back(geometry); | 381 fGeoData.push_back(geometry); |
| 382 | 382 |
| 383 this->setBounds(devBounds); | 383 this->setBounds(devBounds); |
| 384 } | 384 } |
| 385 | 385 |
| 386 bool onCombineIfPossible(GrBatch* t) override { | 386 bool onCombineIfPossible(GrBatch* t) override { |
| 387 if (!this->pipeline()->isEqual(*t->pipeline())) { |
| 388 return false; |
| 389 } |
| 390 |
| 387 DefaultPathBatch* that = t->cast<DefaultPathBatch>(); | 391 DefaultPathBatch* that = t->cast<DefaultPathBatch>(); |
| 388 | 392 |
| 389 if (this->color() != that->color()) { | 393 if (this->color() != that->color()) { |
| 390 return false; | 394 return false; |
| 391 } | 395 } |
| 392 | 396 |
| 393 if (this->coverage() != that->coverage()) { | 397 if (this->coverage() != that->coverage()) { |
| 394 return false; | 398 return false; |
| 395 } | 399 } |
| 396 | 400 |
| (...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 758 geometry.fColor = color; | 762 geometry.fColor = color; |
| 759 geometry.fPath = path; | 763 geometry.fPath = path; |
| 760 geometry.fTolerance = srcSpaceTol; | 764 geometry.fTolerance = srcSpaceTol; |
| 761 | 765 |
| 762 viewMatrix.mapRect(&bounds); | 766 viewMatrix.mapRect(&bounds); |
| 763 uint8_t coverage = GrRandomCoverage(random); | 767 uint8_t coverage = GrRandomCoverage(random); |
| 764 return DefaultPathBatch::Create(geometry, coverage, viewMatrix, true, bounds
); | 768 return DefaultPathBatch::Create(geometry, coverage, viewMatrix, true, bounds
); |
| 765 } | 769 } |
| 766 | 770 |
| 767 #endif | 771 #endif |
| OLD | NEW |