| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 "cc/paint/paint_op_buffer.h" | 5 #include "cc/paint/paint_op_buffer.h" |
| 6 #include "cc/paint/display_item_list.h" |
| 7 #include "cc/test/skia_common.h" |
| 6 #include "cc/test/test_skcanvas.h" | 8 #include "cc/test/test_skcanvas.h" |
| 7 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 8 | 10 |
| 9 namespace { | 11 namespace { |
| 10 | 12 |
| 11 template <typename T> | 13 template <typename T> |
| 12 void CheckRefCnt(const T& obj, int32_t count) { | 14 void CheckRefCnt(const T& obj, int32_t count) { |
| 13 // Skia doesn't define getRefCnt in all builds. | 15 // Skia doesn't define getRefCnt in all builds. |
| 14 #ifdef SK_DEBUG | 16 #ifdef SK_DEBUG |
| 15 EXPECT_EQ(obj->getRefCnt(), count); | 17 EXPECT_EQ(obj->getRefCnt(), count); |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 buffer.push<RestoreOp>(); | 325 buffer.push<RestoreOp>(); |
| 324 | 326 |
| 325 SaveCountingCanvas canvas; | 327 SaveCountingCanvas canvas; |
| 326 buffer.playback(&canvas); | 328 buffer.playback(&canvas); |
| 327 | 329 |
| 328 EXPECT_EQ(1, canvas.save_count_); | 330 EXPECT_EQ(1, canvas.save_count_); |
| 329 EXPECT_EQ(1, canvas.restore_count_); | 331 EXPECT_EQ(1, canvas.restore_count_); |
| 330 } | 332 } |
| 331 | 333 |
| 332 } // namespace cc | 334 } // namespace cc |
| OLD | NEW |