aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/RecorderTest.cpp
Commit message (Collapse)AuthorAge
* Override SkCanvas::drawImage() in SkRecorder.Gravatar piotaixr2014-10-16
| | | | | | BUG=skia:2947 Review URL: https://codereview.chromium.org/610003002
* Implement all SkCanvas overrides that SkPictureRecord does.Gravatar mtklein2014-09-04
| | | | | | | | | | | | Primarily this is for isDrawingToLayer(). drawData() and onNewSurface() are for completeness. BUG=409138 R=robertphillips@google.com, mtklein@google.com, reed@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/545613002
* Support comment groups in SkRecord.Gravatar mtklein2014-08-22
| | | | | | | | | | | This should fix the failing paint-command-log-nodes.html layout test. BUG=406425 R=tomhudson@chromium.org Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/501533003
* change drawPicture in SkRecord to just ref the pictureGravatar reed2014-08-07
| | | | | | | | | | | also fix some int/unsigned/size_t warnings BUG=skia: R=mtklein@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/449933002
* move SkChecksum and SkEmptyShader to privateGravatar reed2014-07-03
| | | | | | | | TBR=reed@google.com Author: reed@chromium.org Review URL: https://codereview.chromium.org/366133002
* Remove SkRecorder's kWriteOnly mode.Gravatar commit-bot@chromium.org2014-05-29
| | | | | | | | | | | | | | | | | | | I'm soon going to have SkRecorder start calling getTotalMatrix(), which would be broken in write-only mode. That change is big and nebulous, but it's clear kWriteOnly needs to go, so we might as well kill it now. My notes in bench_playback about kWriteOnly mode being important were probably overly cautious. I now think this is a fair enough comparison even re-recording into a read-write canvas. BUG=skia:2378 R=fmalita@chromium.org, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/290653004 git-svn-id: http://skia.googlecode.com/svn/trunk@14963 2bbb7eff-a529-9590-31e7-b0007b416f81
* Convert all SkRecordPattern matchers into SkRecord mutators.Gravatar commit-bot@chromium.org2014-05-07
| | | | | | | | | | | | | | | | | | | - Allow any return type from SkRecord mutators and visitors; - update existing calls to mutate and visit; - convert match to operator() in SkRecordPattern; - tidy up a few inelegant bits of old code in tests. The net result is that the generated code is much clearer. All the mutate() calls inline as you'd hope, and you can now actually follow along with the disassembly. BUG=skia:2378 R=fmalita@chromium.org, bungeman@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/273643007 git-svn-id: http://skia.googlecode.com/svn/trunk@14631 2bbb7eff-a529-9590-31e7-b0007b416f81
* Refactor SkRecord opts, converting playback optimizations where possible.Gravatar commit-bot@chromium.org2014-04-22
| | | | | | | | | | | | | | | | | 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
* initialize bounds in this testGravatar commit-bot@chromium.org2014-04-15
| | | | | | | | | | | BUG=skia: R=bungeman@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/238353007 git-svn-id: http://skia.googlecode.com/svn/trunk@14204 2bbb7eff-a529-9590-31e7-b0007b416f81
* SkRecord bug fixesGravatar commit-bot@chromium.org2014-04-15
| | | | | | | | | | | | | | | | | | | Optional arguments to SkCanvas calls leaked refs (but not memory) because we didn't destruct the optional objects (really, just SkPaint: other optional args are all POD). This adds Optional and PODArray, where Optional makes sure to call the destructor. I overlooked that SkPictureRecord really does call paint.computeFastBounds(). Do the same in SkRecordDraw. BUG=skia:2378 R=reed@google.com, mtklein@google.com, tomhudson@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/235983015 git-svn-id: http://skia.googlecode.com/svn/trunk@14197 2bbb7eff-a529-9590-31e7-b0007b416f81
* Mark our territory with (C).Gravatar commit-bot@chromium.org2014-04-11
| | | | | | | | | | | BUG=skia: R=reed@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/235253002 git-svn-id: http://skia.googlecode.com/svn/trunk@14158 2bbb7eff-a529-9590-31e7-b0007b416f81
* SkRecordDraw: skip draw ops when the clip is emptyGravatar commit-bot@chromium.org2014-04-09
| | | | | | | | | | | | | | - Adds tests for SkRecordDraw's two main features: cull- and clip- based skipping. - Adds full SkCanvas semantic mode to SkRecorder, so it can be used as a target for SkRecordDraw. BUG=skia:2378 R=fmalita@chromium.org, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/231653002 git-svn-id: http://skia.googlecode.com/svn/trunk@14124 2bbb7eff-a529-9590-31e7-b0007b416f81
* SkRecord: make culling work if SkRecordAnnotateCullingPairs is called.Gravatar commit-bot@chromium.org2014-04-08
| | | | | | | | | | | | | | | | - Allow stateful functors; allow visit()/mutate() at a given index; add count(). - Annotate cull push/pop pairs on the PushCull records. (tested) - Use those annotations to skip ahead in SkRecordDraw. (not yet tested beyond dm --skr) - Make SkRecordDraw a function, move its implementation to a .cpp. BUG=skia:2378 R=fmalita@chromium.org, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/229523002 git-svn-id: http://skia.googlecode.com/svn/trunk@14101 2bbb7eff-a529-9590-31e7-b0007b416f81
* More SkRecord TODOs:Gravatar commit-bot@chromium.org2014-04-08
| | | | | | | | | | | | | | | | | | | - add basic test for SkRecorder - rejigger GYPs so that the include dir comes along with the dependency BUG=skia:2378 Committed: http://code.google.com/p/skia/source/detail?r=14099 NOTRY=true NOTREECHECKS=true R=fmalita@chromium.org, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/227673011 git-svn-id: http://skia.googlecode.com/svn/trunk@14100 2bbb7eff-a529-9590-31e7-b0007b416f81
* More SkRecord TODOs:Gravatar commit-bot@chromium.org2014-04-08
- add basic test for SkRecorder - rejigger GYPs so that the include dir comes along with the dependency BUG=skia:2378 R=fmalita@chromium.org, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/227673011 git-svn-id: http://skia.googlecode.com/svn/trunk@14099 2bbb7eff-a529-9590-31e7-b0007b416f81