blob: d0a3ddbe10c9d9705ec6db77d149908ce82f974c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
/*
* Copyright 2015 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "SkPathPriv.h"
#include "SkRecords.h"
namespace SkRecords {
ImmutableBitmap::ImmutableBitmap(const SkBitmap& bitmap) {
if (bitmap.isImmutable()) {
fBitmap = bitmap;
} else {
bitmap.copyTo(&fBitmap);
}
fBitmap.setImmutable();
}
PreCachedPath::PreCachedPath(const SkPath& path) : SkPath(path) {
this->updateBoundsCache();
#if 0 // Disabled to see if we ever really race on this. It costs time, chromium:496982.
SkPathPriv::FirstDirection junk;
(void)SkPathPriv::CheapComputeFirstDirection(*this, &junk);
#endif
}
TypedMatrix::TypedMatrix(const SkMatrix& matrix) : SkMatrix(matrix) {
(void)this->getType();
}
}
|