| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 22 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 23 */ | 23 */ |
| 24 | 24 |
| 25 #include "config.h" | 25 #include "config.h" |
| 26 | 26 |
| 27 #include <gtest/gtest.h> | 27 #include <gtest/gtest.h> |
| 28 #include "SkCanvas.h" | 28 #include "SkCanvas.h" |
| 29 #include "core/platform/graphics/BitmapImage.h" | 29 #include "core/platform/graphics/BitmapImage.h" |
| 30 #include "core/platform/graphics/GraphicsContext.h" | 30 #include "core/platform/graphics/GraphicsContext.h" |
| 31 #include "core/platform/graphics/ImageBuffer.h" | 31 #include "core/platform/graphics/ImageBuffer.h" |
| 32 #include "core/platform/graphics/Path.h" |
| 32 #include "core/platform/graphics/skia/NativeImageSkia.h" | 33 #include "core/platform/graphics/skia/NativeImageSkia.h" |
| 33 | 34 |
| 34 using namespace WebCore; | 35 using namespace WebCore; |
| 35 | 36 |
| 36 namespace { | 37 namespace { |
| 37 | 38 |
| 38 #define EXPECT_EQ_RECT(a, b) \ | 39 #define EXPECT_EQ_RECT(a, b) \ |
| 39 EXPECT_EQ(a.x(), b.x()); \ | 40 EXPECT_EQ(a.x(), b.x()); \ |
| 40 EXPECT_EQ(a.y(), b.y()); \ | 41 EXPECT_EQ(a.y(), b.y()); \ |
| 41 EXPECT_EQ(a.width(), b.width()); \ | 42 EXPECT_EQ(a.width(), b.width()); \ |
| (...skipping 1050 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1092 path.moveTo(FloatPoint(10, 10)); | 1093 path.moveTo(FloatPoint(10, 10)); |
| 1093 path.addLineTo(FloatPoint(40, 40)); | 1094 path.addLineTo(FloatPoint(40, 40)); |
| 1094 context.strokePath(path); | 1095 context.strokePath(path); |
| 1095 | 1096 |
| 1096 context.endTransparencyLayer(); | 1097 context.endTransparencyLayer(); |
| 1097 EXPECT_EQ_RECT(IntRect(), context.opaqueRegion().asRect()); | 1098 EXPECT_EQ_RECT(IntRect(), context.opaqueRegion().asRect()); |
| 1098 EXPECT_PIXELS_MATCH_EXACT(bitmap, context.opaqueRegion().asRect()); | 1099 EXPECT_PIXELS_MATCH_EXACT(bitmap, context.opaqueRegion().asRect()); |
| 1099 } | 1100 } |
| 1100 | 1101 |
| 1101 } // namespace | 1102 } // namespace |
| OLD | NEW |