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

Unified Diff: third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp

Issue 2144573003: Temporarily disabling 2d canvas getImageData optimization (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix test 4 realz Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/graphics/ExpensiveCanvasHeuristicParameters.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp
diff --git a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp
index 1a0c7ffd02a3d55f39f215c56c366c01a2c96cbf..9a0fc752c8ccb02c390670963b4a7107c2c4b495 100644
--- a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp
+++ b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp
@@ -783,9 +783,15 @@ TEST_F(CanvasRenderingContext2DTest, GetImageDataDisablesAcceleration)
context2d()->getImageData(0, 0, 1, 1, exceptionState);
EXPECT_FALSE(exceptionState.hadException());
- EXPECT_FALSE(bridge->isAccelerated());
- EXPECT_EQ(0u, getGlobalAcceleratedImageBufferCount());
- EXPECT_EQ(0, getGlobalGPUMemoryUsage());
+ if (ExpensiveCanvasHeuristicParameters::GetImageDataForcesNoAcceleration) {
+ EXPECT_FALSE(bridge->isAccelerated());
+ EXPECT_EQ(0u, getGlobalAcceleratedImageBufferCount());
+ EXPECT_EQ(0, getGlobalGPUMemoryUsage());
+ } else {
+ EXPECT_TRUE(bridge->isAccelerated());
+ EXPECT_EQ(1u, getGlobalAcceleratedImageBufferCount());
+ EXPECT_EQ(720000, getGlobalGPUMemoryUsage());
+ }
// Restore global state to prevent side-effects on other tests
RuntimeEnabledFeatures::setCanvas2dFixedRenderingModeEnabled(savedFixedRenderingMode);
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/graphics/ExpensiveCanvasHeuristicParameters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698