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

Unified Diff: third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp

Issue 2727133002: Remove ColorBehavior argument to Image::imageForCurrentFrame (Closed)
Patch Set: Rebase Created 3 years, 9 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
Index: third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp
diff --git a/third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp b/third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp
index 2fc9609fb194c93df60065fe78c5bb99dde0af71..fd3119df79b10a8a9b905b41b75a60f89f37d612 100644
--- a/third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp
+++ b/third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp
@@ -113,9 +113,7 @@ ScriptPromise ShapeDetector::detect(ScriptState* scriptState,
uint8_t* pixelDataPtr = nullptr;
WTF::CheckedNumeric<int> allocationSize = 0;
- // TODO(ccameron): ShapeDetector can ignore color conversion.
- sk_sp<SkImage> skImage =
- image->imageForCurrentFrame(ColorBehavior::transformToGlobalTarget());
+ sk_sp<SkImage> skImage = image->imageForCurrentFrame();
// Use |skImage|'s pixels if it has direct access to them.
if (skImage->peekPixels(&pixmap)) {
pixelDataPtr = static_cast<uint8_t*>(pixmap.writable_addr());
@@ -191,9 +189,7 @@ ScriptPromise ShapeDetector::detectShapesOnImageElement(
return promise;
}
- // TODO(ccameron): ShapeDetector can ignore color conversion.
- const sk_sp<SkImage> image = blinkImage->imageForCurrentFrame(
- ColorBehavior::transformToGlobalTarget());
+ const sk_sp<SkImage> image = blinkImage->imageForCurrentFrame();
DCHECK_EQ(img->naturalWidth(), static_cast<unsigned>(image->width()));
DCHECK_EQ(img->naturalHeight(), static_cast<unsigned>(image->height()));

Powered by Google App Engine
This is Rietveld 408576698