aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkRecords.h
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@google.com>2015-05-18 14:53:43 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-05-18 14:53:43 -0700
commit72743b165424efc4ef6f6614add9033ea1ef31db (patch)
tree26ebea2ec4df12ec4d94cb3089b4f3d82a032322 /src/core/SkRecords.h
parent4f2dba625dd858ea3591974d793ef18c10c2ca67 (diff)
Revert of Sketch splitting SkPicture into an interface and SkBigPicture. (patchset #25 id:480001 of https://codereview.chromium.org/1112523006/)
Reason for revert: win_chromium_compile_dbg_ng FAILED: ninja -t msvc -e environment.x86 -- E:\b\build\goma/gomacc "E:\b\depot_tools\win_toolchain\vs2013_files\VC\bin\amd64_x86\cl.exe" /nologo /showIncludes /FC @obj\third_party\skia\src\core\skia.SkBitmapHeap.obj.rsp /c ..\..\third_party\skia\src\core\SkBitmapHeap.cpp /Foobj\third_party\skia\src\core\skia.SkBitmapHeap.obj /Fdobj\skia\skia.cc.pdb e:\b\build\slave\win\build\src\third_party\skia\include\core\skpicture.h(176) : error C2487: 'CURRENT_PICTURE_VERSION' : member of dll interface class may not be declared with dll interface 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 > > Latest blink_linux_rel: > > http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/61248 > > Committed: https://skia.googlesource.com/skia/+/15877b6eae33a9282458bdb904a6d00440eca0ec TBR=reed@google.com,robertphillips@google.com,fmalita@chromium.org,mtklein@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1130283004
Diffstat (limited to 'src/core/SkRecords.h')
-rw-r--r--src/core/SkRecords.h12
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.