aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/PictureBBHTest.cpp
Commit message (Collapse)AuthorAge
* track bounds of top-level control opsGravatar Mike Klein2018-05-07
| | | | | | | | | | | | | | | | We don't need an explicit save-restore block to determine the bounds of top-level control operations... the implicit save-restore that all picutres have should logically work the same way. The commented test failed before this and passes now. Bug: skia:7735 Change-Id: Ibd31a3a9b0b48042ab3869a6bb57bc8d8bb78c09 Reviewed-on: https://skia-review.googlesource.com/126460 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>
* 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>
* move largest apis into privateGravatar Mike Reed2018-01-08
| | | | | | | | | Related to https://skia-review.googlesource.com/c/skia/+/91860 Bug: skia: Change-Id: Ia8fd981b422bbab75541b078277d2e09e1fc9d41 Reviewed-on: https://skia-review.googlesource.com/91940 Reviewed-by: Brian Salomon <bsalomon@google.com>
* Revert "Revert "Reland: Remove SkLights include from SkCanvas.h""Gravatar Florin Malita2017-05-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 9d5f66d9c21eda7d3e2ed47654180c0c4b6e38b1. Reason for revert: Leon landed Android fixes. Original change's description: > Revert "Reland: Remove SkLights include from SkCanvas.h" > > This reverts commit fed00319c9bafa41c8df658708030c072b301a41. > > Reason for revert: breaking the Android roll. > > Original change's description: > > Reland: Remove SkLights include from SkCanvas.h > > > > SkLights.h pulls in a bunch of other headers and is not needed (fwdecl > > works fine). > > > > Change-Id: I3ed97cd7861e51dcb7cfa7950a97b420dbc6fbfb > > TBR=reed@google.com > > Reviewed-on: https://skia-review.googlesource.com/15143 > > Commit-Queue: Florin Malita <fmalita@chromium.org> > > Reviewed-by: Florin Malita <fmalita@chromium.org> > > > > TBR=fmalita@chromium.org,reed@google.com > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Change-Id: I3b0e69f1d04d160f16a5567b09982d35cc9ca84e > Reviewed-on: https://skia-review.googlesource.com/15195 > Reviewed-by: Florin Malita <fmalita@chromium.org> > Commit-Queue: Florin Malita <fmalita@chromium.org> > TBR=msarett@google.com,reviews@skia.org,fmalita@chromium.org,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I0a1c2f9df61f16987ab72dfb4f3a205fbcc37667 Reviewed-on: https://skia-review.googlesource.com/15229 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Revert "Reland: Remove SkLights include from SkCanvas.h"Gravatar Florin Malita2017-05-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit fed00319c9bafa41c8df658708030c072b301a41. Reason for revert: breaking the Android roll. Original change's description: > Reland: Remove SkLights include from SkCanvas.h > > SkLights.h pulls in a bunch of other headers and is not needed (fwdecl > works fine). > > Change-Id: I3ed97cd7861e51dcb7cfa7950a97b420dbc6fbfb > TBR=reed@google.com > Reviewed-on: https://skia-review.googlesource.com/15143 > Commit-Queue: Florin Malita <fmalita@chromium.org> > Reviewed-by: Florin Malita <fmalita@chromium.org> > TBR=fmalita@chromium.org,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I3b0e69f1d04d160f16a5567b09982d35cc9ca84e Reviewed-on: https://skia-review.googlesource.com/15195 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Reland: Remove SkLights include from SkCanvas.hGravatar Florin Malita2017-05-03
| | | | | | | | | | | SkLights.h pulls in a bunch of other headers and is not needed (fwdecl works fine). Change-Id: I3ed97cd7861e51dcb7cfa7950a97b420dbc6fbfb TBR=reed@google.com Reviewed-on: https://skia-review.googlesource.com/15143 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Florin Malita <fmalita@chromium.org>
* Revert "Remove SkLights include from SkCanvas.h"Gravatar Florin Malita2017-05-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 9ff301bf918cd85d9f67047f10631b7a74345a90. Reason for revert: need to update G3, Flutter. Original change's description: > Remove SkLights include from SkCanvas.h > > SkLights.h pulls in a bunch of other headers and is not needed (fwdecl > works fine). > > Change-Id: Id2d7176eb3bf4609f72f46d513eebf59318f542f > Reviewed-on: https://skia-review.googlesource.com/14904 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Florin Malita <fmalita@chromium.org> > TBR=mtklein@google.com,fmalita@chromium.org,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I4799ad5b31aaeaf529c8b912bbe09aa8869a5e6c Reviewed-on: https://skia-review.googlesource.com/15107 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Remove SkLights include from SkCanvas.hGravatar Florin Malita2017-05-02
| | | | | | | | | | SkLights.h pulls in a bunch of other headers and is not needed (fwdecl works fine). Change-Id: Id2d7176eb3bf4609f72f46d513eebf59318f542f Reviewed-on: https://skia-review.googlesource.com/14904 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Fix infinite loop in SkRTree::insert()Gravatar Mike Klein2017-04-10
| | | | | | | | | | | | When aspectRatio is not finite, insert() can fall into an infinite loop. This happens if you pass SkRect::MakeLargest() to the factory as bounds. BUG=skia:5974 Change-Id: Ibcc9e5c5943c718608d4c1448305f7b8f11413bc Reviewed-on: https://skia-review.googlesource.com/11784 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Mark overridden destructors with 'override' and remove 'virtual'Gravatar Brian Salomon2017-03-22
| | | | | | | | | This silences a new warning in clang 5.0 Change-Id: Ieb5b75a6ffed60107c3fd16075d2ecfd515b55e8 Reviewed-on: https://skia-review.googlesource.com/10006 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* abstract name of clipping ops, to transtion to a more restricted setGravatar reed2016-09-20
| | | | | | | | | | | SkRegion::Op --> SkCanvas::ClipOp (alias) --> SkClipOp pre-CL needed in chrome : https://codereview.chromium.org/2355583002/ BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2355483002 Review-Url: https://codereview.chromium.org/2355483002
* return pictures as sk_spGravatar reed2016-03-18
| | | | | | | 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
* Style Change: NULL->nullptrGravatar halcanary2015-08-27
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316233002 Review URL: https://codereview.chromium.org/1316233002
* 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
* 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
* Remove SkTileGrid (except for TileGridInfo).Gravatar mtklein2015-01-09
| | | | | | | | TBR=reed@google.com BUG=skia:3085 Review URL: https://codereview.chromium.org/845623002
* Clean up dead clear() code in SkRecord.Gravatar mtklein2015-01-05
| | | | | | | | | | | | | This removes the SkRecords::Clear struct and everything that refers to it. Notice there is nothing actually creating a Clear, which means this is all dead code. Now that all ops obey the clip, I don't think we need the weird inflate-empty-to-epsilon hack for BBH queries. BUG=skia: Review URL: https://codereview.chromium.org/835813002
* 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
* add some debugging to SkNVRefCntGravatar reed2014-11-24
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/745383003
* Make sure pictures draw Clears even when the clip is empty.Gravatar mtklein2014-11-20
| | | | | | | | | | | | We fix this by rewriting empty queries to very tiny queries, which will certainly hit ops that span the entire picture (like Clear) and hopefully not much more. (This doesn't quite work in the full cull rect world if [0,0,ε,ε] doesn't overlap the picture. Let's cross that bridge when we get there.) BUG=432991 Review URL: https://codereview.chromium.org/732723004
* Make RTree handle the case where the playback canvas has empty clip boundsGravatar junov2014-10-30
BUG=skia:3074 Review URL: https://codereview.chromium.org/678303004