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

Side by Side Diff: src/gpu/GrDistanceFieldTextContext.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/GrContext.cpp ('k') | src/gpu/GrDrawTarget.h » ('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 "GrDistanceFieldTextContext.h" 8 #include "GrDistanceFieldTextContext.h"
9 #include "GrAtlas.h" 9 #include "GrAtlas.h"
10 #include "GrBitmapTextContext.h" 10 #include "GrBitmapTextContext.h"
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
661 return true; 661 return true;
662 } 662 }
663 663
664 void GrDistanceFieldTextContext::flush() { 664 void GrDistanceFieldTextContext::flush() {
665 if (NULL == fDrawTarget) { 665 if (NULL == fDrawTarget) {
666 return; 666 return;
667 } 667 }
668 668
669 if (fCurrVertex > 0) { 669 if (fCurrVertex > 0) {
670 GrPipelineBuilder pipelineBuilder; 670 GrPipelineBuilder pipelineBuilder;
671 pipelineBuilder.setFromPaint(fPaint, fRenderTarget); 671 pipelineBuilder.setFromPaint(fPaint, fRenderTarget, fClip);
672 672
673 // setup our sampler state for our text texture/atlas 673 // setup our sampler state for our text texture/atlas
674 SkASSERT(SkIsAlign4(fCurrVertex)); 674 SkASSERT(SkIsAlign4(fCurrVertex));
675 675
676 // get our current color 676 // get our current color
677 SkColor filteredColor; 677 SkColor filteredColor;
678 SkColorFilter* colorFilter = fSkPaint.getColorFilter(); 678 SkColorFilter* colorFilter = fSkPaint.getColorFilter();
679 if (colorFilter) { 679 if (colorFilter) {
680 filteredColor = colorFilter->filterColor(fSkPaint.getColor()); 680 filteredColor = colorFilter->filterColor(fSkPaint.getColor());
681 } else { 681 } else {
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
715 } 715 }
716 } 716 }
717 717
718 inline void GrDistanceFieldTextContext::finish() { 718 inline void GrDistanceFieldTextContext::finish() {
719 this->flush(); 719 this->flush();
720 fTotalVertexCount = 0; 720 fTotalVertexCount = 0;
721 721
722 GrTextContext::finish(); 722 GrTextContext::finish();
723 } 723 }
724 724
OLDNEW
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/GrDrawTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698