No deduping dictionaries for matrices and regions.
authorcommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Thu, 23 Jan 2014 15:16:05 +0000 (15:16 +0000)
committercommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Thu, 23 Jan 2014 15:16:05 +0000 (15:16 +0000)
commitfed2ab648341ec153ad2af746a31d368963171e4
tree39aef8af2c7a81b722cb1995218bfb42fb23dca2
parent09647969cf5d66b9eb2790360d7026d8380620bf
No deduping dictionaries for matrices and regions.

There's little benefit to deduping matrices and regions: they're infrequently
used, and doubly infrequently reused.  Their use-weighted byte cost is tiny.

There is some downside to deduping matrices and regions.  Even when they're not
used, we prepare dictionaries for deduping them for every picture.  Each of
these dictionaries costs 160 bytes, so two unused dictionaries make a big chunk
of the ~1100 bytes it takes to allocate an SkPictureRecord. (~330 come from
parent class SkCanvas, 768 from SkPictureRecord itself, here reduced to 448).

One side benefit of not deduping these guys is that the change weighs -140 lines of code.

It may go without saying, but this breaks the picture format.

Testing: out/Debug/tests && out/Debug/dm  (which runs all picture modes by default)

BUG=skia:1850
R=reed@google.com, bensong@google.com, robertphillips@google.com

Author: mtklein@google.com

Review URL: https://codereview.chromium.org/143883006

git-svn-id: http://skia.googlecode.com/svn/trunk@13149 2bbb7eff-a529-9590-31e7-b0007b416f81
14 files changed:
include/core/SkPath.h
include/core/SkPathRef.h
include/core/SkPicture.h
src/core/SkPath.cpp
src/core/SkPathRef.cpp
src/core/SkPicture.cpp
src/core/SkPictureFlat.h
src/core/SkPicturePlayback.cpp
src/core/SkPicturePlayback.h
src/core/SkPictureRecord.cpp
src/core/SkPictureRecord.h
src/effects/SkBlurMaskFilter.cpp
src/effects/SkEmbossMaskFilter.cpp
tests/CanvasTest.cpp