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

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

Issue 1552513003: Revert of Make draw* lines responsible for cache management (Closed) Base URL: https://skia.googlesource.com/skia.git@cleanuptext13reallytexutilsdf
Patch Set: Created 4 years, 12 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/GrAtlasTextBlob.h ('k') | src/gpu/text/GrAtlasTextContext.h » ('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 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 "GrAtlasTextBlob.h" 8 #include "GrAtlasTextBlob.h"
9 9
10 #include "GrBlurUtils.h" 10 #include "GrBlurUtils.h"
11 #include "GrContext.h" 11 #include "GrContext.h"
12 #include "GrDrawContext.h" 12 #include "GrDrawContext.h"
13 #include "GrTextUtils.h" 13 #include "GrTextUtils.h"
14 #include "SkColorFilter.h" 14 #include "SkColorFilter.h"
15 #include "SkDrawFilter.h" 15 #include "SkDrawFilter.h"
16 #include "SkGlyphCache.h"
17 #include "SkTextBlobRunIterator.h" 16 #include "SkTextBlobRunIterator.h"
18 #include "batches/GrAtlasTextBatch.h" 17 #include "batches/GrAtlasTextBatch.h"
19 18
20 SkGlyphCache* GrAtlasTextBlob::setupCache(int runIndex,
21 const SkSurfaceProps& props,
22 const SkPaint& skPaint,
23 const SkMatrix* viewMatrix,
24 bool noGamma) {
25 GrAtlasTextBlob::Run* run = &fRuns[runIndex];
26
27 // if we have an override descriptor for the run, then we should use that
28 SkAutoDescriptor* desc = run->fOverrideDescriptor.get() ? run->fOverrideDesc riptor.get() :
29 &run->fDescriptor;
30 skPaint.getScalerContextDescriptor(desc, props, viewMatrix, noGamma);
31 run->fTypeface.reset(SkSafeRef(skPaint.getTypeface()));
32 return SkGlyphCache::DetachCache(run->fTypeface, desc->getDesc());
33 }
34
35 void GrAtlasTextBlob::appendGlyph(int runIndex, 19 void GrAtlasTextBlob::appendGlyph(int runIndex,
36 const SkRect& positions, 20 const SkRect& positions,
37 GrColor color, 21 GrColor color,
38 GrBatchTextStrike* strike, 22 GrBatchTextStrike* strike,
39 GrGlyph* glyph, 23 GrGlyph* glyph,
40 GrFontScaler* scaler, const SkGlyph& skGlyph, 24 GrFontScaler* scaler, const SkGlyph& skGlyph,
41 SkScalar x, SkScalar y, SkScalar scale, bool a pplyVM) { 25 SkScalar x, SkScalar y, SkScalar scale, bool a pplyVM) {
42 26
43 // If the glyph is too large we fall back to paths 27 // If the glyph is too large we fall back to paths
44 if (glyph->fTooLargeForAtlas) { 28 if (glyph->fTooLargeForAtlas) {
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 rSubRun.fBulkUseToken.fPlotAlreadyUpdated); 491 rSubRun.fBulkUseToken.fPlotAlreadyUpdated);
508 for (int k = 0; k < lSubRun.fBulkUseToken.fPlotsToUpdate.count(); k+ +) { 492 for (int k = 0; k < lSubRun.fBulkUseToken.fPlotsToUpdate.count(); k+ +) {
509 SkASSERT(lSubRun.fBulkUseToken.fPlotsToUpdate[k] == 493 SkASSERT(lSubRun.fBulkUseToken.fPlotsToUpdate[k] ==
510 rSubRun.fBulkUseToken.fPlotsToUpdate[k]); 494 rSubRun.fBulkUseToken.fPlotsToUpdate[k]);
511 }*/ 495 }*/
512 } 496 }
513 } 497 }
514 } 498 }
515 499
516 #endif 500 #endif
OLDNEW
« no previous file with comments | « src/gpu/text/GrAtlasTextBlob.h ('k') | src/gpu/text/GrAtlasTextContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698