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

Unified Diff: src/core/SkRecords.h

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
« no previous file with comments | « gyp/core.gypi ('k') | src/core/SkRecords.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkRecords.h
diff --git a/src/core/SkRecords.h b/src/core/SkRecords.h
index 9ab04c91e488d337866978999ecf68496fc8f911..eefb83d82af919a853005430bfedca5e59322714 100644
--- a/src/core/SkRecords.h
+++ b/src/core/SkRecords.h
@@ -11,7 +11,6 @@
#include "SkCanvas.h"
#include "SkDrawable.h"
#include "SkMatrix.h"
-#include "SkPathPriv.h"
#include "SkPicture.h"
#include "SkRSXform.h"
#include "SkTextBlob.h"
@@ -205,14 +204,7 @@ private:
class ImmutableBitmap : SkNoncopyable {
public:
ImmutableBitmap() {}
- explicit ImmutableBitmap(const SkBitmap& bitmap) {
- if (bitmap.isImmutable()) {
- fBitmap = bitmap;
- } else {
- bitmap.copyTo(&fBitmap);
- }
- fBitmap.setImmutable();
- }
+ explicit ImmutableBitmap(const SkBitmap& bitmap);
int width() const { return fBitmap.width(); }
int height() const { return fBitmap.height(); }
@@ -228,22 +220,14 @@ private:
// Recording is a convenient time to cache these, or we can delay it to between record and playback.
struct PreCachedPath : public SkPath {
PreCachedPath() {}
- explicit PreCachedPath(const SkPath& path) : SkPath(path) {
bungeman-skia 2015/07/29 20:11:49 So this is the only one that *has* to move here, r
mtklein 2015/07/29 20:13:08 Correct. The others just looked like good ideas.
- 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
- }
+ explicit PreCachedPath(const SkPath& path);
};
// Like SkPath::getBounds(), SkMatrix::getType() isn't thread safe unless we precache it.
// This may not cover all SkMatrices used by the picture (e.g. some could be hiding in a shader).
struct TypedMatrix : public SkMatrix {
TypedMatrix() {}
- explicit TypedMatrix(const SkMatrix& matrix) : SkMatrix(matrix) {
- (void)this->getType();
- }
+ explicit TypedMatrix(const SkMatrix& matrix);
};
RECORD0(NoOp);
« no previous file with comments | « gyp/core.gypi ('k') | src/core/SkRecords.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698