reed
5a3c528f56
test picture-ops for savelayer
...
BUG=skia:5716
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2309623002
Review-Url: https://codereview.chromium.org/2309623002
2016-09-06 06:54:41 -07:00
robertphillips
6e7025ab13
Update SkBlurImageFilter to sk_sp
...
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1852743002
Review URL: https://codereview.chromium.org/1852743002
2016-04-04 04:31:25 -07:00
robertphillips
5ff17b1352
Swap SkPictureImageFilter's factories over to smart pointers
...
A trial balloon before converting the rest
This requires https://codereview.chromium.org/1836443003/ (add SK_SUPPORT_LEGACY_IMAGEFILTER_PTR flag for future skia CL) to land in Chromium first
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1831323003
Review URL: https://codereview.chromium.org/1831323003
2016-03-28 13:13:42 -07:00
reed
d053ce9c54
Reland of [2] of "switch colorfilters to sk_sp (patchset #11 id:200001 of https://codereview.chromium.o … (patchset #1 id:1 of https://codereview.chromium.org/1821103004/ )
...
Reason for revert:
guard has now landed in chrome
Original issue's description:
> Revert of Revert[2] of "switch colorfilters to sk_sp (patchset #11 id:200001 of https://codereview.chromium.o … (patchset #3 id:40001 of https://codereview.chromium.org/1825073002/ )
>
> Reason for revert:
> CreateModeFilter not compiling
>
> Original issue's description:
> > Revert[2] of "switch colorfilters to sk_sp (patchset #11 id:200001 of https://codereview.chromium.org/1822623002/ )"
> >
> > Fixed legacy withColorFilter to call new(er) make method
> >
> > This reverts commit 1eb81db650
.
> >
> > BUG=skia:
> > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1825073002
> >
> > TBR=
> >
> > Committed: https://skia.googlesource.com/skia/+/4c9776b046dd5e9e46e2d1ce35154855c8fcb381
>
> TBR=
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/d6889293dd0942f27f9593f679722c956831f2c4
TBR=
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=skia:
Review URL: https://codereview.chromium.org/1827433002
2016-03-22 10:17:23 -07:00
reed
d6889293dd
Revert of Revert[2] of "switch colorfilters to sk_sp (patchset #11 id:200001 of https://codereview.chromium.o … (patchset #3 id:40001 of https://codereview.chromium.org/1825073002/ )
...
Reason for revert:
CreateModeFilter not compiling
Original issue's description:
> Revert[2] of "switch colorfilters to sk_sp (patchset #11 id:200001 of https://codereview.chromium.org/1822623002/ )"
>
> Fixed legacy withColorFilter to call new(er) make method
>
> This reverts commit 1eb81db650
.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1825073002
>
> TBR=
>
> Committed: https://skia.googlesource.com/skia/+/4c9776b046dd5e9e46e2d1ce35154855c8fcb381
TBR=
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1821103004
2016-03-22 08:59:19 -07:00
reed
4c9776b046
Revert[2] of "switch colorfilters to sk_sp (patchset #11 id:200001 of https://codereview.chromium.org/1822623002/ )"
...
Fixed legacy withColorFilter to call new(er) make method
This reverts commit 1eb81db650
.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1825073002
TBR=
Review URL: https://codereview.chromium.org/1825073002
2016-03-22 08:10:17 -07:00
reed
1eb81db650
Revert of switch colorfilters to sk_sp (patchset #11 id:200001 of https://codereview.chromium.org/1822623002/ )
...
Reason for revert:
need to fix unguarded makeWithFilter
Original issue's description:
> switch colorfilters to sk_sp
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1822623002
>
> Committed: https://skia.googlesource.com/skia/+/f809d7687a4fb7b88b651b046da2bc0035d6aa09
TBR=fmalita@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1820303002
2016-03-22 07:35:17 -07:00
reed
f809d7687a
switch colorfilters to sk_sp
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1822623002
Review URL: https://codereview.chromium.org/1822623002
2016-03-22 07:23:24 -07:00
reed
ca2622ba05
return pictures as sk_sp
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1811703002
Review URL: https://codereview.chromium.org/1811703002
2016-03-18 07:25:55 -07:00
reed
bfd5f171e6
Revert[2] of "add backdrop option to SaveLayerRec"
...
Reverted because of picture/serialization failure
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1567063002
TBR=mtklein
Review URL: https://codereview.chromium.org/1567063002
2016-01-07 11:28:08 -08:00
halcanary
96fcdcc219
Style Change: NULL->nullptr
...
DOCS_PREVIEW= https://skia.org/?cl=1316233002
Review URL: https://codereview.chromium.org/1316233002
2015-08-27 07:41:16 -07:00
mtklein
c6ad06acef
unsigned -> int for counts and indices in picture-related code
...
also, (C)
BUG=skia:
Review URL: https://codereview.chromium.org/1300163002
2015-08-19 09:51:01 -07:00
kkinnunen
dc0f408a96
Fold alpha to the inner savelayer in savelayer-savelayer-restore patterns
...
Fold alpha to the inner savelayer in savelayer-savelayer-restore
patterns such as this:
SaveLayer (non-opaque)
Save
ClipRect
SaveLayer
Restore
Restore
Restore
Current blink generates these for example for SVG content such as this:
<path style="opacity:0.5 filter:url(#blur_filter)"/>
The outer save layer is due to the opacity and the inner one is due to
blur filter being implemented with picture image filter.
Reduces layers in desk_carsvg.skp testcase from 115 to 78.
BUG=skia:3119
Review URL: https://codereview.chromium.org/835973005
2015-01-26 00:14:26 -08:00
kkinnunen
678c1b019a
Fold alpha to the draw in savelayer-draw-restore patterns with non-opaque draw
...
Fold alpha of a save layer call to the subsequent draw call paint, even when
the draw call paint color is already non-opaque.
Comparing the difference of the unoptimized and the optimized call pattern
with all (layer alpha, draw alpha) combinations, this produces
off-by-one pixels ~50% of the time.
Reduces layers of current desk_carsvg.skp (recorded with cross-process
picture image filters allowed) from 122 to 115.
BUG=skia:3119
Review URL: https://codereview.chromium.org/840483005
2015-01-16 05:04:36 -08:00
mtklein
0c278972d0
Why are we afraid of saveLayer() bounds?
...
They're only hints. We can ignore them in this optimization.
My only hesitation is that this pattern doesn't seem to happen in our .skps.
BUG=skia:
Review URL: https://codereview.chromium.org/849243002
2015-01-15 08:08:10 -08:00
reed
d990e2f14f
add testing flag to ignore saveLayer bounds
...
BUG=skia:
Review URL: https://codereview.chromium.org/819123003
2014-12-22 11:58:30 -08:00
reed
2ff1fcede1
Defer saves() until they're needed
...
patch from issue 759443006 at patchset 40001 (http://crrev.com/759443006#ps40001 )
BUG=skia:
Review URL: https://codereview.chromium.org/767333002
2014-12-11 07:07:38 -08:00
mtklein
1e78fc4ed2
Turn disable or delete optimizations that don't have any effect.
...
Recording gets a ~5% speedup.
BUG=skia:
R=robertphillips@google.com , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/577673003
2014-09-16 11:11:20 -07:00
mtklein
99d6a9ee8b
Fix a bug in Save-Restore no-op optimization.
...
We optimize
Save
SaveLayer
Restore
Restore
into
NoOp
NoOp
NoOp
Restore
I'm considering skipping the call to SkRecordOptimize again just to eliminate
this extra variable from landing SkRecord. Thoughts?
BUG=skia:
R=robertphillips@google.com , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/560163002
2014-09-10 16:08:28 -07:00
mtklein
f4078ad1ec
SkRecord: Strip out cull-skipping and y-only drawPosTextH skipping.
...
These optimizations are outclassed by a general bounding-box hierarchy,
and are just going to make plugging that into SkRecordDraw more complicated.
BUG=skia:
R=robertphillips@google.com , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/452983002
2014-08-08 10:05:20 -07:00
commit-bot@chromium.org
a095041f51
Remove SkRecorder's kWriteOnly mode.
...
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
2014-05-29 16:52:40 +00:00
commit-bot@chromium.org
0a98d87044
Don't clobber initial transform with SetMatrix.
...
BUG=skia:2378
R=reed@google.com , mtklein@google.com , robertphillips@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/290883004
git-svn-id: http://skia.googlecode.com/svn/trunk@14778 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-19 15:15:24 +00:00
commit-bot@chromium.org
1e44730ade
Noop away PushCull/PopCull pairs with nothing between them.
...
BUG=skia:2378
R=fmalita@chromium.org , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/277613002
git-svn-id: http://skia.googlecode.com/svn/trunk@14653 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-08 18:17:51 +00:00
commit-bot@chromium.org
c71da1f6ed
Convert all SkRecordPattern matchers into SkRecord mutators.
...
- 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
2014-05-07 21:16:09 +00:00
commit-bot@chromium.org
467705adf0
save-draw*-restore -> noop-draw*-noop
...
save-drawA-drawB-drawC-restore always means drawA-drawB-drawC,
no matter what flags we use for save().
This one triggers all over the silk SKPs and in several of the bot SKPs, typically as save-drawBitmap-restore.
BUG=skia:2378
R=robertphillips@google.com , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/267793006
git-svn-id: http://skia.googlecode.com/svn/trunk@14618 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-07 17:17:48 +00:00
commit-bot@chromium.org
f5bf3cf025
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
2014-05-07 14:47:44 +00:00
commit-bot@chromium.org
7066bf3fbf
Update tests/RecordOptsTest.cpp
...
- use REPORTER_ASSERT;
- assert the type first, then the pointer != NULL. This helps explain why ptr == NULL;
- add a simpler NoopSaveRestore test case, which can help debugging failures of the larger test case.
BUG=skia:2378
R=fmalita@chromium.org , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/264043012
git-svn-id: http://skia.googlecode.com/svn/trunk@14570 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-05 17:09:05 +00:00
commit-bot@chromium.org
8dac8b18ee
Backfill unit tests for SkRecord
...
BUG=skia:2378
R=fmalita@chromium.org , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/251133008
git-svn-id: http://skia.googlecode.com/svn/trunk@14455 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-30 13:18:12 +00:00