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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/paint/PaintControllerTest.cpp

Issue 2394853003: Enforce comment formatting in platform/ (Closed)
Patch Set: change Created 4 years, 2 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
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 "platform/graphics/paint/PaintController.h" 5 #include "platform/graphics/paint/PaintController.h"
6 6
7 #include "platform/RuntimeEnabledFeatures.h" 7 #include "platform/RuntimeEnabledFeatures.h"
8 #include "platform/graphics/GraphicsContext.h" 8 #include "platform/graphics/GraphicsContext.h"
9 #include "platform/graphics/paint/ClipPathDisplayItem.h" 9 #include "platform/graphics/paint/ClipPathDisplayItem.h"
10 #include "platform/graphics/paint/ClipPathRecorder.h" 10 #include "platform/graphics/paint/ClipPathRecorder.h"
(...skipping 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after
1075 EXPECT_EQ(PaintChunk::Id(container1, backgroundDrawingType), 1075 EXPECT_EQ(PaintChunk::Id(container1, backgroundDrawingType),
1076 getPaintController().paintChunks()[0].id); 1076 getPaintController().paintChunks()[0].id);
1077 EXPECT_EQ(PaintChunk::Id(container2, backgroundDrawingType), 1077 EXPECT_EQ(PaintChunk::Id(container2, backgroundDrawingType),
1078 getPaintController().paintChunks()[1].id); 1078 getPaintController().paintChunks()[1].id);
1079 EXPECT_THAT(getPaintController().paintChunks()[0].rasterInvalidationRects, 1079 EXPECT_THAT(getPaintController().paintChunks()[0].rasterInvalidationRects,
1080 UnorderedElementsAre(FloatRect(LayoutRect::infiniteIntRect()))); 1080 UnorderedElementsAre(FloatRect(LayoutRect::infiniteIntRect())));
1081 EXPECT_THAT(getPaintController().paintChunks()[1].rasterInvalidationRects, 1081 EXPECT_THAT(getPaintController().paintChunks()[1].rasterInvalidationRects,
1082 UnorderedElementsAre(FloatRect(LayoutRect::infiniteIntRect()))); 1082 UnorderedElementsAre(FloatRect(LayoutRect::infiniteIntRect())));
1083 } 1083 }
1084 1084
1085 // Simulate the situation when |container1| gets a z-index that is greater tha n 1085 // Simulate the situation when |container1| gets a z-index that is greater
1086 // that of |container2|. 1086 // than that of |container2|.
1087 if (RuntimeEnabledFeatures::paintUnderInvalidationCheckingEnabled()) { 1087 if (RuntimeEnabledFeatures::paintUnderInvalidationCheckingEnabled()) {
1088 // When under-invalidation-checking is enabled, 1088 // When under-invalidation-checking is enabled,
1089 // useCachedSubsequenceIfPossible is forced off, and the client is expected 1089 // useCachedSubsequenceIfPossible is forced off, and the client is expected
1090 // to create the same painting as in the previous paint. 1090 // to create the same painting as in the previous paint.
1091 EXPECT_FALSE(SubsequenceRecorder::useCachedSubsequenceIfPossible( 1091 EXPECT_FALSE(SubsequenceRecorder::useCachedSubsequenceIfPossible(
1092 context, container2)); 1092 context, container2));
1093 { 1093 {
1094 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { 1094 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
1095 PaintChunk::Id id(container2, backgroundDrawingType); 1095 PaintChunk::Id id(container2, backgroundDrawingType);
1096 getPaintController().updateCurrentPaintChunkProperties( 1096 getPaintController().updateCurrentPaintChunkProperties(
(...skipping 1163 matching lines...) Expand 10 before | Expand all | Expand 10 after
2260 } 2260 }
2261 2261
2262 TEST_F(PaintControllerUnderInvalidationTest, 2262 TEST_F(PaintControllerUnderInvalidationTest,
2263 FoldCompositingDrawingInSubsequence) { 2263 FoldCompositingDrawingInSubsequence) {
2264 testFoldCompositingDrawingInSubsequence(); 2264 testFoldCompositingDrawingInSubsequence();
2265 } 2265 }
2266 2266
2267 #endif // defined(GTEST_HAS_DEATH_TEST) && !OS(ANDROID) 2267 #endif // defined(GTEST_HAS_DEATH_TEST) && !OS(ANDROID)
2268 2268
2269 } // namespace blink 2269 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698