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

Side by Side Diff: src/gpu/text/GrBatchFontCache.cpp

Issue 2128583007: Revert of Use sRGB pixel config for ARGB masks (color emoji) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 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/text/GrBatchFontCache.h ('k') | 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 2015 Google Inc. 2 * Copyright 2015 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 "GrBatchFontCache.h" 8 #include "GrBatchFontCache.h"
9 #include "GrContext.h" 9 #include "GrContext.h"
10 #include "GrGpu.h" 10 #include "GrGpu.h"
11 #include "GrRectanizer.h" 11 #include "GrRectanizer.h"
12 #include "GrResourceProvider.h" 12 #include "GrResourceProvider.h"
13 #include "GrSurfacePriv.h" 13 #include "GrSurfacePriv.h"
14 #include "SkString.h" 14 #include "SkString.h"
15 15
16 #include "SkDistanceFieldGen.h" 16 #include "SkDistanceFieldGen.h"
17 17
18 bool GrBatchFontCache::initAtlas(GrMaskFormat format) { 18 bool GrBatchFontCache::initAtlas(GrMaskFormat format) {
19 int index = MaskFormatToAtlasIndex(format); 19 int index = MaskFormatToAtlasIndex(format);
20 if (!fAtlases[index]) { 20 if (!fAtlases[index]) {
21 GrPixelConfig config = MaskFormatToPixelConfig(format, *fContext->caps() ); 21 GrPixelConfig config = MaskFormatToPixelConfig(format);
22 int width = fAtlasConfigs[index].fWidth; 22 int width = fAtlasConfigs[index].fWidth;
23 int height = fAtlasConfigs[index].fHeight; 23 int height = fAtlasConfigs[index].fHeight;
24 int numPlotsX = fAtlasConfigs[index].numPlotsX(); 24 int numPlotsX = fAtlasConfigs[index].numPlotsX();
25 int numPlotsY = fAtlasConfigs[index].numPlotsY(); 25 int numPlotsY = fAtlasConfigs[index].numPlotsY();
26 26
27 fAtlases[index] = 27 fAtlases[index] =
28 fContext->resourceProvider()->createAtlas(config, width, height, 28 fContext->resourceProvider()->createAtlas(config, width, height,
29 numPlotsX, numPlotsY, 29 numPlotsX, numPlotsY,
30 &GrBatchFontCache::Han dleEviction, 30 &GrBatchFontCache::Han dleEviction,
31 (void*)this); 31 (void*)this);
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 381
382 bool success = fBatchFontCache->addToAtlas(this, &glyph->fID, target, expect edMaskFormat, 382 bool success = fBatchFontCache->addToAtlas(this, &glyph->fID, target, expect edMaskFormat,
383 glyph->width(), glyph->height(), 383 glyph->width(), glyph->height(),
384 storage.get(), &glyph->fAtlasLoca tion); 384 storage.get(), &glyph->fAtlasLoca tion);
385 if (success) { 385 if (success) {
386 SkASSERT(GrBatchAtlas::kInvalidAtlasID != glyph->fID); 386 SkASSERT(GrBatchAtlas::kInvalidAtlasID != glyph->fID);
387 fAtlasedGlyphs++; 387 fAtlasedGlyphs++;
388 } 388 }
389 return success; 389 return success;
390 } 390 }
OLDNEW
« no previous file with comments | « src/gpu/text/GrBatchFontCache.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698