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

Side by Side Diff: third_party/WebKit/Source/modules/shapedetection/FaceDetector.cpp

Issue 2490233002: Use unsigned longs in HTMLImageElement idl (Closed)
Patch Set: Fix compile error Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLImageElement.idl ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "modules/shapedetection/FaceDetector.h" 5 #include "modules/shapedetection/FaceDetector.h"
6 6
7 #include "core/dom/DOMException.h" 7 #include "core/dom/DOMException.h"
8 #include "core/dom/DOMRect.h" 8 #include "core/dom/DOMRect.h"
9 #include "core/dom/Document.h" 9 #include "core/dom/Document.h"
10 #include "core/fetch/ImageResource.h" 10 #include "core/fetch/ImageResource.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 } 108 }
109 109
110 Image* const blinkImage = imageResource->getImage(); 110 Image* const blinkImage = imageResource->getImage();
111 if (!blinkImage) { 111 if (!blinkImage) {
112 resolver->reject(DOMException::create( 112 resolver->reject(DOMException::create(
113 InvalidStateError, "Failed to get image from resource.")); 113 InvalidStateError, "Failed to get image from resource."));
114 return promise; 114 return promise;
115 } 115 }
116 116
117 const sk_sp<SkImage> image = blinkImage->imageForCurrentFrame(); 117 const sk_sp<SkImage> image = blinkImage->imageForCurrentFrame();
118 DCHECK_EQ(img->naturalWidth(), image->width()); 118 DCHECK_EQ(img->naturalWidth(), static_cast<unsigned>(image->width()));
119 DCHECK_EQ(img->naturalHeight(), image->height()); 119 DCHECK_EQ(img->naturalHeight(), static_cast<unsigned>(image->height()));
120 120
121 if (!image) { 121 if (!image) {
122 resolver->reject(DOMException::create( 122 resolver->reject(DOMException::create(
123 InvalidStateError, "Failed to get image from current frame.")); 123 InvalidStateError, "Failed to get image from current frame."));
124 return promise; 124 return promise;
125 } 125 }
126 126
127 const SkImageInfo skiaInfo = 127 const SkImageInfo skiaInfo =
128 SkImageInfo::MakeN32(image->width(), image->height(), image->alphaType()); 128 SkImageInfo::MakeN32(image->width(), image->height(), image->alphaType());
129 129
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 309
310 resolver->resolve(detectedFaces); 310 resolver->resolve(detectedFaces);
311 m_serviceRequests.remove(resolver); 311 m_serviceRequests.remove(resolver);
312 } 312 }
313 313
314 DEFINE_TRACE(FaceDetector) { 314 DEFINE_TRACE(FaceDetector) {
315 visitor->trace(m_serviceRequests); 315 visitor->trace(m_serviceRequests);
316 } 316 }
317 317
318 } // namespace blink 318 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLImageElement.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698