OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 "SkCanvasStateUtils.h" | 8 #include "SkCanvasStateUtils.h" |
9 | 9 |
10 #include "SkBitmapDevice.h" | |
11 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
12 #include "SkCanvasStack.h" | 11 #include "SkCanvasStack.h" |
| 12 #include "SkDevice.h" |
13 #include "SkErrorInternals.h" | 13 #include "SkErrorInternals.h" |
14 #include "SkWriter32.h" | 14 #include "SkWriter32.h" |
15 | 15 |
16 /* | 16 /* |
17 * WARNING: The structs below are part of a stable ABI and as such we explicitly | 17 * WARNING: The structs below are part of a stable ABI and as such we explicitly |
18 * use unambigious primitives (e.g. int32_t instead of an enum). | 18 * use unambigious primitives (e.g. int32_t instead of an enum). |
19 * | 19 * |
20 * ANY CHANGES TO THE STRUCTS BELOW THAT IMPACT THE ABI SHOULD RESULT IN A NEW | 20 * ANY CHANGES TO THE STRUCTS BELOW THAT IMPACT THE ABI SHOULD RESULT IN A NEW |
21 * NEW SUBCLASS OF SkCanvasState. SUCH CHANGES SHOULD ONLY BE MADE IF ABSOLUTELY | 21 * NEW SUBCLASS OF SkCanvasState. SUCH CHANGES SHOULD ONLY BE MADE IF ABSOLUTELY |
22 * NECESSARY! | 22 * NECESSARY! |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 | 350 |
351 //////////////////////////////////////////////////////////////////////////////// | 351 //////////////////////////////////////////////////////////////////////////////// |
352 | 352 |
353 void SkCanvasStateUtils::ReleaseCanvasState(SkCanvasState* state) { | 353 void SkCanvasStateUtils::ReleaseCanvasState(SkCanvasState* state) { |
354 SkASSERT(!state || SkCanvasState_v1::kVersion == state->version); | 354 SkASSERT(!state || SkCanvasState_v1::kVersion == state->version); |
355 // Upcast to the correct version of SkCanvasState. This avoids having a virt
ual destructor on | 355 // Upcast to the correct version of SkCanvasState. This avoids having a virt
ual destructor on |
356 // SkCanvasState. That would be strange since SkCanvasState has no other vir
tual functions, and | 356 // SkCanvasState. That would be strange since SkCanvasState has no other vir
tual functions, and |
357 // instead uses the field "version" to determine how to behave. | 357 // instead uses the field "version" to determine how to behave. |
358 SkDELETE(static_cast<SkCanvasState_v1*>(state)); | 358 SkDELETE(static_cast<SkCanvasState_v1*>(state)); |
359 } | 359 } |
OLD | NEW |