| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 GrTRecorder_DEFINED | 8 #ifndef GrTRecorder_DEFINED |
| 9 #define GrTRecorder_DEFINED | 9 #define GrTRecorder_DEFINED |
| 10 | 10 |
| 11 #include "SkTemplates.h" | |
| 12 #include "SkTypes.h" | 11 #include "SkTypes.h" |
| 13 | 12 |
| 14 template<typename TBase, typename TAlign> class GrTRecorder; | 13 template<typename TBase, typename TAlign> class GrTRecorder; |
| 15 template<typename TItem> struct GrTRecorderAllocWrapper; | 14 template<typename TItem> struct GrTRecorderAllocWrapper; |
| 16 | 15 |
| 17 /** | 16 /** |
| 18 * Records a list of items with a common base type, optional associated data, an
d | 17 * Records a list of items with a common base type, optional associated data, an
d |
| 19 * permanent memory addresses. | 18 * permanent memory addresses. |
| 20 * | 19 * |
| 21 * This class preallocates its own chunks of memory for hosting objects, so new
items can | 20 * This class preallocates its own chunks of memory for hosting objects, so new
items can |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 SK_CRASH(); | 381 SK_CRASH(); |
| 383 } | 382 } |
| 384 | 383 |
| 385 #define GrNEW_APPEND_TO_RECORDER(recorder, type_name, args) \ | 384 #define GrNEW_APPEND_TO_RECORDER(recorder, type_name, args) \ |
| 386 (new (recorder, GrTRecorderAllocWrapper<type_name>()) type_name args) | 385 (new (recorder, GrTRecorderAllocWrapper<type_name>()) type_name args) |
| 387 | 386 |
| 388 #define GrNEW_APPEND_WITH_DATA_TO_RECORDER(recorder, type_name, args, size_of_da
ta) \ | 387 #define GrNEW_APPEND_WITH_DATA_TO_RECORDER(recorder, type_name, args, size_of_da
ta) \ |
| 389 (new (recorder, GrTRecorderAllocWrapper<type_name>(recorder, size_of_data))
type_name args) | 388 (new (recorder, GrTRecorderAllocWrapper<type_name>(recorder, size_of_data))
type_name args) |
| 390 | 389 |
| 391 #endif | 390 #endif |
| OLD | NEW |