Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(746)

Side by Side Diff: Source/core/paint/LayerClipRecorderTest.cpp

Issue 860563003: Disable display item caching (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 ClipRect clipRect(rect); 45 ClipRect clipRect(rect);
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 rootDisplayItemList().beginNewPaints();
55 drawClip(&context, renderView(), PaintPhaseForeground, bound); 56 drawClip(&context, renderView(), PaintPhaseForeground, bound);
57 rootDisplayItemList().endNewPaints();
56 EXPECT_EQ((size_t)2, rootDisplayItemList().paintList().size()); 58 EXPECT_EQ((size_t)2, rootDisplayItemList().paintList().size());
57 } 59 }
58 60
59 } 61 }
60 } 62 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698