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

Issue 2553343003: ShapeDetection: add support for all CanvasImageSource input types (Closed)

Created:
4 years ago by mcasas
Modified:
4 years ago
CC:
blink-reviews, chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

ShapeDetection: 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)
mcasas
xianglu@, reillyg@ PTAL
4 years ago (2016-12-07 17:51:57 UTC) #6
xianglu
LGTM % comment https://codereview.chromium.org/2553343003/diff/20001/third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp File third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp (right): https://codereview.chromium.org/2553343003/diff/20001/third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp#newcode118 third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp:118: // TODO(mcasas): retrieve the pixels from ...
4 years ago (2016-12-07 18:45:10 UTC) #7
mcasas
ping reillyg@ haraken@ rs plz modules/shapedetection https://codereview.chromium.org/2553343003/diff/20001/third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp File third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp (right): https://codereview.chromium.org/2553343003/diff/20001/third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp#newcode118 third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp:118: // TODO(mcasas): retrieve ...
4 years ago (2016-12-07 20:02:10 UTC) #9
Reilly Grant (use Gerrit)
https://codereview.chromium.org/2553343003/diff/40001/third_party/WebKit/LayoutTests/shapedetection/detection-HTMLCanvasElement.html File third_party/WebKit/LayoutTests/shapedetection/detection-HTMLCanvasElement.html (right): https://codereview.chromium.org/2553343003/diff/40001/third_party/WebKit/LayoutTests/shapedetection/detection-HTMLCanvasElement.html#newcode18 third_party/WebKit/LayoutTests/shapedetection/detection-HTMLCanvasElement.html:18: var canvas = createCanvas(); ////document.createElement('canvas'); Leftover comment? https://codereview.chromium.org/2553343003/diff/40001/third_party/WebKit/LayoutTests/shapedetection/detection-HTMLCanvasElement.html#newcode25 third_party/WebKit/LayoutTests/shapedetection/detection-HTMLCanvasElement.html:25: ...
4 years ago (2016-12-07 21:37:06 UTC) #10
mcasas
ptal https://codereview.chromium.org/2553343003/diff/40001/third_party/WebKit/LayoutTests/shapedetection/detection-HTMLCanvasElement.html File third_party/WebKit/LayoutTests/shapedetection/detection-HTMLCanvasElement.html (right): https://codereview.chromium.org/2553343003/diff/40001/third_party/WebKit/LayoutTests/shapedetection/detection-HTMLCanvasElement.html#newcode18 third_party/WebKit/LayoutTests/shapedetection/detection-HTMLCanvasElement.html:18: var canvas = createCanvas(); ////document.createElement('canvas'); On 2016/12/07 21:37:06, ...
4 years ago (2016-12-07 22:02:37 UTC) #11
Reilly Grant (use Gerrit)
lgtm https://codereview.chromium.org/2553343003/diff/40001/third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp File third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp (right): https://codereview.chromium.org/2553343003/diff/40001/third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp#newcode121 third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp:121: : DontPremultiplyAlpha, On 2016/12/07 at 22:02:37, mcasas wrote: ...
4 years ago (2016-12-07 22:09:35 UTC) #12
haraken
LGTM
4 years ago (2016-12-08 01:17:17 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2553343003/60001
4 years ago (2016-12-08 01:57:01 UTC) #20
commit-bot: I haz the power
Committed patchset #3 (id:60001)
4 years ago (2016-12-08 02:13:33 UTC) #23
commit-bot: I haz the power
4 years ago (2016-12-08 02:17:21 UTC) #25
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/7d0018f762087ab6624de7dd09cf15207dda57c6
Cr-Commit-Position: refs/heads/master@{#437144}

Powered by Google App Engine
This is Rietveld 408576698