| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 "GrBitmapTextContext.h" | 8 #include "GrBitmapTextContext.h" |
| 9 #include "GrAtlas.h" | 9 #include "GrAtlas.h" |
| 10 #include "GrDefaultGeoProcFactory.h" | 10 #include "GrDefaultGeoProcFactory.h" |
| (...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 546 fCurrVertex += 4; | 546 fCurrVertex += 4; |
| 547 } | 547 } |
| 548 | 548 |
| 549 void GrBitmapTextContext::flush() { | 549 void GrBitmapTextContext::flush() { |
| 550 if (NULL == fDrawTarget) { | 550 if (NULL == fDrawTarget) { |
| 551 return; | 551 return; |
| 552 } | 552 } |
| 553 | 553 |
| 554 if (fCurrVertex > 0) { | 554 if (fCurrVertex > 0) { |
| 555 GrPipelineBuilder pipelineBuilder; | 555 GrPipelineBuilder pipelineBuilder; |
| 556 pipelineBuilder.setFromPaint(fPaint, fRenderTarget); | 556 pipelineBuilder.setFromPaint(fPaint, fRenderTarget, fClip); |
| 557 | 557 |
| 558 // setup our sampler state for our text texture/atlas | 558 // setup our sampler state for our text texture/atlas |
| 559 SkASSERT(SkIsAlign4(fCurrVertex)); | 559 SkASSERT(SkIsAlign4(fCurrVertex)); |
| 560 SkASSERT(fCurrTexture); | 560 SkASSERT(fCurrTexture); |
| 561 | 561 |
| 562 SkASSERT(fStrike); | 562 SkASSERT(fStrike); |
| 563 GrColor color = fPaint.getColor(); | 563 GrColor color = fPaint.getColor(); |
| 564 switch (fCurrMaskFormat) { | 564 switch (fCurrMaskFormat) { |
| 565 // Color bitmap text | 565 // Color bitmap text |
| 566 case kARGB_GrMaskFormat: { | 566 case kARGB_GrMaskFormat: { |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 623 } | 623 } |
| 624 } | 624 } |
| 625 | 625 |
| 626 inline void GrBitmapTextContext::finish() { | 626 inline void GrBitmapTextContext::finish() { |
| 627 this->flush(); | 627 this->flush(); |
| 628 fTotalVertexCount = 0; | 628 fTotalVertexCount = 0; |
| 629 | 629 |
| 630 GrTextContext::finish(); | 630 GrTextContext::finish(); |
| 631 } | 631 } |
| 632 | 632 |
| OLD | NEW |