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

Side by Side Diff: gfx/blit_unittest.cc

Issue 3034039: FBTF: Minor gfx/ header cleanup. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: win fix Created 10 years, 4 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 unified diff | Download patch
« no previous file with comments | « gfx/blit.h ('k') | gfx/canvas.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "gfx/blit.h" 6 #include "gfx/blit.h"
7 #include "gfx/point.h"
8 #include "gfx/rect.h"
7 #include "skia/ext/platform_canvas.h" 9 #include "skia/ext/platform_canvas.h"
8 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
9 11
10 namespace { 12 namespace {
11 13
12 // Fills the given canvas with the values by duplicating the values into each 14 // Fills the given canvas with the values by duplicating the values into each
13 // color channel for the corresponding pixel. 15 // color channel for the corresponding pixel.
14 // 16 //
15 // Example values = {{0x0, 0x01}, {0x12, 0xFF}} would give a canvas with: 17 // Example values = {{0x0, 0x01}, {0x12, 0xFF}} would give a canvas with:
16 // 0x00000000 0x01010101 18 // 0x00000000 0x01010101
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 SetToCanvas<5, 5>(&canvas, initial_values); 126 SetToCanvas<5, 5>(&canvas, initial_values);
125 gfx::ScrollCanvas(&canvas, center_three, gfx::Point(2, 2)); 127 gfx::ScrollCanvas(&canvas, center_three, gfx::Point(2, 2));
126 uint8 scroll_diagonal_expected[kCanvasHeight][kCanvasWidth] = { 128 uint8 scroll_diagonal_expected[kCanvasHeight][kCanvasWidth] = {
127 { 0x00, 0x01, 0x02, 0x03, 0x04 }, 129 { 0x00, 0x01, 0x02, 0x03, 0x04 },
128 { 0x10, 0x11, 0x12, 0x13, 0x14 }, 130 { 0x10, 0x11, 0x12, 0x13, 0x14 },
129 { 0x20, 0x21, 0x22, 0x23, 0x24 }, 131 { 0x20, 0x21, 0x22, 0x23, 0x24 },
130 { 0x30, 0x31, 0x32, 0x11, 0x34 }, 132 { 0x30, 0x31, 0x32, 0x11, 0x34 },
131 { 0x40, 0x41, 0x42, 0x43, 0x44 }}; 133 { 0x40, 0x41, 0x42, 0x43, 0x44 }};
132 VerifyCanvasValues<5, 5>(&canvas, scroll_diagonal_expected); 134 VerifyCanvasValues<5, 5>(&canvas, scroll_diagonal_expected);
133 } 135 }
OLDNEW
« no previous file with comments | « gfx/blit.h ('k') | gfx/canvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698