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

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

Issue 986343002: Adjust distance field glyph and font atlas sizes to maximize storage. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Use texture clamping with NPOT text atlas Created 5 years, 9 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 | « no previous file | src/gpu/GrDistanceFieldTextContext.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 568 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 } 579 }
580 break; 580 break;
581 } 581 }
582 // Grayscale/BW text 582 // Grayscale/BW text
583 case kA8_GrMaskFormat: 583 case kA8_GrMaskFormat:
584 break; 584 break;
585 default: 585 default:
586 SkFAIL("Unexpected mask format."); 586 SkFAIL("Unexpected mask format.");
587 } 587 }
588 588
589 GrTextureParams params(SkShader::kRepeat_TileMode, GrTextureParams::kNon e_FilterMode); 589 GrTextureParams params(SkShader::kClamp_TileMode, GrTextureParams::kNone _FilterMode);
590 uint32_t textureUniqueID = fCurrTexture->getUniqueID(); 590 uint32_t textureUniqueID = fCurrTexture->getUniqueID();
591 if (textureUniqueID != fEffectTextureUniqueID || 591 if (textureUniqueID != fEffectTextureUniqueID ||
592 fCachedGeometryProcessor->color() != color || 592 fCachedGeometryProcessor->color() != color ||
593 !fCachedGeometryProcessor->localMatrix().cheapEqualTo(fLocalMatrix)) { 593 !fCachedGeometryProcessor->localMatrix().cheapEqualTo(fLocalMatrix)) {
594 // This will be ignored in the non A8 case 594 // This will be ignored in the non A8 case
595 bool opaqueVertexColors = GrColorIsOpaque(fPaint.getColor()); 595 bool opaqueVertexColors = GrColorIsOpaque(fPaint.getColor());
596 fCachedGeometryProcessor.reset(GrBitmapTextGeoProc::Create(color, 596 fCachedGeometryProcessor.reset(GrBitmapTextGeoProc::Create(color,
597 fCurrText ure, 597 fCurrText ure,
598 params, 598 params,
599 fCurrMask Format, 599 fCurrMask Format,
(...skipping 23 matching lines...) Expand all
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 | « no previous file | src/gpu/GrDistanceFieldTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698