diff options
Diffstat (limited to 'ui/gfx/blit_unittest.cc')
-rw-r--r-- | ui/gfx/blit_unittest.cc | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/ui/gfx/blit_unittest.cc b/ui/gfx/blit_unittest.cc index 1d59d9b..f71be18 100644 --- a/ui/gfx/blit_unittest.cc +++ b/ui/gfx/blit_unittest.cc @@ -68,71 +68,71 @@ TEST(Blit, ScrollCanvas) { { 0x20, 0x21, 0x22, 0x23, 0x24 }, { 0x30, 0x31, 0x32, 0x33, 0x34 }, { 0x40, 0x41, 0x42, 0x43, 0x44 }}; - SetToCanvas<5, 5>(canvas, initial_values); + SetToCanvas<5, 5>(canvas.get(), initial_values); // Sanity check on input. - VerifyCanvasValues<5, 5>(canvas, initial_values); + VerifyCanvasValues<5, 5>(canvas.get(), initial_values); // Scroll none and make sure it's a NOP. - gfx::ScrollCanvas(canvas, + gfx::ScrollCanvas(canvas.get(), gfx::Rect(0, 0, kCanvasWidth, kCanvasHeight), gfx::Vector2d(0, 0)); - VerifyCanvasValues<5, 5>(canvas, initial_values); + VerifyCanvasValues<5, 5>(canvas.get(), initial_values); // Scroll the center 3 pixels up one. gfx::Rect center_three(1, 1, 3, 3); - gfx::ScrollCanvas(canvas, center_three, gfx::Vector2d(0, -1)); + gfx::ScrollCanvas(canvas.get(), center_three, gfx::Vector2d(0, -1)); uint8 scroll_up_expected[kCanvasHeight][kCanvasWidth] = { { 0x00, 0x01, 0x02, 0x03, 0x04 }, { 0x10, 0x21, 0x22, 0x23, 0x14 }, { 0x20, 0x31, 0x32, 0x33, 0x24 }, { 0x30, 0x31, 0x32, 0x33, 0x34 }, { 0x40, 0x41, 0x42, 0x43, 0x44 }}; - VerifyCanvasValues<5, 5>(canvas, scroll_up_expected); + VerifyCanvasValues<5, 5>(canvas.get(), scroll_up_expected); // Reset and scroll the center 3 pixels down one. - SetToCanvas<5, 5>(canvas, initial_values); - gfx::ScrollCanvas(canvas, center_three, gfx::Vector2d(0, 1)); + SetToCanvas<5, 5>(canvas.get(), initial_values); + gfx::ScrollCanvas(canvas.get(), center_three, gfx::Vector2d(0, 1)); uint8 scroll_down_expected[kCanvasHeight][kCanvasWidth] = { { 0x00, 0x01, 0x02, 0x03, 0x04 }, { 0x10, 0x11, 0x12, 0x13, 0x14 }, { 0x20, 0x11, 0x12, 0x13, 0x24 }, { 0x30, 0x21, 0x22, 0x23, 0x34 }, { 0x40, 0x41, 0x42, 0x43, 0x44 }}; - VerifyCanvasValues<5, 5>(canvas, scroll_down_expected); + VerifyCanvasValues<5, 5>(canvas.get(), scroll_down_expected); // Reset and scroll the center 3 pixels right one. - SetToCanvas<5, 5>(canvas, initial_values); - gfx::ScrollCanvas(canvas, center_three, gfx::Vector2d(1, 0)); + SetToCanvas<5, 5>(canvas.get(), initial_values); + gfx::ScrollCanvas(canvas.get(), center_three, gfx::Vector2d(1, 0)); uint8 scroll_right_expected[kCanvasHeight][kCanvasWidth] = { { 0x00, 0x01, 0x02, 0x03, 0x04 }, { 0x10, 0x11, 0x11, 0x12, 0x14 }, { 0x20, 0x21, 0x21, 0x22, 0x24 }, { 0x30, 0x31, 0x31, 0x32, 0x34 }, { 0x40, 0x41, 0x42, 0x43, 0x44 }}; - VerifyCanvasValues<5, 5>(canvas, scroll_right_expected); + VerifyCanvasValues<5, 5>(canvas.get(), scroll_right_expected); // Reset and scroll the center 3 pixels left one. - SetToCanvas<5, 5>(canvas, initial_values); - gfx::ScrollCanvas(canvas, center_three, gfx::Vector2d(-1, 0)); + SetToCanvas<5, 5>(canvas.get(), initial_values); + gfx::ScrollCanvas(canvas.get(), center_three, gfx::Vector2d(-1, 0)); uint8 scroll_left_expected[kCanvasHeight][kCanvasWidth] = { { 0x00, 0x01, 0x02, 0x03, 0x04 }, { 0x10, 0x12, 0x13, 0x13, 0x14 }, { 0x20, 0x22, 0x23, 0x23, 0x24 }, { 0x30, 0x32, 0x33, 0x33, 0x34 }, { 0x40, 0x41, 0x42, 0x43, 0x44 }}; - VerifyCanvasValues<5, 5>(canvas, scroll_left_expected); + VerifyCanvasValues<5, 5>(canvas.get(), scroll_left_expected); // Diagonal scroll. - SetToCanvas<5, 5>(canvas, initial_values); - gfx::ScrollCanvas(canvas, center_three, gfx::Vector2d(2, 2)); + SetToCanvas<5, 5>(canvas.get(), initial_values); + gfx::ScrollCanvas(canvas.get(), center_three, gfx::Vector2d(2, 2)); uint8 scroll_diagonal_expected[kCanvasHeight][kCanvasWidth] = { { 0x00, 0x01, 0x02, 0x03, 0x04 }, { 0x10, 0x11, 0x12, 0x13, 0x14 }, { 0x20, 0x21, 0x22, 0x23, 0x24 }, { 0x30, 0x31, 0x32, 0x11, 0x34 }, { 0x40, 0x41, 0x42, 0x43, 0x44 }}; - VerifyCanvasValues<5, 5>(canvas, scroll_diagonal_expected); + VerifyCanvasValues<5, 5>(canvas.get(), scroll_diagonal_expected); } #if defined(OS_WIN) |