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

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

Issue 2039373003: Temporarily disable ClipPathDisplayItem accounting for GPU veto (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: disable the unit test also Created 4 years, 6 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
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/paint/ClipPathDisplayItem.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/CachedDisplayItem.h" 9 #include "platform/graphics/paint/CachedDisplayItem.h"
10 #include "platform/graphics/paint/ClipPathDisplayItem.h" 10 #include "platform/graphics/paint/ClipPathDisplayItem.h"
(...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 drawPath(context, client, backgroundDrawingType, 50); 888 drawPath(context, client, backgroundDrawingType, 50);
889 } 889 }
890 getPaintController().commitNewDisplayItems(LayoutSize()); 890 getPaintController().commitNewDisplayItems(LayoutSize());
891 EXPECT_FALSE(getPaintController().paintArtifact().isSuitableForGpuRasterizat ion()); 891 EXPECT_FALSE(getPaintController().paintArtifact().isSuitableForGpuRasterizat ion());
892 892
893 EXPECT_TRUE(SubsequenceRecorder::useCachedSubsequenceIfPossible(context, con tainer)); 893 EXPECT_TRUE(SubsequenceRecorder::useCachedSubsequenceIfPossible(context, con tainer));
894 getPaintController().commitNewDisplayItems(LayoutSize()); 894 getPaintController().commitNewDisplayItems(LayoutSize());
895 EXPECT_FALSE(getPaintController().paintArtifact().isSuitableForGpuRasterizat ion()); 895 EXPECT_FALSE(getPaintController().paintArtifact().isSuitableForGpuRasterizat ion());
896 } 896 }
897 897
898 TEST_F(PaintControllerTest, IsNotSuitableForGpuRasterizationConcaveClipPath) 898 // Temporarily disabled (pref regressions due to GPU veto stickiness: http://crb ug.com/603969).
899 TEST_F(PaintControllerTest, DISABLED_IsNotSuitableForGpuRasterizationConcaveClip Path)
899 { 900 {
900 Path path; 901 Path path;
901 path.addLineTo(FloatPoint(50, 50)); 902 path.addLineTo(FloatPoint(50, 50));
902 path.addLineTo(FloatPoint(100, 0)); 903 path.addLineTo(FloatPoint(100, 0));
903 path.addLineTo(FloatPoint(50, 100)); 904 path.addLineTo(FloatPoint(50, 100));
904 path.closeSubpath(); 905 path.closeSubpath();
905 906
906 FakeDisplayItemClient client("test client", LayoutRect(0, 0, 200, 100)); 907 FakeDisplayItemClient client("test client", LayoutRect(0, 0, 200, 100));
907 GraphicsContext context(getPaintController()); 908 GraphicsContext context(getPaintController());
908 909
909 // Run twice for empty/non-empty m_currentPaintArtifact coverage. 910 // Run twice for empty/non-empty m_currentPaintArtifact coverage.
910 for (int i = 0; i < 2; ++i) { 911 for (int i = 0; i < 2; ++i) {
911 for (int j = 0; j < 50; ++j) 912 for (int j = 0; j < 50; ++j)
912 getPaintController().createAndAppend<BeginClipPathDisplayItem>(clien t, path); 913 getPaintController().createAndAppend<BeginClipPathDisplayItem>(clien t, path);
913 drawRect(context, client, backgroundDrawingType, FloatRect(0, 0, 100, 10 0)); 914 drawRect(context, client, backgroundDrawingType, FloatRect(0, 0, 100, 10 0));
914 for (int j = 0; j < 50; ++j) 915 for (int j = 0; j < 50; ++j)
915 getPaintController().createAndAppend<EndClipPathDisplayItem>(client) ; 916 getPaintController().createAndAppend<EndClipPathDisplayItem>(client) ;
916 getPaintController().commitNewDisplayItems(LayoutSize()); 917 getPaintController().commitNewDisplayItems(LayoutSize());
917 EXPECT_FALSE(getPaintController().paintArtifact().isSuitableForGpuRaster ization()); 918 EXPECT_FALSE(getPaintController().paintArtifact().isSuitableForGpuRaster ization());
918 } 919 }
919 } 920 }
920 921
921 } // namespace blink 922 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/paint/ClipPathDisplayItem.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698