Add SaveLayer-Draw-Restore optimization.
authorcommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 7 May 2014 14:47:44 +0000 (14:47 +0000)
committercommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 7 May 2014 14:47:44 +0000 (14:47 +0000)
commitf5bf3cf0257dc3d18932bde51f8eae33442e071f
tree8d7ae45129cc5eed271e88f94fbf6476dc0d526b
parent059ee7c1b0e0b86cb91490a099920fba98f77a49
Add SaveLayer-Draw-Restore optimization.

This is like SkPictureRecord's remove_save_layer1 but works with all draw calls.

Interesting patterns removed:
  SaveLayer-DrawRect-Restore: Silk SKPs, desk_weather
  SaveLayer-DrawPath-Restore: desk_carsvg, desk_wowwiki, tabl_androidpolice
  SaveLayer-DrawPosTextH-Restore: tabl_android_police
There may be others, but I stopped looking.

BUG=skia:2378
R=robertphillips@google.com, mtklein@google.com

Author: mtklein@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14610 2bbb7eff-a529-9590-31e7-b0007b416f81
src/record/SkRecordOpts.cpp
src/record/SkRecordOpts.h
tests/RecordOptsTest.cpp