aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/RecordDrawTest.cpp
Commit message (Collapse)AuthorAge
* Don't use getDeviceClipBounds() to bound pic ops.Gravatar Mike Klein2018-05-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The values returned by SkCanvas::getDeviceClipBounds() are in the right space, but have extra constraints on them that are not desirable for bounding the logical bounds of draw operations: - they are integral - they are non-negative We've been intersecting the bounds of each operation with these bounds, which means we're mixing these bogus constraints into the bounds of each recorded operation. This percolates up to the SkPicutre cull rect too. The most egregious way to see the problem is to record a draw op entirely in negative space... it'll come back with empty logical bounds rather than its correct (negative-space) bounds. I've added a test for this, and another test I also think should be passing but left making it so as a follow up. I've had to disable a couple tests asserting clips affect the bounds. :/ A possible follow-up might go back to using the clips to tighten the bounds of the ops, just so long as we take the original user bounds and map them with the CTM through to device space ourselves, rather than relying on the recording canvas' clip stack. I think this means we'd need to maintain our own stack of device-space float SkRect clip bounds while calculating these op bounds. Bug: skia:7735 Change-Id: I6bf15f6b2a9ba4329a4eeae7f9d57aa8729ec1bb Reviewed-on: https://skia-review.googlesource.com/126002 Commit-Queue: Mike Klein <mtklein@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: Mike Klein <mtklein@chromium.org> Reviewed-by: Brian Osman <brianosman@google.com>
* remove canvas internal privateGravatar Cary Clark2018-03-06
| | | | | | | | | | | | | interfaces not called externally and aren't used internally R=robertphillips@google.com,reed@google.com Bug: skia:6455 Change-Id: Iee98ce4380a28a831d9bffe99932b54421dd339a Reviewed-on: https://skia-review.googlesource.com/112481 Commit-Queue: Cary Clark <caryclark@google.com> Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Convert NULL and 0 to nullptr.Gravatar Ben Wagner2017-08-28
| | | | | | | | | | | | | | This was created by looking at warnings produced by clang's -Wzero-as-null-pointer-constant. This updates most issues in Skia code. However, there are places where GL and Vulkan want pointer values which are explicitly 0, external headers which use NULL directly, and possibly more uses in un-compiled sources (for other platforms). Change-Id: Id22fbac04d5c53497a53d734f0896b4f06fe8345 Reviewed-on: https://skia-review.googlesource.com/39521 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Revert[8] "replace SkXfermode obj with SkBlendMode enum in paints"Gravatar reed2016-10-05
| | | | | | | | | | | This reverts commit c245574ba3d0e2ade6c94b2812de3baa383bf4c4. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2396953002 TBR= Review-Url: https://codereview.chromium.org/2396953002
* Revert[7] "replace SkXfermode obj with SkBlendMode enum in paints"Gravatar Mike Reed2016-10-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit Ib4a154cdd5f5d1dcac921ef50d53b79a2d6a1be8. Reason for revert: new assert from 100K bot Original change's description: > Revert[6] "replace SkXfermode obj with SkBlendMode enum in paints" > > - perform version check in CreateProc for XfermodeImageFilter and ArithmeticImageFilter > This reverts commit 3ed485f4249e17abb4b11f5018d03175fd1afb44. > > BUG=skia: > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2992 > > Change-Id: Ib4a154cdd5f5d1dcac921ef50d53b79a2d6a1be8 > Reviewed-on: https://skia-review.googlesource.com/2992 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Mike Reed <reed@google.com> > TBR=reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I848e5a69c5cd67f2c14889f4f0a346652578c4ff Reviewed-on: https://skia-review.googlesource.com/3023 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Revert[6] "replace SkXfermode obj with SkBlendMode enum in paints"Gravatar Mike Reed2016-10-05
| | | | | | | | | | | | | | - perform version check in CreateProc for XfermodeImageFilter and ArithmeticImageFilter This reverts commit 3ed485f4249e17abb4b11f5018d03175fd1afb44. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2992 Change-Id: Ib4a154cdd5f5d1dcac921ef50d53b79a2d6a1be8 Reviewed-on: https://skia-review.googlesource.com/2992 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert[5] "replace SkXfermode obj with SkBlendMode enum in paints"Gravatar Mike Reed2016-10-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit I0fa5c58af428f3da8565465d1219a34ef8417d9a. Reason for revert: failing to deserialize some of the 100K Original change's description: > Revert[4] "replace SkXfermode obj with SkBlendMode enum in paints" > > This reverts commit 2cbcd12281ee807214df094964c584c78932e10b. > > BUG=skia: > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2924 > > Change-Id: I0fa5c58af428f3da8565465d1219a34ef8417d9a > Reviewed-on: https://skia-review.googlesource.com/2924 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Mike Reed <reed@google.com> > TBR=reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I1805a57eef5ebcac203da5989c8539345ecf806f Reviewed-on: https://skia-review.googlesource.com/2962 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert[4] "replace SkXfermode obj with SkBlendMode enum in paints"Gravatar Mike Reed2016-10-04
| | | | | | | | | | | | | This reverts commit 2cbcd12281ee807214df094964c584c78932e10b. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2924 Change-Id: I0fa5c58af428f3da8565465d1219a34ef8417d9a Reviewed-on: https://skia-review.googlesource.com/2924 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "Revert "Revert "replace SkXfermode obj with SkBlendMode enum in ↵Gravatar Mike Reed2016-10-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | paints""" This reverts commit I86875511a13497112827cbaed1dbd7639e9e3d10. legacy (100K) skp failure Original change's description: > Revert "Revert "replace SkXfermode obj with SkBlendMode enum in paints"" > > This reverts commit ce02e7175872abde3721df9e5d3ec0ab8384cd8e. > > BUG=skia: > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2878 > > Change-Id: I86875511a13497112827cbaed1dbd7639e9e3d10 > Reviewed-on: https://skia-review.googlesource.com/2878 > Reviewed-by: Matt Sarett <msarett@google.com> > Commit-Queue: Mike Reed <reed@google.com> > TBR=msarett@google.com,reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Ife6f0cf3a22b3e8cf885a188f7f44e1ff62e06a5 Reviewed-on: https://skia-review.googlesource.com/2881 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "Revert "replace SkXfermode obj with SkBlendMode enum in paints""Gravatar Mike Reed2016-10-03
| | | | | | | | | | | | | This reverts commit ce02e7175872abde3721df9e5d3ec0ab8384cd8e. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2878 Change-Id: I86875511a13497112827cbaed1dbd7639e9e3d10 Reviewed-on: https://skia-review.googlesource.com/2878 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "replace SkXfermode obj with SkBlendMode enum in paints"Gravatar Mike Reed2016-10-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit I4fb489ba6b3f77b458f7e4a99f79c7ad10859135. Reason for revert: <INSERT REASONING HERE> Original change's description: > replace SkXfermode obj with SkBlendMode enum in paints > > BUG=skia:5814 > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2714 > > Change-Id: I4fb489ba6b3f77b458f7e4a99f79c7ad10859135 > Reviewed-on: https://skia-review.googlesource.com/2714 > Reviewed-by: Florin Malita <fmalita@chromium.org> > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Mike Reed <reed@google.com> > TBR=bsalomon@google.com,fmalita@chromium.org,fmalita@google.com,reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I3e43f79ef5c1709929663fe63cc1f67cd78270b7 Reviewed-on: https://skia-review.googlesource.com/2871 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* replace SkXfermode obj with SkBlendMode enum in paintsGravatar Mike Reed2016-10-03
| | | | | | | | | | | | BUG=skia:5814 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2714 Change-Id: I4fb489ba6b3f77b458f7e4a99f79c7ad10859135 Reviewed-on: https://skia-review.googlesource.com/2714 Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Update DropShadowImageFilter to sk_spGravatar robertphillips2016-04-06
| | | | | | | | TBR=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1861843002 Review URL: https://codereview.chromium.org/1861843002
* switch surface to sk_spGravatar reed2016-03-23
| | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1817383002 CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot Review URL: https://codereview.chromium.org/1817383002
* update callsites for Make image factoriesGravatar reed2016-03-17
| | | | | | | | | | | not forced yet, as we still have the build-guard. waiting on chrome CL BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1810813003 TBR= Review URL: https://codereview.chromium.org/1810813003
* Record concat as Concat.Gravatar mtklein2015-11-19
| | | | | | | | | | | | This seems to cause very slight diffs on GMs. https://gold.skia.org/search2?issue=1462983002&unt=true&query=source_type%3Dgm&master=false I'm not sure I understand why. The diffs to at least pictureshader look like improvements. BUG=skia:4584 Review URL: https://codereview.chromium.org/1462983002
* Comments Style: s/skbug.com/bug.skia.org/Gravatar halcanary2015-11-07
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1432503003 Review URL: https://codereview.chromium.org/1432503003
* SkRecord refactor: fill bounds array instead of BBH directlyGravatar mtklein2015-10-24
| | | | | | | | | This should be a strict refactor, just pulling out the bounds array. (It's the rescued nice parts of a dead-end CL targeting skia:4492.) BUG=skia: Review URL: https://codereview.chromium.org/1424553002
* Style Change: NULL->nullptrGravatar halcanary2015-08-27
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316233002 Review URL: https://codereview.chromium.org/1316233002
* unsigned -> int for counts and indices in picture-related codeGravatar mtklein2015-08-19
| | | | | | | | also, (C) BUG=skia: Review URL: https://codereview.chromium.org/1300163002
* flag to use const& instead of const* for src-rectGravatar reed2015-08-06
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1272713005
* remove all guards for changes to drawBitmapRect / drawImageRectGravatar reed2015-07-28
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1239193002
* add src-rect-constraint to drawImageRectGravatar reed2015-07-14
| | | | | | | | | | | Follow-on work - unify around SrcRectConstraint (i.e. drawBitmapRect) - remove silly drawBitmapRectToRect alias - clean-up (possibly remove) alias problems around drawBitmapRect + IRect parameter BUG=skia: Review URL: https://codereview.chromium.org/1228083004
* C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla}Gravatar mtklein2015-03-25
| | | | | | | | | NOPRESUBMIT=true BUG=skia: DOCS_PREVIEW= https://skia.org/?cl=1037793002 Review URL: https://codereview.chromium.org/1037793002
* Update SkPicture cull rects with RTree informationGravatar schenney2015-03-06
| | | | | | | | | | | | | | | | | | When computed, the RTree for an SkPicture will have a root bounds that reflects the best bounding information available, rather than the best estimate at the time the picture recorder is created. Given that creators frequently don't know ahead of time what will be drawn, the RTree bound is often tighter. Perf testing on Chrome indicates a small raster performance advantage. For upcoming painting changes in Chrome the performance advantage is much larger. BUG= Committed: https://skia.googlesource.com/skia/+/2dd3b6647dc726f36fd8774b3d0d2e83b493aeac Review URL: https://codereview.chromium.org/971803002
* Revert of Update SkPicture cull rects with RTree information (patchset #6 ↵Gravatar joshualitt2015-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | id:140001 of https://codereview.chromium.org/971803002/) Reason for revert: Might be breaking deps roll Original issue's description: > Update SkPicture cull rects with RTree information > > When computed, the RTree for an SkPicture will have a root > bounds that reflects the best bounding information available, > rather than the best estimate at the time the picture recorder > is created. Given that creators frequently don't know ahead of > time what will be drawn, the RTree bound is often tighter. > > Perf testing on Chrome indicates a small raster performance > advantage. For upcoming painting changes in Chrome the > performance advantage is much larger. > > BUG= > > Committed: https://skia.googlesource.com/skia/+/2dd3b6647dc726f36fd8774b3d0d2e83b493aeac TBR=mtklein@google.com,schenney@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG= Review URL: https://codereview.chromium.org/977413003
* Update SkPicture cull rects with RTree informationGravatar schenney2015-03-05
| | | | | | | | | | | | | | | | When computed, the RTree for an SkPicture will have a root bounds that reflects the best bounding information available, rather than the best estimate at the time the picture recorder is created. Given that creators frequently don't know ahead of time what will be drawn, the RTree bound is often tighter. Perf testing on Chrome indicates a small raster performance advantage. For upcoming painting changes in Chrome the performance advantage is much larger. BUG= Review URL: https://codereview.chromium.org/971803002
* Simplify SkBBH::insert APIGravatar mtklein2015-02-10
| | | | | | | | No one's exploiting the ability to take ownership of the array anymore. BUG=skia: Review URL: https://codereview.chromium.org/913833002
* Fix up all the easy virtual ... SK_OVERRIDE cases.Gravatar mtklein2015-01-09
| | | | | | | | | | | | This fixes every case where virtual and SK_OVERRIDE were on the same line, which should be the bulk of cases. We'll have to manually clean up the rest over time unless I level up in regexes. for f in (find . -type f); perl -p -i -e 's/virtual (.*)SK_OVERRIDE/\1SK_OVERRIDE/g' $f; end BUG=skia: Review URL: https://codereview.chromium.org/806653007
* Rename SkDrawPictureCallback to SkPicture::AbortCallbackGravatar robertphillips2015-01-07
| | | | | | Committed: https://skia.googlesource.com/skia/+/7ef197255deb4e2fa64c03c7130d56ddf164e83c Review URL: https://codereview.chromium.org/829983003
* Revert of Rename SkDrawPictureCallback to SkPicture::AbortCallback (patchset ↵Gravatar reed2015-01-06
| | | | | | | | | | | | | | | | | | #2 id:20001 of https://codereview.chromium.org/829983003/) Reason for revert: speculative revert to unblock DEPS roll Original issue's description: > Rename SkDrawPictureCallback to SkPicture::AbortCallback > > Committed: https://skia.googlesource.com/skia/+/7ef197255deb4e2fa64c03c7130d56ddf164e83c TBR=reed@google.com,robertphillips@google.com NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/824013004
* Rename SkDrawPictureCallback to SkPicture::AbortCallbackGravatar robertphillips2015-01-06
| | | | Review URL: https://codereview.chromium.org/829983003
* Revert of Revert of move remaining virtual draw methods to onDraw (patchset ↵Gravatar reed2015-01-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | #1 id:1 of https://codereview.chromium.org/835913002/) Reason for revert: test to see if it wasn't this CL that broke chromeos Original issue's description: > Revert of move remaining virtual draw methods to onDraw (patchset #5 id:80001 of https://codereview.chromium.org/817723005/) > > Reason for revert: > did this cause chromeos heap corruption on skp? > > Original issue's description: > > move remaining virtual draw methods to onDraw > > > > BUG=skia: > > > > Committed: https://skia.googlesource.com/skia/+/2e0f7d53bba5438c9bf11ee5ccae2c301e348419 > > TBR=robertphillips@google.com,djsollen@google.com,bsalomon@google.com,mtklein@google.com > NOTREECHECKS=true > NOTRY=true > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/e87e383351e1547b21d96d02bcd0c3cbbe0837f1 TBR=robertphillips@google.com,djsollen@google.com,bsalomon@google.com,mtklein@google.com,reed@chromium.org NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/831253002
* Revert of move remaining virtual draw methods to onDraw (patchset #5 ↵Gravatar reed2015-01-05
| | | | | | | | | | | | | | | | | | | | | id:80001 of https://codereview.chromium.org/817723005/) Reason for revert: did this cause chromeos heap corruption on skp? Original issue's description: > move remaining virtual draw methods to onDraw > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/2e0f7d53bba5438c9bf11ee5ccae2c301e348419 TBR=robertphillips@google.com,djsollen@google.com,bsalomon@google.com,mtklein@google.com NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/835913002
* move remaining virtual draw methods to onDrawGravatar reed2015-01-04
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/817723005
* add testing flag to ignore saveLayer boundsGravatar reed2014-12-22
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/819123003
* Revert of Use SkPaint::getFontBounds() for text bounding boxes in pictures. ↵Gravatar mtklein2014-12-16
| | | | | | | | | | | | | | | | | | | | | | | | | | (patchset #1 id:1 of https://codereview.chromium.org/805983003/) Reason for revert: Test-Win7-ShuttleA-HD2000-x86-Debug-GDI Original issue's description: > Use SkPaint::getFontBounds() for text bounding boxes in pictures. > > Now that SkTextBlobs have landed, this is a perf no-op, but it at least lets us eliminate a bunch of questionable hacks. > > CQ_EXTRA_TRYBOTS=client.skia:Test-Win7-ShuttleA-HD2000-x86-Debug-Trybot,Test-Mac10.8-MacMini4.1-GeForce320M-x86_64-Debug-Trybot > > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/02d2b9831579173e783569530ab7bae08de907e9 TBR=reed@google.com,mtklein@chromium.org NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/789793004
* Use SkPaint::getFontBounds() for text bounding boxes in pictures.Gravatar mtklein2014-12-16
| | | | | | | | | | Now that SkTextBlobs have landed, this is a perf no-op, but it at least lets us eliminate a bunch of questionable hacks. CQ_EXTRA_TRYBOTS=client.skia:Test-Win7-ShuttleA-HD2000-x86-Debug-Trybot,Test-Mac10.8-MacMini4.1-GeForce320M-x86_64-Debug-Trybot BUG=skia: Review URL: https://codereview.chromium.org/805983003
* Defer saves() until they're neededGravatar reed2014-12-11
| | | | | | | | patch from issue 759443006 at patchset 40001 (http://crrev.com/759443006#ps40001) BUG=skia: Review URL: https://codereview.chromium.org/767333002
* Remove canvas::NewRaster, and rename surface::NewRasterPMColor to N32PremulGravatar reed2014-12-10
| | | | | | | | | | patch from issue 781403002 at patchset 20001 (http://crrev.com/781403002#ps20001) BUG=skia: TBR= re-landing after chrome fixes have landed Review URL: https://codereview.chromium.org/784223007
* Revert of remove (dumb) canvas::NewRaster, and rename ↵Gravatar reed2014-12-09
| | | | | | | | | | | | | | | | | | | | | | | surface::NewRasterPMColor to N32Premul (patchset #3 id:40001 of https://codereview.chromium.org/790733003/) Reason for revert: need to update chrome first Original issue's description: > remove (dumb) canvas::NewRaster, and rename surface::NewRasterPMColor to N32Premul > > patch from issue 781403002 at patchset 20001 (http://crrev.com/781403002#ps20001) > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/2c1605a1fbaa2e35a27399a34254fb1200ec2ae6 TBR=fmalita@google.com,fmalita@chromium.org NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/791763002
* remove (dumb) canvas::NewRaster, and rename surface::NewRasterPMColor to ↵Gravatar reed2014-12-09
| | | | | | | | | | N32Premul patch from issue 781403002 at patchset 20001 (http://crrev.com/781403002#ps20001) BUG=skia: Review URL: https://codereview.chromium.org/790733003
* Change clear() to respect the clipGravatar reed2014-12-04
| | | | | | | | | This reverts commit af641a1c10f176cb9617026d3cc93c117a85d13d. BUG=skia: TBR= Review URL: https://codereview.chromium.org/783493002
* Revert "Change clear() to respect the clip"Gravatar reed2014-12-02
| | | | | | | | | This reverts commit 3729469d6a12266037b697c2192768545e097ab0. BUG=skia: TBR= Review URL: https://codereview.chromium.org/778563002
* Change clear() to respect the clipGravatar reed2014-12-02
| | | | | | | | patch from issue 769703002 at patchset 1 (http://crrev.com/769703002#ps1) BUG=skia: Review URL: https://codereview.chromium.org/772533004
* option to return drawable from recordingGravatar reed2014-11-24
| | | | | | | | patch from issue 747033005 at patchset 80001 (http://crrev.com/747033005#ps80001) BUG=skia: Review URL: https://codereview.chromium.org/732653004
* Implement SkPicture::bytesUsed() for SkRecord backendGravatar tomhudson2014-11-19
| | | | | | | BUG=chromium:230419 R=mtklein@google.com,reed@google.com Review URL: https://codereview.chromium.org/490253003
* wip for drawablesGravatar reed2014-11-18
| | | | | | | | | | | | Idea: 1. in its mutable recording state, keep a table of drawables on the side, and store an index in the record list. 2. In "immediate-mode" draw, just call the clients drawable directly (need access to our private list to turn the stored index into a proc) 3. when we "snap", we replace the list of drawables with a list of (sub) pictures, and then during playback of the snapped picture, we invoke a private drawable which just calls "drawPicture" on the index'd subpicture. Review URL: https://codereview.chromium.org/727363003
* Clang incorrectly thinks this typedef is unused.Gravatar mtklein2014-11-11
| | | | | | BUG=skia:3059 Review URL: https://codereview.chromium.org/715093003
* Shrink saveLayer device bounds when it supplies an explicit bounds and has a ↵Gravatar robertphillips2014-11-03
| | | | | | | | | | | | | | | | | | | | | | complex paint This CL shrinks the bound computed for saveLayers that possess both an explicit bound and a complex paint (e.g., one that affects transparent black). In this case the bound of the layer should be the clipped explicit bound rather then the clip prior/after the saveLayer/restore block. In the following the first bound is the currently computed bound while the second is the new/desired one: For a 100x100 picture saveLayer (no bound, no paint) [ 0 0 100 100 ] [ 50 50 100 100 ] setMatrix (translate 50, 50) [ 0 0 100 100 ] [ 50 50 100 100 ] saveLayer (bound of 0, 0, 50, 50 - complex paint) [ 0 0 100 100 ] [ 50 50 100 100 ] restore [ 0 0 100 100 ] [ 50 50 100 100 ] restore [ 0 0 100 100 ] [ 50 50 100 100 ] Review URL: https://codereview.chromium.org/696763002