OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "config.h" | 5 #include "config.h" |
6 #include "core/paint/LayerClipRecorder.h" | 6 #include "core/paint/LayerClipRecorder.h" |
7 | 7 |
8 #include "core/rendering/RenderView.h" | 8 #include "core/rendering/RenderView.h" |
9 #include "core/rendering/RenderingTestHelper.h" | 9 #include "core/rendering/RenderingTestHelper.h" |
10 #include "core/rendering/compositing/RenderLayerCompositor.h" | 10 #include "core/rendering/compositing/RenderLayerCompositor.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 LayerClipRecorder LayerClipRecorder(renderer->compositor()->rootRenderLayer(
)->renderer(), context, DisplayItem::ClipLayerForeground, clipRect, 0, LayoutPoi
nt(), PaintLayerFlags()); | 46 LayerClipRecorder LayerClipRecorder(renderer->compositor()->rootRenderLayer(
)->renderer(), context, DisplayItem::ClipLayerForeground, clipRect, 0, LayoutPoi
nt(), PaintLayerFlags()); |
47 } | 47 } |
48 | 48 |
49 TEST_F(LayerClipRecorderTest, LayerClipRecorderTest_Single) | 49 TEST_F(LayerClipRecorderTest, LayerClipRecorderTest_Single) |
50 { | 50 { |
51 GraphicsContext context(nullptr, &rootDisplayItemList()); | 51 GraphicsContext context(nullptr, &rootDisplayItemList()); |
52 FloatRect bound = renderView()->viewRect(); | 52 FloatRect bound = renderView()->viewRect(); |
53 EXPECT_EQ((size_t)0, rootDisplayItemList().paintList().size()); | 53 EXPECT_EQ((size_t)0, rootDisplayItemList().paintList().size()); |
54 | 54 |
55 drawClip(&context, renderView(), PaintPhaseForeground, bound); | 55 drawClip(&context, renderView(), PaintPhaseForeground, bound); |
| 56 rootDisplayItemList().endNewPaints(); |
56 EXPECT_EQ((size_t)2, rootDisplayItemList().paintList().size()); | 57 EXPECT_EQ((size_t)2, rootDisplayItemList().paintList().size()); |
57 } | 58 } |
58 | 59 |
59 } | 60 } |
60 } | 61 } |
OLD | NEW |