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

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

Issue 1062863002: Avoid regenerating cached textblobs on integer scrolls (Closed) Base URL: https://skia.googlesource.com/skia.git@atlastextcache
Patch Set: tweak Created 5 years, 8 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/GrTextBlobCache.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 "GrTextBlobCache.h" 8 #include "GrTextBlobCache.h"
9 9
10 static const int kVerticesPerGlyph = 4; 10 static const int kVerticesPerGlyph = 4;
(...skipping 23 matching lines...) Expand all
34 cacheBlob->fGlyphIDs = 34 cacheBlob->fGlyphIDs =
35 reinterpret_cast<GrGlyph::PackedID*>(cacheBlob->fVertices + vertices Count); 35 reinterpret_cast<GrGlyph::PackedID*>(cacheBlob->fVertices + vertices Count);
36 cacheBlob->fRuns = reinterpret_cast<BitmapTextBlob::Run*>(cacheBlob->fGlyphI Ds + glyphCount); 36 cacheBlob->fRuns = reinterpret_cast<BitmapTextBlob::Run*>(cacheBlob->fGlyphI Ds + glyphCount);
37 37
38 // Initialize runs 38 // Initialize runs
39 for (int i = 0; i < runCount; i++) { 39 for (int i = 0; i < runCount; i++) {
40 SkNEW_PLACEMENT(&cacheBlob->fRuns[i], BitmapTextBlob::Run); 40 SkNEW_PLACEMENT(&cacheBlob->fRuns[i], BitmapTextBlob::Run);
41 } 41 }
42 cacheBlob->fRunCount = runCount; 42 cacheBlob->fRunCount = runCount;
43 cacheBlob->fPool = &fPool; 43 cacheBlob->fPool = &fPool;
44
45 #ifdef SK_DEBUG
46 cacheBlob->fTotalXError = 0;
47 cacheBlob->fTotalYError = 0;
48 #endif
44 return cacheBlob; 49 return cacheBlob;
45 } 50 }
OLDNEW
« no previous file with comments | « src/gpu/GrTextBlobCache.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698