diff options
author | reed <reed@chromium.org> | 2015-05-07 17:30:13 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-07 17:30:13 -0700 |
commit | b7ed856fadae52401d3bbcac22cfc3391780ace8 (patch) | |
tree | dfea1030ca7eb63ea58f1e733cf741c89273d4df /src/core/SkRecords.h | |
parent | 8b26b99c97473f020df4b9d4ba789e074e06cedd (diff) |
Revert of Sketch splitting SkPicture into an interface and SkBigPicture. (patchset #22 id:420001 of https://codereview.chromium.org/1112523006/)
Reason for revert:
speculative revert to fix failures in DEPS roll
Original issue's description:
> Sketch splitting SkPicture into an interface and SkBigPicture.
>
> Adds small pictures for drawRect(), drawTextBlob(), and drawPath().
> These cover about 89% of draw calls from Blink SKPs,
> and about 25% of draw calls from our GMs.
>
> SkPicture handles:
> - serialization and deserialization
> - unique IDs
>
> Everything else is left to the subclasses:
> - playback(), cullRect()
> - hasBitmap(), hasText(), suitableForGPU(), etc.
> - LayerInfo / AccelData if applicable.
>
> The time to record a 1-op picture improves a good chunk
> (2 mallocs to 1), and the time to record a 0-op picture
> greatly improves (2 mallocs to none):
>
> picture_overhead_draw: 450ns -> 350ns
> picture_overhead_nodraw: 300ns -> 90ns
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/c92c129ff85b05a714bd1bf921c02d5e14651f8b
TBR=reed@google.com,robertphillips@google.com,mtklein@google.com,mtklein@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1130333002
Diffstat (limited to 'src/core/SkRecords.h')
-rw-r--r-- | src/core/SkRecords.h | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/src/core/SkRecords.h b/src/core/SkRecords.h index 6e25dd22e2..319d155054 100644 --- a/src/core/SkRecords.h +++ b/src/core/SkRecords.h @@ -81,7 +81,6 @@ struct T { \ #define RECORD1(T, A, a) \ struct T { \ static const Type kType = T##_Type; \ - T() {} \ template <typename Z> \ T(Z a) : a(a) {} \ A a; \ @@ -90,7 +89,6 @@ struct T { \ #define RECORD2(T, A, a, B, b) \ struct T { \ static const Type kType = T##_Type; \ - T() {} \ template <typename Z, typename Y> \ T(Z a, Y b) : a(a), b(b) {} \ A a; B b; \ @@ -99,7 +97,6 @@ struct T { \ #define RECORD3(T, A, a, B, b, C, c) \ struct T { \ static const Type kType = T##_Type; \ - T() {} \ template <typename Z, typename Y, typename X> \ T(Z a, Y b, X c) : a(a), b(b), c(c) {} \ A a; B b; C c; \ @@ -108,7 +105,6 @@ struct T { \ #define RECORD4(T, A, a, B, b, C, c, D, d) \ struct T { \ static const Type kType = T##_Type; \ - T() {} \ template <typename Z, typename Y, typename X, typename W> \ T(Z a, Y b, X c, W d) : a(a), b(b), c(c), d(d) {} \ A a; B b; C c; D d; \ @@ -117,7 +113,6 @@ struct T { \ #define RECORD5(T, A, a, B, b, C, c, D, d, E, e) \ struct T { \ static const Type kType = T##_Type; \ - T() {} \ template <typename Z, typename Y, typename X, typename W, typename V> \ T(Z a, Y b, X c, W d, V e) : a(a), b(b), c(c), d(d), e(e) {} \ A a; B b; C c; D d; E e; \ @@ -130,7 +125,6 @@ struct T { \ template <typename T> class RefBox : SkNoncopyable { public: - RefBox() {} RefBox(T* obj) : fObj(SkSafeRef(obj)) {} ~RefBox() { SkSafeUnref(fObj); } @@ -144,7 +138,6 @@ private: template <typename T> class Optional : SkNoncopyable { public: - Optional() : fPtr(nullptr) {} Optional(T* ptr) : fPtr(ptr) {} ~Optional() { if (fPtr) fPtr->~T(); } @@ -174,7 +167,6 @@ private: template <typename T> class PODArray { public: - PODArray() {} PODArray(T* ptr) : fPtr(ptr) {} // Default copy and assign. @@ -189,7 +181,6 @@ private: // Using this, we guarantee the immutability of all bitmaps we record. class ImmutableBitmap : SkNoncopyable { public: - ImmutableBitmap() {} explicit ImmutableBitmap(const SkBitmap& bitmap) { if (bitmap.isImmutable()) { fBitmap = bitmap; @@ -212,7 +203,6 @@ private: // SkPath::cheapComputeDirection() is similar. // 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) { this->updateBoundsCache(); SkPath::Direction junk; @@ -223,7 +213,6 @@ struct PreCachedPath : public SkPath { // 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(); } @@ -238,7 +227,6 @@ RECORD3(SaveLayer, Optional<SkRect>, bounds, Optional<SkPaint>, paint, SkCanvas: RECORD1(SetMatrix, TypedMatrix, matrix); struct RegionOpAndAA { - RegionOpAndAA() {} RegionOpAndAA(SkRegion::Op op, bool aa) : op(op), aa(aa) {} SkRegion::Op op : 31; // This really only needs to be 3, but there's no win today to do so. unsigned aa : 1; // MSVC won't pack an enum with an bool, so we call this an unsigned. |