OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2010 Google Inc. | 3 * Copyright 2010 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 | 9 |
10 | 10 |
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 viewM.mapRect(&devBounds); | 541 viewM.mapRect(&devBounds); |
542 | 542 |
543 GrDeviceCoordTexture dstCopy; | 543 GrDeviceCoordTexture dstCopy; |
544 if (!this->setupDstReadIfNecessary(&dstCopy, &devBounds)) { | 544 if (!this->setupDstReadIfNecessary(&dstCopy, &devBounds)) { |
545 return; | 545 return; |
546 } | 546 } |
547 | 547 |
548 this->onDrawPath(path, fill, dstCopy.texture() ? &dstCopy : NULL); | 548 this->onDrawPath(path, fill, dstCopy.texture() ? &dstCopy : NULL); |
549 } | 549 } |
550 | 550 |
| 551 void GrDrawTarget::drawPaths(size_t pathCount, const GrPath** paths, |
| 552 const SkMatrix* transforms, |
| 553 SkPath::FillType fill, SkStrokeRec::Style stroke) { |
| 554 SkASSERT(pathCount > 0); |
| 555 SkASSERT(NULL != paths); |
| 556 SkASSERT(NULL != paths[0]); |
| 557 SkASSERT(this->caps()->pathRenderingSupport()); |
| 558 SkASSERT(!SkPath::IsInverseFillType(fill)); |
| 559 |
| 560 const GrDrawState* drawState = &getDrawState(); |
| 561 |
| 562 SkRect devBounds; |
| 563 for (size_t i = 0; i < pathCount; ++i) { |
| 564 SkRect mappedPathBounds; |
| 565 transforms[i].mapRect(&mappedPathBounds, paths[i]->getBounds()); |
| 566 devBounds.join(mappedPathBounds); |
| 567 } |
| 568 |
| 569 SkMatrix viewM = drawState->getViewMatrix(); |
| 570 viewM.mapRect(&devBounds); |
| 571 |
| 572 GrDeviceCoordTexture dstCopy; |
| 573 if (!this->setupDstReadIfNecessary(&dstCopy, &devBounds)) { |
| 574 return; |
| 575 } |
| 576 |
| 577 this->onDrawPaths(pathCount, paths, transforms, fill, stroke, |
| 578 dstCopy.texture() ? &dstCopy : NULL); |
| 579 } |
| 580 |
551 void GrDrawTarget::instantGpuTraceEvent(const char* marker) { | 581 void GrDrawTarget::instantGpuTraceEvent(const char* marker) { |
552 if (this->caps()->gpuTracingSupport()) { | 582 if (this->caps()->gpuTracingSupport()) { |
553 this->onInstantGpuTraceEvent(marker); | 583 this->onInstantGpuTraceEvent(marker); |
554 } | 584 } |
555 } | 585 } |
556 | 586 |
557 void GrDrawTarget::pushGpuTraceEvent(const char* marker) { | 587 void GrDrawTarget::pushGpuTraceEvent(const char* marker) { |
558 SkASSERT(fPushGpuTraceCount >= 0); | 588 SkASSERT(fPushGpuTraceCount >= 0); |
559 if (this->caps()->gpuTracingSupport()) { | 589 if (this->caps()->gpuTracingSupport()) { |
560 this->onPushGpuTraceEvent(marker); | 590 this->onPushGpuTraceEvent(marker); |
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1072 for (size_t i = 0; i < SK_ARRAY_COUNT(kConfigNames); ++i) { | 1102 for (size_t i = 0; i < SK_ARRAY_COUNT(kConfigNames); ++i) { |
1073 if (i != kUnknown_GrPixelConfig) { | 1103 if (i != kUnknown_GrPixelConfig) { |
1074 r.appendf("%s is renderable: %s, with MSAA: %s\n", | 1104 r.appendf("%s is renderable: %s, with MSAA: %s\n", |
1075 kConfigNames[i], | 1105 kConfigNames[i], |
1076 gNY[fConfigRenderSupport[i][0]], | 1106 gNY[fConfigRenderSupport[i][0]], |
1077 gNY[fConfigRenderSupport[i][1]]); | 1107 gNY[fConfigRenderSupport[i][1]]); |
1078 } | 1108 } |
1079 } | 1109 } |
1080 return r; | 1110 return r; |
1081 } | 1111 } |
OLD | NEW |