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

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

Issue 2849643002: Implement ImageData::CropRect() (Closed)
Patch Set: Adding MakeCopy() Created 3 years, 8 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/canvas2d/CanvasRenderingContext2DTest.cpp
diff --git a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp
index 3489a30ddffadac68c908151690635341696ddfe..58de23d29fccef0764242d181b5903c54d887aa1 100644
--- a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp
+++ b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp
@@ -1393,15 +1393,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

Powered by Google App Engine
This is Rietveld 408576698