[sksg] Fix group hit-testing order
Change-Id: Idc25109a598caabf01e3ab61dc97f984ff453d40 Reviewed-on: https://skia-review.googlesource.com/c/191664 Commit-Queue: Mike Reed <reed@google.com> Auto-Submit: Florin Malita <fmalita@chromium.org> Reviewed-by: Mike Reed <reed@google.com>
This commit is contained in:
parent
be89130dbf
commit
63136afbd0
@ -67,8 +67,8 @@ void Group::onRender(SkCanvas* canvas, const RenderContext* ctx) const {
|
||||
}
|
||||
|
||||
const RenderNode* Group::onNodeAt(const SkPoint& p) const {
|
||||
for (const auto& child : fChildren) {
|
||||
if (const auto* node = child->nodeAt(p)) {
|
||||
for (auto it = fChildren.crbegin(); it != fChildren.crend(); ++it) {
|
||||
if (const auto* node = (*it)->nodeAt(p)) {
|
||||
return node;
|
||||
}
|
||||
}
|
||||
|
@ -98,8 +98,8 @@ static void inval_test1(skiatest::Reporter* reporter) {
|
||||
{{ 0, -1 }, nullptr },
|
||||
{{ 100, 0 }, nullptr },
|
||||
{{ 0, 100 }, nullptr },
|
||||
{{ 0, 0 }, d1 },
|
||||
{{ 99, 99 }, d1 },
|
||||
{{ 0, 0 }, d2 },
|
||||
{{ 99, 99 }, d2 },
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user