| 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 #include "SkPathPriv.h" | 8 #include "SkPathPriv.h" |
| 9 #include "SkRecords.h" | 9 #include "SkRecords.h" |
| 10 | 10 |
| 11 namespace SkRecords { | 11 namespace SkRecords { |
| 12 ImmutableBitmap::ImmutableBitmap(const SkBitmap& bitmap) { | |
| 13 if (bitmap.isImmutable()) { | |
| 14 fBitmap = bitmap; | |
| 15 } else { | |
| 16 bitmap.copyTo(&fBitmap); | |
| 17 } | |
| 18 fBitmap.setImmutable(); | |
| 19 } | |
| 20 | |
| 21 PreCachedPath::PreCachedPath(const SkPath& path) : SkPath(path) { | 12 PreCachedPath::PreCachedPath(const SkPath& path) : SkPath(path) { |
| 22 this->updateBoundsCache(); | 13 this->updateBoundsCache(); |
| 23 #if 0 // Disabled to see if we ever really race on this. It costs time, chromi
um:496982. | 14 #if 0 // Disabled to see if we ever really race on this. It costs time, chromi
um:496982. |
| 24 SkPathPriv::FirstDirection junk; | 15 SkPathPriv::FirstDirection junk; |
| 25 (void)SkPathPriv::CheapComputeFirstDirection(*this, &junk); | 16 (void)SkPathPriv::CheapComputeFirstDirection(*this, &junk); |
| 26 #endif | 17 #endif |
| 27 } | 18 } |
| 28 | 19 |
| 29 TypedMatrix::TypedMatrix(const SkMatrix& matrix) : SkMatrix(matrix) { | 20 TypedMatrix::TypedMatrix(const SkMatrix& matrix) : SkMatrix(matrix) { |
| 30 (void)this->getType(); | 21 (void)this->getType(); |
| 31 } | 22 } |
| 32 } | 23 } |
| OLD | NEW |