Chromium Code Reviews| 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); |