Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Side by Side Diff: src/gpu/GrBitmapTextContext.cpp

Issue 947443003: Move clip off of draw target (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: feedback inc Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/gpu/GrAARectRenderer.cpp ('k') | src/gpu/GrClip.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/gpu/GrAARectRenderer.cpp ('k') | src/gpu/GrClip.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698