diff options
author | Mike Reed <reed@google.com> | 2009-11-20 09:45:43 -0500 |
---|---|---|
committer | Mike Reed <reed@google.com> | 2009-11-20 09:45:43 -0500 |
commit | 8e048c19870a898cecdde3b3c0d2d512e6f372c0 (patch) | |
tree | 06f6268965b3fce2083bf583a455d7ea13c8f28a /include/views | |
parent | d3b8e237aaf15dbd5d9790d339688e5f1012f841 (diff) | |
download | external_skia-8e048c19870a898cecdde3b3c0d2d512e6f372c0.zip external_skia-8e048c19870a898cecdde3b3c0d2d512e6f372c0.tar.gz external_skia-8e048c19870a898cecdde3b3c0d2d512e6f372c0.tar.bz2 |
new edgelist builder that chops segments into clip-sized coordinates, to avoid overflows
The change is conditional at the moment inside SkScan_Path.cpp, USE_NEW_BUILDER.
This chopping is meant to only pass in reasonable floats to the edgelist, so that we never
overflow when converting to fixed-point. It also has the side-effect of speeding up edges
to the left/right of the clip, since those become vertical lines, which are faster to
walk over than the original curve segment.
Future optimizations: throw away segments to the right of the clip, and tweak the edgelist
walker to not require an explicit matching right-edge for the current run.
Diffstat (limited to 'include/views')
-rw-r--r-- | include/views/SkView.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/views/SkView.h b/include/views/SkView.h index 1bdd0b6..f3b729f 100644 --- a/include/views/SkView.h +++ b/include/views/SkView.h @@ -314,7 +314,13 @@ protected: /** Override this if you might handle the click */ - virtual Click* onFindClickHandler(SkScalar x, SkScalar y); + virtual Click* onFindClickHandler(SkScalar x, SkScalar y); + /** Override this to decide if your children are targets for a click. + The default returns true, in which case your children views will be + candidates for onFindClickHandler. Returning false wil skip the children + and just call your onFindClickHandler. + */ + virtual bool onSendClickToChildren(SkScalar x, SkScalar y); /** Override this to track clicks, returning true as long as you want to track the pen/mouse. */ |