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

Side by Side Diff: src/gpu/GrDistanceFieldAdjustTable.h

Issue 1512823004: Move DistanceAdjustTable to its own file (Closed) Base URL: https://skia.googlesource.com/skia.git@cleanuptext7
Patch Set: tweaks Created 5 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 | « src/gpu/GrAtlasTextContext.cpp ('k') | src/gpu/GrDistanceFieldAdjustTable.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2015 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #ifndef GrDistanceFieldAdjustTable_DEFINED
9 #define GrDistanceFieldAdjustTable_DEFINED
10
11 #include "SkRefCnt.h"
12 #include "SkScalar.h"
13
14 // Distance field text needs this table to compute a value for use in the fragme nt shader.
15 // Because the GrAtlasTextContext can go out of scope before the final flush, th is needs to be
16 // refcnted and malloced
17 struct GrDistanceFieldAdjustTable : public SkNVRefCnt<GrDistanceFieldAdjustTable > {
18 GrDistanceFieldAdjustTable() { this->buildDistanceAdjustTable(); }
19 ~GrDistanceFieldAdjustTable() { delete[] fTable; }
20
21 const SkScalar& operator[] (int i) const {
22 return fTable[i];
23 }
24
25 private:
26 void buildDistanceAdjustTable();
27
28 SkScalar* fTable;
29 };
30
31 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrAtlasTextContext.cpp ('k') | src/gpu/GrDistanceFieldAdjustTable.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698