Refactor SkRecord opts, converting playback optimizations where possible.
authorcommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Tue, 22 Apr 2014 16:57:20 +0000 (16:57 +0000)
committercommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Tue, 22 Apr 2014 16:57:20 +0000 (16:57 +0000)
commit88c3e279ab79125e5741b0b0b3175291e2e2bbee
tree6e61077d8ad91811fdba5e43605c165412fce75e
parente221a7f5c7874c62eceef4a2409952abd0f43ed6
Refactor SkRecord opts, converting playback optimizations where possible.

This adds back two optimizations from SkPicture: drawPosText strength reduction to drawPosTextH, and pointless save-foo-restore blocks are noop'd away.

The small-T optimization in SkRecord gets in the way of implementing replace(), so I removed it.

Just to keep the API focused, I removed the methods on SkRecord that iterate over i for you; it's just as efficient to do it yourself, and all of the interesting code does its own custom iteration.

BUG=skia:2378
R=fmalita@chromium.org, mtklein@google.com

Author: mtklein@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14300 2bbb7eff-a529-9590-31e7-b0007b416f81
src/record/SkRecord.h
src/record/SkRecordDraw.cpp
src/record/SkRecordOpts.cpp
src/record/SkRecordOpts.h
src/record/SkRecorder.cpp
src/record/SkRecords.h
tests/RecordCullingTest.cpp
tests/RecordTest.cpp
tests/RecorderTest.cpp