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

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

Issue 762223003: Remove unused static function skcolor_to_grcolor_nopremultiply. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years 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 | « no previous file | no next file » | 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 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 // color comes after position. 508 // color comes after position.
509 GrColor* colors = reinterpret_cast<GrColor*>(positions + 1); 509 GrColor* colors = reinterpret_cast<GrColor*>(positions + 1);
510 for (int i = 0; i < 4; ++i) { 510 for (int i = 0; i < 4; ++i) {
511 *colors = fPaint.getColor(); 511 *colors = fPaint.getColor();
512 colors = reinterpret_cast<GrColor*>(reinterpret_cast<intptr_t>(colors ) + vertSize); 512 colors = reinterpret_cast<GrColor*>(reinterpret_cast<intptr_t>(colors ) + vertSize);
513 } 513 }
514 } 514 }
515 fCurrVertex += 4; 515 fCurrVertex += 4;
516 } 516 }
517 517
518 static inline GrColor skcolor_to_grcolor_nopremultiply(SkColor c) {
519 unsigned r = SkColorGetR(c);
520 unsigned g = SkColorGetG(c);
521 unsigned b = SkColorGetB(c);
522 return GrColorPackRGBA(r, g, b, 0xff);
523 }
524
525 void GrBitmapTextContext::flush() { 518 void GrBitmapTextContext::flush() {
526 if (NULL == fDrawTarget) { 519 if (NULL == fDrawTarget) {
527 return; 520 return;
528 } 521 }
529 522
530 if (fCurrVertex > 0) { 523 if (fCurrVertex > 0) {
531 GrDrawState drawState; 524 GrDrawState drawState;
532 drawState.setFromPaint(fPaint, SkMatrix::I(), fContext->getRenderTarget( )); 525 drawState.setFromPaint(fPaint, SkMatrix::I(), fContext->getRenderTarget( ));
533 526
534 // setup our sampler state for our text texture/atlas 527 // setup our sampler state for our text texture/atlas
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 } 597 }
605 } 598 }
606 599
607 inline void GrBitmapTextContext::finish() { 600 inline void GrBitmapTextContext::finish() {
608 this->flush(); 601 this->flush();
609 fTotalVertexCount = 0; 602 fTotalVertexCount = 0;
610 603
611 GrTextContext::finish(); 604 GrTextContext::finish();
612 } 605 }
613 606
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698