Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1024)

Unified Diff: src/views/SkView.cpp

Issue 1323223004: add interactive xfer sample (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « samplecode/SampleXfer.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/views/SkView.cpp
diff --git a/src/views/SkView.cpp b/src/views/SkView.cpp
index 249737a64b6177a1d7d3209ddfefbd44cf32fe33..ec75d610aaf6ec24f69bdb99c5b45943e1f96456 100644
--- a/src/views/SkView.cpp
+++ b/src/views/SkView.cpp
@@ -378,12 +378,16 @@ SkView::Click* SkView::findClickHandler(SkScalar x, SkScalar y, unsigned modi) {
F2BIter iter(this);
SkView* child;
- while ((child = iter.next()) != nullptr)
- {
+ while ((child = iter.next()) != nullptr) {
SkPoint p;
+#if 0
if (!child->globalToLocal(x, y, &p)) {
continue;
}
+#else
+ // the above seems broken, so just respecting fLoc for now <reed>
+ p.set(x - child->fLoc.x(), y - child->fLoc.y());
+#endif
Click* click = child->findClickHandler(p.fX, p.fY, modi);
« no previous file with comments | « samplecode/SampleXfer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698