| 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 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 #include "platform/graphics/BitmapImage.h" | 29 #include "platform/graphics/BitmapImage.h" |
| 30 #include "platform/graphics/DisplayList.h" | 30 #include "platform/graphics/DisplayList.h" |
| 31 #include "platform/graphics/ImageBuffer.h" | 31 #include "platform/graphics/ImageBuffer.h" |
| 32 #include "platform/graphics/skia/NativeImageSkia.h" | 32 #include "platform/graphics/skia/NativeImageSkia.h" |
| 33 #include "third_party/skia/include/core/SkBitmap.h" | 33 #include "third_party/skia/include/core/SkBitmap.h" |
| 34 #include "third_party/skia/include/core/SkCanvas.h" | 34 #include "third_party/skia/include/core/SkCanvas.h" |
| 35 #include "third_party/skia/include/core/SkPicture.h" | 35 #include "third_party/skia/include/core/SkPicture.h" |
| 36 #include <gtest/gtest.h> | 36 #include <gtest/gtest.h> |
| 37 | 37 |
| 38 using namespace WebCore; | 38 using namespace blink; |
| 39 | 39 |
| 40 namespace { | 40 namespace { |
| 41 | 41 |
| 42 #define EXPECT_EQ_RECT(a, b) \ | 42 #define EXPECT_EQ_RECT(a, b) \ |
| 43 EXPECT_EQ(a.x(), b.x()); \ | 43 EXPECT_EQ(a.x(), b.x()); \ |
| 44 EXPECT_EQ(a.y(), b.y()); \ | 44 EXPECT_EQ(a.y(), b.y()); \ |
| 45 EXPECT_EQ(a.width(), b.width()); \ | 45 EXPECT_EQ(a.width(), b.width()); \ |
| 46 EXPECT_EQ(a.height(), b.height()); | 46 EXPECT_EQ(a.height(), b.height()); |
| 47 | 47 |
| 48 #define EXPECT_PIXELS_MATCH(bitmap, opaqueRect) \ | 48 #define EXPECT_PIXELS_MATCH(bitmap, opaqueRect) \ |
| (...skipping 1065 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1114 EXPECT_FALSE(pic); | 1114 EXPECT_FALSE(pic); |
| 1115 | 1115 |
| 1116 // endRecording finally makes the picture accessible | 1116 // endRecording finally makes the picture accessible |
| 1117 dl->endRecording(); | 1117 dl->endRecording(); |
| 1118 pic = dl->picture(); | 1118 pic = dl->picture(); |
| 1119 EXPECT_TRUE(pic); | 1119 EXPECT_TRUE(pic); |
| 1120 EXPECT_EQ(1, pic->getRefCnt()); | 1120 EXPECT_EQ(1, pic->getRefCnt()); |
| 1121 } | 1121 } |
| 1122 | 1122 |
| 1123 } // namespace | 1123 } // namespace |
| OLD | NEW |