| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 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 "SkCanvas.h" | 8 #include "SkCanvas.h" |
| 9 #include "SkData.h" | 9 #include "SkData.h" |
| 10 #include "SkImageFilter.h" | 10 #include "SkImageFilter.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 } | 36 } |
| 37 | 37 |
| 38 // Helper for getting back at arrays which have been copy_v'd together after an
Op. | 38 // Helper for getting back at arrays which have been copy_v'd together after an
Op. |
| 39 template <typename D, typename T> | 39 template <typename D, typename T> |
| 40 static D* pod(T* op, size_t offset = 0) { | 40 static D* pod(T* op, size_t offset = 0) { |
| 41 return SkTAddOffset<D>(op+1, offset); | 41 return SkTAddOffset<D>(op+1, offset); |
| 42 } | 42 } |
| 43 | 43 |
| 44 // Pre-cache lazy non-threadsafe fields on SkPath and/or SkMatrix. | 44 // Pre-cache lazy non-threadsafe fields on SkPath and/or SkMatrix. |
| 45 static void make_threadsafe(SkPath* path, SkMatrix* matrix) { | 45 static void make_threadsafe(SkPath* path, SkMatrix* matrix) { |
| 46 if (path) { path->updateBoundsCache(); } | 46 if (path) { |
| 47 path->updateBoundsCache(); |
| 48 (void)path->getConvexity(); |
| 49 } |
| 47 if (matrix) { (void)matrix->getType(); } | 50 if (matrix) { (void)matrix->getType(); } |
| 48 } | 51 } |
| 49 | 52 |
| 50 namespace { | 53 namespace { |
| 51 #define TYPES(M)
\ | 54 #define TYPES(M)
\ |
| 52 M(Save) M(Restore) M(SaveLayer)
\ | 55 M(Save) M(Restore) M(SaveLayer)
\ |
| 53 M(Concat) M(SetMatrix) M(Translate) M(TranslateZ)
\ | 56 M(Concat) M(SetMatrix) M(Translate) M(TranslateZ)
\ |
| 54 M(ClipPath) M(ClipRect) M(ClipRRect) M(ClipRegion)
\ | 57 M(ClipPath) M(ClipRect) M(ClipRRect) M(ClipRegion)
\ |
| 55 M(DrawPaint) M(DrawPath) M(DrawRect) M(DrawRegion) M(DrawOval) M(DrawArc)
\ | 58 M(DrawPaint) M(DrawPath) M(DrawRect) M(DrawRegion) M(DrawOval) M(DrawArc)
\ |
| 56 M(DrawRRect) M(DrawDRRect) M(DrawAnnotation) M(DrawDrawable) M(DrawPicture)
\ | 59 M(DrawRRect) M(DrawDRRect) M(DrawAnnotation) M(DrawDrawable) M(DrawPicture)
\ |
| (...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 783 } | 786 } |
| 784 | 787 |
| 785 void SkLiteDL::reset(SkRect bounds) { | 788 void SkLiteDL::reset(SkRect bounds) { |
| 786 SkASSERT(this->unique()); | 789 SkASSERT(this->unique()); |
| 787 this->map(dtor_fns); | 790 this->map(dtor_fns); |
| 788 | 791 |
| 789 // Leave fBytes and fReserved alone. | 792 // Leave fBytes and fReserved alone. |
| 790 fUsed = 0; | 793 fUsed = 0; |
| 791 fBounds = bounds; | 794 fBounds = bounds; |
| 792 } | 795 } |
| OLD | NEW |