| OLD | NEW |
| 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 #ifndef GrAtlasTextContext_DEFINED | 8 #ifndef GrAtlasTextContext_DEFINED |
| 9 #define GrAtlasTextContext_DEFINED | 9 #define GrAtlasTextContext_DEFINED |
| 10 | 10 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 /* | 54 /* |
| 55 * A BitmapTextBlob contains a fully processed SkTextBlob, suitable for near
ly immediate drawing | 55 * A BitmapTextBlob contains a fully processed SkTextBlob, suitable for near
ly immediate drawing |
| 56 * on the GPU. These are initially created with valid positions and colors,
but invalid | 56 * on the GPU. These are initially created with valid positions and colors,
but invalid |
| 57 * texture coordinates. The BitmapTextBlob itself has a few Blob-wide prope
rties, and also | 57 * texture coordinates. The BitmapTextBlob itself has a few Blob-wide prope
rties, and also |
| 58 * consists of a number of runs. Runs inside a blob are flushed individuall
y so they can be | 58 * consists of a number of runs. Runs inside a blob are flushed individuall
y so they can be |
| 59 * reordered. | 59 * reordered. |
| 60 * | 60 * |
| 61 * The only thing(aside from a memcopy) required to flush a BitmapTextBlob i
s to ensure that | 61 * The only thing(aside from a memcopy) required to flush a BitmapTextBlob i
s to ensure that |
| 62 * the GrAtlas will not evict anything the Blob needs. | 62 * the GrAtlas will not evict anything the Blob needs. |
| 63 */ | 63 */ |
| 64 // TODO Pack these bytes | |
| 65 struct BitmapTextBlob : public SkRefCnt { | 64 struct BitmapTextBlob : public SkRefCnt { |
| 66 SK_DECLARE_INTERNAL_LLIST_INTERFACE(BitmapTextBlob); | 65 SK_DECLARE_INTERNAL_LLIST_INTERFACE(BitmapTextBlob); |
| 67 | 66 |
| 68 /* | 67 /* |
| 69 * Each Run inside of the blob can have its texture coordinates regenera
ted if required. | 68 * Each Run inside of the blob can have its texture coordinates regenera
ted if required. |
| 70 * To determine if regeneration is necessary, fAtlasGeneration is used.
If there have been | 69 * To determine if regeneration is necessary, fAtlasGeneration is used.
If there have been |
| 71 * any evictions inside of the atlas, then we will simply regenerate Run
s. We could track | 70 * any evictions inside of the atlas, then we will simply regenerate Run
s. We could track |
| 72 * this at a more fine grained level, but its not clear if this is worth
it, as evictions | 71 * this at a more fine grained level, but its not clear if this is worth
it, as evictions |
| 73 * should be fairly rare. | 72 * should be fairly rare. |
| 74 * | 73 * |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 bool fEnableDFRendering; | 357 bool fEnableDFRendering; |
| 359 SkAutoTUnref<DistanceAdjustTable> fDistanceAdjustTable; | 358 SkAutoTUnref<DistanceAdjustTable> fDistanceAdjustTable; |
| 360 | 359 |
| 361 friend class GrTextBlobCache; | 360 friend class GrTextBlobCache; |
| 362 friend class BitmapTextBatch; | 361 friend class BitmapTextBatch; |
| 363 | 362 |
| 364 typedef GrTextContext INHERITED; | 363 typedef GrTextContext INHERITED; |
| 365 }; | 364 }; |
| 366 | 365 |
| 367 #endif | 366 #endif |
| OLD | NEW |