OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 // TODO(awalker): clean up the const/non-const reference handling in this test | 5 // TODO(awalker): clean up the const/non-const reference handling in this test |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 | 8 |
9 #if !defined(OS_WIN) | 9 #if !defined(OS_WIN) |
10 #include <unistd.h> | 10 #include <unistd.h> |
11 #endif | 11 #endif |
12 | 12 |
13 #include "skia/ext/platform_canvas.h" | 13 #include "skia/ext/platform_canvas.h" |
14 #include "skia/ext/platform_device.h" | 14 #include "skia/ext/platform_device.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
16 | 16 |
17 #include "SkColor.h" | 17 #include "SkColor.h" |
18 | 18 |
19 // TODO(maruel): Removes once notImplemented() is not necessary anymore. | |
20 #include "NotImplemented.h" | |
21 | |
22 namespace skia { | 19 namespace skia { |
23 | 20 |
24 namespace { | 21 namespace { |
25 | 22 |
26 // Return true if the canvas is filled to canvas_color, and contains a single | 23 // Return true if the canvas is filled to canvas_color, and contains a single |
27 // rectangle filled to rect_color. This function ignores the alpha channel, | 24 // rectangle filled to rect_color. This function ignores the alpha channel, |
28 // since Windows will sometimes clear the alpha channel when drawing, and we | 25 // since Windows will sometimes clear the alpha channel when drawing, and we |
29 // will fix that up later in cases it's necessary. | 26 // will fix that up later in cases it's necessary. |
30 bool VerifyRect(const PlatformCanvas& canvas, | 27 bool VerifyRect(const PlatformCanvas& canvas, |
31 uint32_t canvas_color, uint32_t rect_color, | 28 uint32_t canvas_color, uint32_t rect_color, |
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 kLayerW, kLayerH); | 382 kLayerW, kLayerH); |
386 #endif | 383 #endif |
387 } | 384 } |
388 canvas.restore(); | 385 canvas.restore(); |
389 EXPECT_TRUE(VerifyRoundedRect(canvas, SK_ColorWHITE, SK_ColorBLACK, | 386 EXPECT_TRUE(VerifyRoundedRect(canvas, SK_ColorWHITE, SK_ColorBLACK, |
390 kInnerX + 1, kInnerY + 1, kInnerW, kInnerH)); | 387 kInnerX + 1, kInnerY + 1, kInnerW, kInnerH)); |
391 #endif | 388 #endif |
392 } | 389 } |
393 | 390 |
394 } // namespace skia | 391 } // namespace skia |
OLD | NEW |