Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(159)

Unified Diff: src/core/SkRecords.cpp

Issue 1253963004: Move non-trivial constructors out-of-line. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: duh Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/core/SkRecords.h ('K') | « src/core/SkRecords.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkRecords.cpp
diff --git a/src/core/SkRecords.cpp b/src/core/SkRecords.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..d0a3ddbe10c9d9705ec6db77d149908ce82f974c
--- /dev/null
+++ b/src/core/SkRecords.cpp
@@ -0,0 +1,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();
+ }
+}
« src/core/SkRecords.h ('K') | « src/core/SkRecords.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698