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

Unified Diff: third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp

Issue 2849643002: Implement ImageData::CropRect() (Closed)
Patch Set: Addressing comments Created 3 years, 7 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
« no previous file with comments | « third_party/WebKit/Source/core/html/ImageDataTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp
diff --git a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp
index ef2efa11a22547e4371a15149af3b70ff3824511..c32619dfafee740cf34373e48166d983cde819cf 100644
--- a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp
+++ b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp
@@ -1240,15 +1240,18 @@ bool ConvertPixelsToColorSpaceAndPixelFormatForTest(
sk_sp<SkColorSpace> src_sk_color_space = nullptr;
if (u8_array) {
- src_sk_color_space = ImageData::GetSkColorSpaceForTest(
- src_color_space, kRGBA8CanvasPixelFormat);
+ src_sk_color_space =
+ CanvasColorParams(src_color_space, kRGBA8CanvasPixelFormat)
+ .GetSkColorSpaceForSkSurfaces();
} else {
- src_sk_color_space = ImageData::GetSkColorSpaceForTest(
- src_color_space, kF16CanvasPixelFormat);
+ src_sk_color_space =
+ CanvasColorParams(src_color_space, kF16CanvasPixelFormat)
+ .GetSkColorSpaceForSkSurfaces();
}
sk_sp<SkColorSpace> dst_sk_color_space =
- ImageData::GetSkColorSpaceForTest(dst_color_space, dst_pixel_format);
+ CanvasColorParams(dst_color_space, dst_pixel_format)
+ .GetSkColorSpaceForSkSurfaces();
// When the input dataArray is in Uint16, we normally should convert the
// values from Little Endian to Big Endian before passing the buffer to
« no previous file with comments | « third_party/WebKit/Source/core/html/ImageDataTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698