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

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

Issue 695663003: Cleanup: Go with SkDebugf instead of GrPrintf. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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/gpu/GrAtlas.cpp ('k') | src/gpu/GrContext.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 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 SkASSERT(!drawState->hasColorVertexAttribute()); 565 SkASSERT(!drawState->hasColorVertexAttribute());
566 drawState->setBlendFunc(fPaint.getSrcBlendCoeff(), fPaint.getDst BlendCoeff()); 566 drawState->setBlendFunc(fPaint.getSrcBlendCoeff(), fPaint.getDst BlendCoeff());
567 drawState->setAlpha(fSkPaint.getAlpha()); 567 drawState->setAlpha(fSkPaint.getAlpha());
568 break; 568 break;
569 // LCD text 569 // LCD text
570 case kA888_GrMaskFormat: 570 case kA888_GrMaskFormat:
571 case kA565_GrMaskFormat: { 571 case kA565_GrMaskFormat: {
572 if (kOne_GrBlendCoeff != fPaint.getSrcBlendCoeff() || 572 if (kOne_GrBlendCoeff != fPaint.getSrcBlendCoeff() ||
573 kISA_GrBlendCoeff != fPaint.getDstBlendCoeff() || 573 kISA_GrBlendCoeff != fPaint.getDstBlendCoeff() ||
574 fPaint.numColorStages()) { 574 fPaint.numColorStages()) {
575 GrPrintf("LCD Text will not draw correctly.\n"); 575 SkDebugf("LCD Text will not draw correctly.\n");
576 } 576 }
577 SkASSERT(!drawState->hasColorVertexAttribute()); 577 SkASSERT(!drawState->hasColorVertexAttribute());
578 // We don't use the GrPaint's color in this case because it's be en premultiplied by 578 // We don't use the GrPaint's color in this case because it's be en premultiplied by
579 // alpha. Instead we feed in a non-premultiplied color, and mult iply its alpha by 579 // alpha. Instead we feed in a non-premultiplied color, and mult iply its alpha by
580 // the mask texture color. The end result is that we get 580 // the mask texture color. The end result is that we get
581 // mask*paintAlpha*paintColor + (1-mask*paintAlpha)*d stColor 581 // mask*paintAlpha*paintColor + (1-mask*paintAlpha)*d stColor
582 int a = SkColorGetA(fSkPaint.getColor()); 582 int a = SkColorGetA(fSkPaint.getColor());
583 // paintAlpha 583 // paintAlpha
584 drawState->setColor(SkColorSetARGB(a, a, a, a)); 584 drawState->setColor(SkColorSetARGB(a, a, a, a));
585 // paintColor 585 // paintColor
(...skipping 28 matching lines...) Expand all
614 } 614 }
615 } 615 }
616 616
617 inline void GrBitmapTextContext::finish() { 617 inline void GrBitmapTextContext::finish() {
618 this->flush(); 618 this->flush();
619 fTotalVertexCount = 0; 619 fTotalVertexCount = 0;
620 620
621 GrTextContext::finish(); 621 GrTextContext::finish();
622 } 622 }
623 623
OLDNEW
« no previous file with comments | « src/gpu/GrAtlas.cpp ('k') | src/gpu/GrContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698