DescriptionShapeDetection: add support for all CanvasImageSource input types
Currently ShapeDetector::detectFacesOn{ImageBitmap,Videoelement}()
extract the pixels out of the corresponding object; I haven't noticed
that CanvasImageSource::getSourceImageForCanvas() is a virtual method,
implemented for each CanvasImageSource, doing exactly what I needed,
which is extracting an WTF::Image.
getSourceImageForCanvas() implementations have the same checks
being performed on ToT now, so swapping one for the other is
not reducing the early-bail outs.
So, this CL factors out the code to use getSourceImageForCanvas(),
making the Shape Detection detect() work for all these different
input types, and adds LayoutTests for them.
BUG=670977, 659138
Committed: https://crrev.com/7d0018f762087ab6624de7dd09cf15207dda57c6
Cr-Commit-Position: refs/heads/master@{#437144}
Patch Set 1 #
Total comments: 2
Patch Set 2 : Support case for peekPixels() and isImageBitmap() #
Total comments: 11
Patch Set 3 : reillyg@s comments #Messages
Total messages: 25 (15 generated)
|