aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkBBoxHierarchy.h
Commit message (Collapse)AuthorAge
* Move SkTemplates.h to private.Gravatar bungeman2015-08-19
| | | | | | | | SkTemplates.h contains a number of Skia specific utilities which are not designed for external use. In addition to reducing the external support burden, this will allow Skia to freely refactor this file. Review URL: https://codereview.chromium.org/1272293004
* unsigned -> int for counts and indices in picture-related codeGravatar mtklein2015-08-19
| | | | | | | | also, (C) BUG=skia: Review URL: https://codereview.chromium.org/1300163002
* remove SkInstCntGravatar mtklein2015-06-26
| | | | | | | | | | | | | | It's been outclassed by Valgrind and leak sanitizer, and it seems to be causing problems for external folks building Skia. I'm not sure why our own builds seem unaffected. Latest thread: https://groups.google.com/forum/#!topic/skia-discuss/oj9FsQwwSF0 BUG=skia: Review URL: https://codereview.chromium.org/1217573002
* 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
* 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
* Cut down SkBBH API more.Gravatar mtklein2014-10-27
| | | | | | | | | | | | | | - The expected case is now a single bulk-load insert() call instead of N; - reserve() and flushDeferredInserts() can fold into insert() now; - SkBBH subclasses may take ownership of the bounds This appears to be a performance no-op on both my Mac and N5. I guess even the simplest indirect branch predictor ("same as last time") can predict the repeated virtual calls to SkBBH::insert() perfectly. BUG=skia: Review URL: https://codereview.chromium.org/670213002
* Add SkBBoxHierarchy::reserve() as an optional size hint.Gravatar mtklein2014-10-09
| | | | | | | | | | | | I want to play around with how SkTileGrid stores its tiles. Having a cap on the number of insert() calls can be pretty handy. While I'm at it, I gave flush() a default empty impl. Like reserve(), it's really an optional hook for subclasses. BUG=skia: Review URL: https://codereview.chromium.org/639933003
* Demote getCount, getDepth, and clear to RTree-only methods.Gravatar mtklein2014-10-02
| | | | | | | | We use them only to test RTree. BUG=skia: Review URL: https://codereview.chromium.org/622773003
* BBHs: void* data -> unsigned dataGravatar mtklein2014-10-02
| | | | | | | | | | | | | | Now that the old backend's not using BBHs, we can specialize them for SkRecord's needs. The only thing we really want to store is op index, which should always be small enough to fit into an unsigned (unsigned also helps keep it straight from other ints floating around). This means we'll need half (32-bit) or a quarter (64-bit) the bytes in SkTileGrid, because we don't have to store an extra int for ordering. BUG=skia:2834 Review URL: https://codereview.chromium.org/617393004
* Convert BBH APIs to use SkRect.Gravatar mtklein2014-08-27
| | | | | | | | | | | | | Still TODO: convert internals of SkTileGrid.cpp and SkRTree.cpp to work in floats too. NOTREECHECKS=true BUG=skia:1021 R=robertphillips@google.com, reed@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/511613002
* Make BBH::search() const.Gravatar mtklein2014-08-08
| | | | | | | | | | | | | I'd like to have SkRecordDraw() work with a const SkBBoxHierarchy*, but can't quite today. The only interesting change here is no longer flushing if needed in RTree; instead we assert we've been flushed already. BUG=skia: R=robertphillips@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/452233002
* Initial QuadTree implementationGravatar commit-bot@chromium.org2014-02-03
| | | | | | | | | | | | | | | | | | In an effort to find a faster bounding box hierarchy than the R-Tree, a QuadTree has been implemented here. For now, the QuadTree construction is generally faster than the R-Tree and the queries are a bit slower, so overall, SKP local tests showed QuadTree performance similar to the R-Tree performance. Tests and bench are included in this cl. At this point, I'd like to be able to commit this in order to more easily use the bots to test multiple configurations and a larger number of SKPs. The R-Tree BBH is still used by default so this change shouldn't affect chromium. BUG=skia: R=junov@chromium.org, junov@google.com, senorblanco@google.com, senorblanco@chromium.org, reed@google.com, sugoi@google.com, fmalita@google.com Author: sugoi@chromium.org Review URL: https://codereview.chromium.org/131343011 git-svn-id: http://skia.googlecode.com/svn/trunk@13282 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2013-03-16
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@8177 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fixing SkPicture command pattern optimizations to make them work correctly ↵Gravatar commit-bot@chromium.org2013-03-15
| | | | | | | | | | | | | | | with bounding box hierarchies BUG=https://code.google.com/p/chromium/issues/detail?id=180645 TEST=render_pictures -r <skp_dir> --validate --bbh <grid|rtree> --mode tile 256 256 Author: junov@chromium.org Reviewed By: robertphillips@google.com Review URL: https://chromiumcodereview.appspot.com/12817011 git-svn-id: http://skia.googlecode.com/svn/trunk@8171 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2013-01-26
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@7406 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make BBoxHierarchy ref-counted, fix leak in RTreeTest.Gravatar rileya@google.com2012-09-11
| | | | | | Review URL: https://codereview.appspot.com/6489108 git-svn-id: http://skia.googlecode.com/svn/trunk@5484 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add R-Tree data structure.Gravatar rileya@google.com2012-09-05
Review URL: https://codereview.appspot.com/6489055 git-svn-id: http://skia.googlecode.com/svn/trunk@5401 2bbb7eff-a529-9590-31e7-b0007b416f81