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

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

Issue 728673002: remove unused kLCD_MaskFormat (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove associated Gr enum Created 6 years, 1 month 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/core/SkScalerContext.cpp ('k') | src/gpu/GrFontScaler.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 "GrDrawTarget.h" 10 #include "GrDrawTarget.h"
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 585
586 SkASSERT(fStrike); 586 SkASSERT(fStrike);
587 switch (fCurrMaskFormat) { 587 switch (fCurrMaskFormat) {
588 // Color bitmap text 588 // Color bitmap text
589 case kARGB_GrMaskFormat: 589 case kARGB_GrMaskFormat:
590 SkASSERT(!drawState->hasColorVertexAttribute()); 590 SkASSERT(!drawState->hasColorVertexAttribute());
591 drawState->setBlendFunc(fPaint.getSrcBlendCoeff(), fPaint.getDst BlendCoeff()); 591 drawState->setBlendFunc(fPaint.getSrcBlendCoeff(), fPaint.getDst BlendCoeff());
592 drawState->setAlpha(fSkPaint.getAlpha()); 592 drawState->setAlpha(fSkPaint.getAlpha());
593 break; 593 break;
594 // LCD text 594 // LCD text
595 case kA888_GrMaskFormat:
596 case kA565_GrMaskFormat: { 595 case kA565_GrMaskFormat: {
597 if (kOne_GrBlendCoeff != fPaint.getSrcBlendCoeff() || 596 if (kOne_GrBlendCoeff != fPaint.getSrcBlendCoeff() ||
598 kISA_GrBlendCoeff != fPaint.getDstBlendCoeff() || 597 kISA_GrBlendCoeff != fPaint.getDstBlendCoeff() ||
599 fPaint.numColorStages()) { 598 fPaint.numColorStages()) {
600 SkDebugf("LCD Text will not draw correctly.\n"); 599 SkDebugf("LCD Text will not draw correctly.\n");
601 } 600 }
602 SkASSERT(!drawState->hasColorVertexAttribute()); 601 SkASSERT(!drawState->hasColorVertexAttribute());
603 // We don't use the GrPaint's color in this case because it's be en premultiplied by 602 // We don't use the GrPaint's color in this case because it's be en premultiplied by
604 // alpha. Instead we feed in a non-premultiplied color, and mult iply its alpha by 603 // alpha. Instead we feed in a non-premultiplied color, and mult iply its alpha by
605 // the mask texture color. The end result is that we get 604 // the mask texture color. The end result is that we get
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
639 } 638 }
640 } 639 }
641 640
642 inline void GrBitmapTextContext::finish() { 641 inline void GrBitmapTextContext::finish() {
643 this->flush(); 642 this->flush();
644 fTotalVertexCount = 0; 643 fTotalVertexCount = 0;
645 644
646 GrTextContext::finish(); 645 GrTextContext::finish();
647 } 646 }
648 647
OLDNEW
« no previous file with comments | « src/core/SkScalerContext.cpp ('k') | src/gpu/GrFontScaler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698