| 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 |
| 64 struct BitmapTextBlob : public SkRefCnt { | 65 struct BitmapTextBlob : public SkRefCnt { |
| 65 SK_DECLARE_INTERNAL_LLIST_INTERFACE(BitmapTextBlob); | 66 SK_DECLARE_INTERNAL_LLIST_INTERFACE(BitmapTextBlob); |
| 66 | 67 |
| 67 /* | 68 /* |
| 68 * Each Run inside of the blob can have its texture coordinates regenera
ted if required. | 69 * Each Run inside of the blob can have its texture coordinates regenera
ted if required. |
| 69 * To determine if regeneration is necessary, fAtlasGeneration is used.
If there have been | 70 * To determine if regeneration is necessary, fAtlasGeneration is used.
If there have been |
| 70 * any evictions inside of the atlas, then we will simply regenerate Run
s. We could track | 71 * any evictions inside of the atlas, then we will simply regenerate Run
s. We could track |
| 71 * this at a more fine grained level, but its not clear if this is worth
it, as evictions | 72 * this at a more fine grained level, but its not clear if this is worth
it, as evictions |
| 72 * should be fairly rare. | 73 * should be fairly rare. |
| 73 * | 74 * |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 bool fEnableDFRendering; | 358 bool fEnableDFRendering; |
| 358 SkAutoTUnref<DistanceAdjustTable> fDistanceAdjustTable; | 359 SkAutoTUnref<DistanceAdjustTable> fDistanceAdjustTable; |
| 359 | 360 |
| 360 friend class GrTextBlobCache; | 361 friend class GrTextBlobCache; |
| 361 friend class BitmapTextBatch; | 362 friend class BitmapTextBatch; |
| 362 | 363 |
| 363 typedef GrTextContext INHERITED; | 364 typedef GrTextContext INHERITED; |
| 364 }; | 365 }; |
| 365 | 366 |
| 366 #endif | 367 #endif |
| OLD | NEW |