diff options
author | enne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-11 23:01:29 +0000 |
---|---|---|
committer | enne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-11 23:01:29 +0000 |
commit | bea16ce9260b665e87cf03ee2af7f5f3eb972e29 (patch) | |
tree | 3a05031bc2354f5b77228a595a7ef5c67a0a8fd1 | |
parent | e3e44e71643ae5d04dc9ea3303c2ae949c2038ab (diff) | |
download | chromium_src-bea16ce9260b665e87cf03ee2af7f5f3eb972e29.zip chromium_src-bea16ce9260b665e87cf03ee2af7f5f3eb972e29.tar.gz chromium_src-bea16ce9260b665e87cf03ee2af7f5f3eb972e29.tar.bz2 |
Remove throughput_tests
These have been replaced by Telemetry tests and are not being run anywhere.
BUG=332167, 333357
Review URL: https://codereview.chromium.org/124393006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244382 0039d316-1c4b-4281-b951-d872f2087c98
25 files changed, 5 insertions, 1177 deletions
diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi index 9162650..6d0de7c 100644 --- a/chrome/chrome_tests.gypi +++ b/chrome/chrome_tests.gypi @@ -2090,7 +2090,6 @@ 'test/base/chrome_render_view_test.h', 'test/perf/browser_perf_test.cc', 'test/perf/browser_perf_test.h', - 'test/perf/rendering/throughput_tests.cc', ], 'rules': [ { diff --git a/chrome/test/data/perf/rendering/throughput/canvas2d_balls_common/bouncing_balls.html b/chrome/test/data/perf/rendering/throughput/canvas2d_balls_common/bouncing_balls.html deleted file mode 100644 index a7574f8..0000000 --- a/chrome/test/data/perf/rendering/throughput/canvas2d_balls_common/bouncing_balls.html +++ /dev/null @@ -1,29 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> -<head> - <script src="parse_url.js"></script> - <script src="bouncing_balls.js"></script> - <style> - html, body { - width: 100%; - height: 100%; - margin: 0px; - padding: 0px; - overflow: hidden; - } - </style> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> - <title>Canvas 2D frame rate test: bouncing balls</title> -</head> -<body> - -<canvas id="canvas" width="500" height="500"> -</canvas> -<img id="ballImage" src="chromium.png" height="0" width="0"></img> -<img id="backImage" src="kiddie_logo.png" height="0" width="0"></img> -<script> - var canvas = document.getElementById('canvas'); - var canvasContext = canvas.getContext('2d'); -</script> -</body> -</html> diff --git a/chrome/test/data/perf/rendering/throughput/canvas2d_balls_common/bouncing_balls.js b/chrome/test/data/perf/rendering/throughput/canvas2d_balls_common/bouncing_balls.js deleted file mode 100644 index 89276b3..0000000 --- a/chrome/test/data/perf/rendering/throughput/canvas2d_balls_common/bouncing_balls.js +++ /dev/null @@ -1,176 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// demo parameters -// maybe overridden in test file -var numBalls = parseInt(getArgValue('ball_count')); -if (numBalls == 0 || isNaN(numBalls)) { - numBalls = 500; -} -var ballDiameter = 30; -var gravity = 0.5; //screen heights per second^2 -var maxInitVelocity = 0.2; -var maxAngularVelocity = 5; // rad per second -var elasticity = 0.7; -var joltInterval = 1.5; - -// globals -var balls = []; -var canvasWidth; -var canvasHeight; -var borderX; -var borderY; -var timeOfLastJolt = 0; - -function include(filename) { - var head = document.getElementsByTagName('head')[0]; - var script = document.createElement('script'); - script.src = filename; - script.type = 'text/javascript'; - head.appendChild(script) -} - -include("bouncing_balls_draw_ball_as_" + getArgValue('ball') + ".js"); -include("bouncing_balls_draw_back_as_" + getArgValue('back') + ".js"); - -window.requestAnimFrame = (function(){ - return window.requestAnimationFrame || - window.webkitRequestAnimationFrame || - window.mozRequestAnimationFrame || - window.oRequestAnimationFrame || - window.msRequestAnimationFrame || - function( callback ){ - window.setTimeout(callback, 1000 / 60); - }; -})(); - -window.onload = init; - -function init(){ - handleResize(); - for (var i = 0; i < numBalls; i++) { - balls.push(new Ball()); - } - window.addEventListener("resize", handleResize, false); - drawBallInit(ballDiameter); // externally defined - window.requestAnimFrame(updateFrame); -} - -function handleResize() { - canvasWidth = window.innerWidth; - canvasHeight = window.innerHeight; - canvas.setAttribute('width', canvasWidth); - canvas.setAttribute('height', canvasHeight); - borderX = ballDiameter/canvasWidth; - borderY = ballDiameter/canvasHeight; - prepareBackground(); // externally defined -} - -function updateFrame() { - var now = new Date().getTime() / 1000; - var jolt = false; - if (now - timeOfLastJolt > joltInterval) { - jolt = true; - timeOfLastJolt = now; - } - drawBackground(); // externally defined - for (var i = 0; i < numBalls; i++) { - balls[i].step(jolt); - } - window.requestAnimFrame(updateFrame); -} - -function Ball(){ - var x = borderX + Math.random()*(1-2*borderX); - var y = borderY + Math.random()*(1-2*borderY); - var angle = Math.PI * 2 * Math.random(); - var velocityY = Math.random()*maxInitVelocity*2 - maxInitVelocity; - var velocityX = Math.random()*maxInitVelocity*2 - maxInitVelocity; - var angularVelocity = Math.random()*maxAngularVelocity*2 - - maxAngularVelocity; - var previousFrameTime = new Date().getTime(); - var previousBounceTime = 0; - var alive = true; - function step(jolt) { - var curTime = new Date().getTime(); - var timeStep = (curTime - previousFrameTime) / 1000; - previousFrameTime = curTime; - - // handle balls that are no longer bouncing - if (!alive) { - if (jolt) { - // If a jolt is applied, bump the rollong balls enough for them to - // reach between 0.75x and 1x the height of the window - velocityY = -Math.sqrt(2 * gravity * (1-2 * borderY) * (0.75 + 0.25 * - Math.random())) - velocityX = Math.random()*maxInitVelocity*2 - maxInitVelocity; - angularVelocity = Math.random()*maxAngularVelocity*2 - - maxAngularVelocity; - alive = true; - } else { - // rolling on the ground - angularVelocity = 2*velocityX*canvasWidth/ballDiameter; - } - } - - // Compute angular motion - angle += timeStep*angularVelocity; - // Compute horizontal motion - var remainingTime = timeStep; - var deltaX = velocityX*remainingTime; - while ((x+deltaX) < borderX || (x+deltaX) > (1-borderX)){ - if ((x+deltaX) < borderX) { - // left side bounce - remainingTime -= (borderX - x)/velocityX; - x = borderX; - } else { - // right side bounce - remainingTime -= ((1-borderX) - x)/velocityX; - x = 1 - borderX; - } - velocityX = -elasticity*velocityX; - deltaX = velocityX*remainingTime; - } - x += deltaX; - - // Compute vertical motion - remainingTime = timeStep; - var deltaY = alive ? velocityY*timeStep+gravity*timeStep*timeStep/2 : 0; - //Handle floor bounces - //To make sure the floor is air tight, we must be able to process multiple - //bounces per time step to avoid the "tunnel effect". - while ((y + deltaY) > (1 - borderY) && alive) { - // time to hit floor - var c = y-(1-borderY); - var b = velocityY; - var a = gravity/2; - // The greater root is always the right one - var subStep = (-b + Math.sqrt(b*b-4*a*c))/(2*a); - //velocity after floor hit - velocityY = -elasticity*(velocityY + gravity*subStep); - remainingTime -= subStep; - var bounceTime = curTime - remainingTime; - if (bounceTime - previousBounceTime < 0.005){ - // The number of iterations may not be finite within a timestep - // with elasticity < 1. This is due to power series convergence. - // To gard against hanging, we treat the ball as rolling on the ground - // once time between bounces is less than 5ms - alive = false; - deltaY = 0; - } else { - deltaY = velocityY*remainingTime+gravity*remainingTime*remainingTime/2; - } - previousBounceTime = bounceTime; - y = (1 - borderY); - } - y += deltaY; - velocityY += gravity*remainingTime; - - drawBall(x * canvasWidth, y * canvasHeight, angle); // externally defined - } - - return { - step: step - } -} diff --git a/chrome/test/data/perf/rendering/throughput/canvas2d_balls_common/bouncing_balls_draw_back_as_aligned_canvas.js b/chrome/test/data/perf/rendering/throughput/canvas2d_balls_common/bouncing_balls_draw_back_as_aligned_canvas.js deleted file mode 100644 index 79b1b19..0000000 --- a/chrome/test/data/perf/rendering/throughput/canvas2d_balls_common/bouncing_balls_draw_back_as_aligned_canvas.js +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -var backImageCanvas; - -function prepareBackground() { - var backImage = document.getElementById('backImage'); - backImageCanvas = document.createElement('canvas'); - backImageCanvas.width = canvasWidth; - backImageCanvas.height = canvasHeight; - var backContext = backImageCanvas.getContext('2d'); - backContext.drawImage(backImage, 0, 0, canvasWidth, canvasHeight); -} - -function drawBackground() { - canvasContext.drawImage(backImageCanvas, 0, 0); -} diff --git a/chrome/test/data/perf/rendering/throughput/canvas2d_balls_common/bouncing_balls_draw_back_as_aligned_image_data.js b/chrome/test/data/perf/rendering/throughput/canvas2d_balls_common/bouncing_balls_draw_back_as_aligned_image_data.js deleted file mode 100644 index 94fabf6..0000000 --- a/chrome/test/data/perf/rendering/throughput/canvas2d_balls_common/bouncing_balls_draw_back_as_aligned_image_data.js +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -var backImageData; - -function prepareBackground() { - var backImage = document.getElementById('backImage'); - var backImageCanvas = document.createElement('canvas'); - backImageCanvas.width = canvasWidth; - backImageCanvas.height = canvasHeight; - var backContext = backImageCanvas.getContext('2d'); - backContext.drawImage(backImage, 0, 0, canvasWidth, canvasHeight); - backImageData = backContext.getImageData(0, 0, canvasWidth, canvasHeight) -} - -function drawBackground() { - canvasContext.putImageData(backImageData, 0, 0); -} diff --git a/chrome/test/data/perf/rendering/throughput/canvas2d_balls_common/bouncing_balls_draw_back_as_canvas.js b/chrome/test/data/perf/rendering/throughput/canvas2d_balls_common/bouncing_balls_draw_back_as_canvas.js deleted file mode 100644 index 0b5b93c..0000000 --- a/chrome/test/data/perf/rendering/throughput/canvas2d_balls_common/bouncing_balls_draw_back_as_canvas.js +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -var backImageCanvas; - -function prepareBackground() { - var backImage = document.getElementById('backImage'); - backImageCanvas = document.createElement('canvas'); - backImageCanvas.width = backImage.naturalWidth; - backImageCanvas.height = backImage.naturalHeight; - var backContext = backImageCanvas.getContext('2d'); - backContext.drawImage(backImage, 0, 0); -} - -function drawBackground() { - canvasContext.drawImage(backImageCanvas, 0, 0, canvasWidth, canvasHeight); -} diff --git a/chrome/test/data/perf/rendering/throughput/canvas2d_balls_common/bouncing_balls_draw_back_as_gradient.js b/chrome/test/data/perf/rendering/throughput/canvas2d_balls_common/bouncing_balls_draw_back_as_gradient.js deleted file mode 100644 index 3317fa5..0000000 --- a/chrome/test/data/perf/rendering/throughput/canvas2d_balls_common/bouncing_balls_draw_back_as_gradient.js +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. -var backGradient; -function prepareBackground() { - backGradient = canvasContext.createLinearGradient(0, 0, canvasWidth, 0); - backGradient.addColorStop(0, "#FF4040"); - backGradient.addColorStop(1, "#40FF40"); -} - -function drawBackground() { - canvasContext.save(); - canvasContext.fillStyle = backGradient; - canvasContext.fillRect(0, 0, canvasWidth, canvasHeight); - canvasContext.restore(); -} diff --git a/chrome/test/data/perf/rendering/throughput/canvas2d_balls_common/bouncing_balls_draw_back_as_image.js b/chrome/test/data/perf/rendering/throughput/canvas2d_balls_common/bouncing_balls_draw_back_as_image.js deleted file mode 100644 index 925dcad..0000000 --- a/chrome/test/data/perf/rendering/throughput/canvas2d_balls_common/bouncing_balls_draw_back_as_image.js +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -var backImage; - -function prepareBackground() { - backImage = document.getElementById('backImage'); -} - -function drawBackground() { - canvasContext.drawImage(backImage, 0, 0, canvasWidth, canvasHeight); -} diff --git a/chrome/test/data/perf/rendering/throughput/canvas2d_balls_common/bouncing_balls_draw_back_as_white.js b/chrome/test/data/perf/rendering/throughput/canvas2d_balls_common/bouncing_balls_draw_back_as_white.js deleted file mode 100644 index a23608c..0000000 --- a/chrome/test/data/perf/rendering/throughput/canvas2d_balls_common/bouncing_balls_draw_back_as_white.js +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -function prepareBackground() { -} - -function drawBackground() { - canvasContext.save(); - canvasContext.fillStyle = "#FFFFFF"; - canvasContext.fillRect(0, 0, canvasWidth, canvasHeight); - canvasContext.restore(); -} diff --git a/chrome/test/data/perf/rendering/throughput/canvas2d_balls_common/bouncing_balls_draw_ball_as_canvas_sprite.js b/chrome/test/data/perf/rendering/throughput/canvas2d_balls_common/bouncing_balls_draw_ball_as_canvas_sprite.js deleted file mode 100644 index 549564f..0000000 --- a/chrome/test/data/perf/rendering/throughput/canvas2d_balls_common/bouncing_balls_draw_ball_as_canvas_sprite.js +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -var spriteMap; -var ballRadius; -var spriteMapSize = 50; - -function drawBallInit(diameter) { - ballRadius = diameter / 2; - var ballImage = document.getElementById('ballImage'); - spriteMap = document.createElement("canvas"); - spriteMap.setAttribute('width', ballDiameter*spriteMapSize + 2); - spriteMap.setAttribute('height', ballDiameter + 2); - ctx = spriteMap.getContext("2d"); - ctx.clearRect(0,0, ballDiameter*spriteMapSize + 2, ballDiameter + 2); - ctx.translate(ballRadius + 1, ballRadius + 1); - for (var i = 0; i < spriteMapSize; i++) { - ctx.save(); - ctx.rotate(i * 2 * Math.PI / spriteMapSize ); - ctx.drawImage(ballImage, -ballRadius, -ballRadius, ballDiameter, - ballDiameter); - ctx.restore(); - ctx.translate(ballDiameter, 0); - } -} - -function safeMod(a, b) { - var q = Math.floor(a / b); - return a - q*b; -} - -function drawBall(x, y, angle) { - canvasContext.save(); - canvasContext.translate(x, y); - var idx = safeMod(Math.floor(angle * spriteMapSize / (2 * Math.PI)), - spriteMapSize); - canvasContext.drawImage(spriteMap, idx*ballDiameter + 1, 1, ballDiameter, - ballDiameter, -ballRadius, -ballRadius, ballDiameter, ballDiameter); - canvasContext.restore(); -} diff --git a/chrome/test/data/perf/rendering/throughput/canvas2d_balls_common/bouncing_balls_draw_ball_as_filled_path.js b/chrome/test/data/perf/rendering/throughput/canvas2d_balls_common/bouncing_balls_draw_ball_as_filled_path.js deleted file mode 100644 index 7eb267d..0000000 --- a/chrome/test/data/perf/rendering/throughput/canvas2d_balls_common/bouncing_balls_draw_ball_as_filled_path.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -var ballRadius; -var ballGradient; -var segmentCount = 20; - -function drawBallInit(diameter) { - ballRadius = diameter / 2; - ballGradient = canvasContext.createRadialGradient(0, 0, 0, 0, 0, ballRadius); - ballGradient.addColorStop(0, "#4040FF"); - ballGradient.addColorStop(1, "#00FF40"); -} - -function drawBall(x, y, angle) { - canvasContext.save(); - canvasContext.fillStyle = ballGradient; - canvasContext.translate(x, y); - canvasContext.rotate(angle); - canvasContext.beginPath(); - canvasContext.moveTo(ballRadius, 0); - for (var i = 1; i < segmentCount; ++i) { - var angle = i * 2.0 * Math.PI / segmentCount; - canvasContext.lineTo(ballRadius*Math.cos(angle), - ballRadius*Math.sin(angle)); - } - canvasContext.fill(); - canvasContext.closePath(); - canvasContext.restore(); -} diff --git a/chrome/test/data/perf/rendering/throughput/canvas2d_balls_common/bouncing_balls_draw_ball_as_image.js b/chrome/test/data/perf/rendering/throughput/canvas2d_balls_common/bouncing_balls_draw_ball_as_image.js deleted file mode 100644 index 7be8bc6..0000000 --- a/chrome/test/data/perf/rendering/throughput/canvas2d_balls_common/bouncing_balls_draw_ball_as_image.js +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -var ballImage; -var ballRadius; - -function drawBallInit(diameter) { - ballRadius = diameter / 2; - ballImage = document.getElementById('ballImage'); -} - -function drawBall(x, y, angle) { - canvasContext.save(); - canvasContext.translate(x, y); - canvasContext.rotate(angle); - canvasContext.drawImage(ballImage, -ballRadius, -ballRadius, ballDiameter, - ballDiameter); - canvasContext.restore(); -} diff --git a/chrome/test/data/perf/rendering/throughput/canvas2d_balls_common/bouncing_balls_draw_ball_as_image_with_shadow.js b/chrome/test/data/perf/rendering/throughput/canvas2d_balls_common/bouncing_balls_draw_ball_as_image_with_shadow.js deleted file mode 100644 index 0c30e66..0000000 --- a/chrome/test/data/perf/rendering/throughput/canvas2d_balls_common/bouncing_balls_draw_ball_as_image_with_shadow.js +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -var ballImage; -var ballRadius; - -function drawBallInit(diameter) { - ballRadius = diameter / 2; - ballImage = document.getElementById('ballImage'); -} - -function drawBall(x, y, angle) { - canvasContext.save(); - canvasContext.shadowColor = 'black'; - canvasContext.shadowOffsetX = -ballRadius; - canvasContext.shadowOffsetY = ballRadius; - canvasContext.shadowBlur = ballRadius; - canvasContext.translate(x, y); - canvasContext.rotate(angle); - canvasContext.drawImage(ballImage, -ballRadius, -ballRadius, ballDiameter, - ballDiameter); - canvasContext.restore(); -} diff --git a/chrome/test/data/perf/rendering/throughput/canvas2d_balls_common/bouncing_balls_draw_ball_as_rect.js b/chrome/test/data/perf/rendering/throughput/canvas2d_balls_common/bouncing_balls_draw_ball_as_rect.js deleted file mode 100644 index e4e058b..0000000 --- a/chrome/test/data/perf/rendering/throughput/canvas2d_balls_common/bouncing_balls_draw_ball_as_rect.js +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -var ballRadius; - -function drawBallInit(diameter) { - ballRadius = diameter / 2; -} - -function drawBall(x, y, angle) { - canvasContext.save(); - canvasContext.fillStyle = 'blue'; - canvasContext.translate(x, y); - canvasContext.rotate(angle); - canvasContext.fillRect(-ballRadius, -ballRadius, ballDiameter, ballDiameter); - canvasContext.restore(); -} diff --git a/chrome/test/data/perf/rendering/throughput/canvas2d_balls_common/bouncing_balls_draw_ball_as_text.js b/chrome/test/data/perf/rendering/throughput/canvas2d_balls_common/bouncing_balls_draw_ball_as_text.js deleted file mode 100644 index 079280d..0000000 --- a/chrome/test/data/perf/rendering/throughput/canvas2d_balls_common/bouncing_balls_draw_ball_as_text.js +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -var ballScale; - -function drawBallInit(diameter) { - var metrics = canvasContext.measureText("Chrome"); - ballScale = diameter/metrics.width -} - -function drawBall(x, y, angle) { - canvasContext.save(); - canvasContext.fillStyle = 'blue'; - canvasContext.translate(x, y); - canvasContext.rotate(angle); - canvasContext.scale(ballScale, ballScale); - canvasContext.textAlign = "center"; - canvasContext.fillText("Chrome", 0, 0); - canvasContext.restore(); -} diff --git a/chrome/test/data/perf/rendering/throughput/canvas2d_balls_common/chromium.png b/chrome/test/data/perf/rendering/throughput/canvas2d_balls_common/chromium.png Binary files differdeleted file mode 100644 index 9085a79..0000000 --- a/chrome/test/data/perf/rendering/throughput/canvas2d_balls_common/chromium.png +++ /dev/null diff --git a/chrome/test/data/perf/rendering/throughput/canvas2d_balls_common/kiddie_logo.png b/chrome/test/data/perf/rendering/throughput/canvas2d_balls_common/kiddie_logo.png Binary files differdeleted file mode 100644 index 61c7068..0000000 --- a/chrome/test/data/perf/rendering/throughput/canvas2d_balls_common/kiddie_logo.png +++ /dev/null diff --git a/chrome/test/data/perf/rendering/throughput/canvas2d_balls_common/parse_url.js b/chrome/test/data/perf/rendering/throughput/canvas2d_balls_common/parse_url.js deleted file mode 100644 index 5173e34..0000000 --- a/chrome/test/data/perf/rendering/throughput/canvas2d_balls_common/parse_url.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -function getArgValue(argname) -{ - var url = window.location.href; - var parts = url.split("?"); - if (parts.length == 0) - { - return ""; - } - var arglist = parts[1]; - var args = arglist.split("&"); - for (i=0;i<args.length;i++) - { - var parts = args[i].split("="); - if (parts[0] == argname) - { - value = parts[1]; - value = unescape(value); - return value; - } - } - return ""; -}
\ No newline at end of file diff --git a/chrome/test/data/perf/rendering/throughput/canvas2d_balls_draw_from_canvas/index.html b/chrome/test/data/perf/rendering/throughput/canvas2d_balls_draw_from_canvas/index.html deleted file mode 100644 index 7537fec..0000000 --- a/chrome/test/data/perf/rendering/throughput/canvas2d_balls_draw_from_canvas/index.html +++ /dev/null @@ -1,7 +0,0 @@ -<html> -<head> -<meta http-equiv="REFRESH" content="0;url=../canvas2d_balls_common/bouncing_balls.html?ball=canvas_sprite&back=canvas"> -</head> -<body> -</body> -</html>
\ No newline at end of file diff --git a/chrome/test/data/perf/rendering/throughput/canvas2d_balls_fill_path/index.html b/chrome/test/data/perf/rendering/throughput/canvas2d_balls_fill_path/index.html deleted file mode 100644 index 9c62d56..0000000 --- a/chrome/test/data/perf/rendering/throughput/canvas2d_balls_fill_path/index.html +++ /dev/null @@ -1,7 +0,0 @@ -<html> -<head> -<meta http-equiv="REFRESH" content="0;url=../canvas2d_balls_common/bouncing_balls.html?ball=filled_path&back=gradient"> -</head> -<body> -</body> -</html>
\ No newline at end of file diff --git a/chrome/test/data/perf/rendering/throughput/canvas2d_balls_text/index.html b/chrome/test/data/perf/rendering/throughput/canvas2d_balls_text/index.html deleted file mode 100644 index 37bb7a4..0000000 --- a/chrome/test/data/perf/rendering/throughput/canvas2d_balls_text/index.html +++ /dev/null @@ -1,7 +0,0 @@ -<html> -<head> -<meta http-equiv="REFRESH" content="0;url=../canvas2d_balls_common/bouncing_balls.html?ball=text&back=white&ball_count=15"> -</head> -<body> -</body> -</html>
\ No newline at end of file diff --git a/chrome/test/data/perf/rendering/throughput/canvas2d_balls_with_shadow/index.html b/chrome/test/data/perf/rendering/throughput/canvas2d_balls_with_shadow/index.html deleted file mode 100644 index aa93994..0000000 --- a/chrome/test/data/perf/rendering/throughput/canvas2d_balls_with_shadow/index.html +++ /dev/null @@ -1,7 +0,0 @@ -<html> -<head> -<meta http-equiv="REFRESH" content="0;url=../canvas2d_balls_common/bouncing_balls.html?ball=image_with_shadow&back=image"> -</head> -<body> -</body> -</html>
\ No newline at end of file diff --git a/chrome/test/data/perf/rendering/throughput/compositing_huge_div/index.html b/chrome/test/data/perf/rendering/throughput/compositing_huge_div/index.html deleted file mode 100644 index 8251f26..0000000 --- a/chrome/test/data/perf/rendering/throughput/compositing_huge_div/index.html +++ /dev/null @@ -1,46 +0,0 @@ -<html> -<head> -<title>Compositing - Huge <div></title> -</head> -<body> -<div id="big" style="-webkit-transform: translateZ(0);"> - <div style="left: 0px; top: 0px; width: 100px; height: 100px; position: absolute; background-color: green;"></div> - <div style="left: 3000000px; top: 1000000px; width: 100px; height: 100px; position: absolute; background-color: red;" id="bottomRight"></div> -</div> -<script> -window.onload = init; - -var raf; - -function init() { - raf = window.requestAnimationFrame || - window.webkitRequestAnimationFrame || - window.mozRequestAnimationFrame || - window.oRequestAnimationFrame || - window.msRequestAnimationFrame; - tick(); -}; - -function tick() { - update(); - raf(tick); -}; -var bottomRight = document.getElementById('bottomRight'); -var x = 3000000; -var y = 1000000; - -function rand255() { - return Math.floor(Math.random() * 256); -} - -function update() { - y += 1000000; - bottomRight.style.left = x + 'px'; - bottomRight.style.top = y + 'px'; - bottomRight.style.backgroundColor = "rgb(" + rand255() + ", " + rand255() + ", " + rand255() + ")"; - scrollTo(x, y); -}; - -</script> -</body> -</html> diff --git a/chrome/test/perf/rendering/throughput_tests.cc b/chrome/test/perf/rendering/throughput_tests.cc deleted file mode 100644 index 08da527..0000000 --- a/chrome/test/perf/rendering/throughput_tests.cc +++ /dev/null @@ -1,616 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "base/command_line.h" -#include "base/file_util.h" -#include "base/files/file_path.h" -#include "base/json/json_reader.h" -#include "base/memory/scoped_ptr.h" -#include "base/path_service.h" -#include "base/run_loop.h" -#include "base/strings/string_number_conversions.h" -#include "base/strings/stringprintf.h" -#include "base/test/trace_event_analyzer.h" -#include "base/values.h" -#include "chrome/browser/ui/browser.h" -#include "chrome/browser/ui/browser_window.h" -#include "chrome/browser/ui/tabs/tab_strip_model.h" -#include "chrome/browser/ui/window_snapshot/window_snapshot.h" -#include "chrome/common/chrome_paths.h" -#include "chrome/common/chrome_switches.h" -#include "chrome/common/net/url_fixer_upper.h" -#include "chrome/test/base/test_switches.h" -#include "chrome/test/base/tracing.h" -#include "chrome/test/base/ui_test_utils.h" -#include "chrome/test/perf/browser_perf_test.h" -#include "chrome/test/perf/perf_test.h" -#include "content/public/browser/web_contents.h" -#include "content/public/browser/web_contents_view.h" -#include "content/public/common/content_switches.h" -#include "content/public/test/browser_test_utils.h" -#include "content/public/test/test_utils.h" -#include "gpu/config/gpu_test_config.h" -#include "net/base/net_util.h" -#include "net/dns/mock_host_resolver.h" -#include "testing/gtest/include/gtest/gtest.h" -#include "testing/perf/perf_test.h" -#include "third_party/skia/include/core/SkBitmap.h" -#include "third_party/skia/include/core/SkColor.h" -#include "ui/gfx/codec/png_codec.h" -#include "ui/gl/gl_switches.h" -#include "url/gurl.h" - -#if defined(OS_WIN) -#include "base/win/windows_version.h" -#endif - -namespace { - -enum RunTestFlags { - kNone = 0, - kInternal = 1 << 0, // Test uses internal test data. - kAllowExternalDNS = 1 << 1, // Test needs external DNS lookup. - kIsGpuCanvasTest = 1 << 2, // Test uses GPU accelerated canvas features. - kIsFlaky = 1 << 3 -}; - -enum ThroughputTestFlags { - kSW = 0, - kGPU = 1 << 0, - kCompositorThread = 1 << 1 -}; - -const int kSpinUpTimeMs = 4 * 1000; -const int kRunTimeMs = 10 * 1000; -const int kIgnoreSomeFrames = 3; - -class ThroughputTest : public BrowserPerfTest { - public: - explicit ThroughputTest(int flags) : - use_gpu_(flags & kGPU), - use_compositor_thread_(flags & kCompositorThread), - spinup_time_ms_(kSpinUpTimeMs), - run_time_ms_(kRunTimeMs) {} - - // This indicates running on GPU bots, not necessarily using the GPU. - bool IsGpuAvailable() const { - return CommandLine::ForCurrentProcess()->HasSwitch("enable-gpu"); - } - - // Parse flags from JSON to control the test behavior. - bool ParseFlagsFromJSON(const base::FilePath& json_dir, - const std::string& json, - int index) { - scoped_ptr<base::Value> root; - root.reset(base::JSONReader::Read(json)); - - base::ListValue* root_list = NULL; - if (!root.get() || !root->GetAsList(&root_list)) { - LOG(ERROR) << "JSON missing root list element"; - return false; - } - - base::DictionaryValue* item = NULL; - if (!root_list->GetDictionary(index, &item)) { - LOG(ERROR) << "index " << index << " not found in JSON"; - return false; - } - - std::string str; - if (item->GetStringASCII("url", &str)) { - gurl_ = GURL(str); - } else if (item->GetStringASCII("file", &str)) { - base::FilePath empty; - gurl_ = URLFixerUpper::FixupRelativeFile(empty, empty.AppendASCII(str)); - } else { - LOG(ERROR) << "missing url or file"; - return false; - } - - if (!gurl_.is_valid()) { - LOG(ERROR) << "invalid url: " << gurl_.possibly_invalid_spec(); - return false; - } - - base::FilePath::StringType cache_dir; - if (item->GetString("local_path", &cache_dir)) - local_cache_path_ = json_dir.Append(cache_dir); - - int num; - if (item->GetInteger("spinup_time", &num)) - spinup_time_ms_ = num * 1000; - if (item->GetInteger("run_time", &num)) - run_time_ms_ = num * 1000; - - base::DictionaryValue* pixel = NULL; - if (item->GetDictionary("wait_pixel", &pixel)) { - int x, y, r, g, b; - base::ListValue* color; - if (pixel->GetInteger("x", &x) && - pixel->GetInteger("y", &y) && - pixel->GetString("op", &str) && - pixel->GetList("color", &color) && - color->GetInteger(0, &r) && - color->GetInteger(1, &g) && - color->GetInteger(2, &b)) { - wait_for_pixel_.reset(new WaitPixel(x, y, r, g, b, str)); - } else { - LOG(ERROR) << "invalid wait_pixel args"; - return false; - } - } - return true; - } - - // Parse extra-chrome-flags for extra command line flags. - void ParseFlagsFromCommandLine() { - if (!CommandLine::ForCurrentProcess()->HasSwitch( - switches::kExtraChromeFlags)) - return; - CommandLine::StringType flags = - CommandLine::ForCurrentProcess()->GetSwitchValueNative( - switches::kExtraChromeFlags); - if (MatchPattern(flags, FILE_PATH_LITERAL("*.json:*"))) { - CommandLine::StringType::size_type colon_pos = flags.find_last_of(':'); - CommandLine::StringType::size_type num_pos = colon_pos + 1; - int index; - ASSERT_TRUE(base::StringToInt( - flags.substr(num_pos, flags.size() - num_pos), &index)); - base::FilePath filepath(flags.substr(0, colon_pos)); - std::string json; - ASSERT_TRUE(base::ReadFileToString(filepath, &json)); - ASSERT_TRUE(ParseFlagsFromJSON(filepath.DirName(), json, index)); - } else { - gurl_ = GURL(flags); - } - } - - void AllowExternalDNS() { - net::RuleBasedHostResolverProc* resolver = - new net::RuleBasedHostResolverProc(host_resolver()); - resolver->AllowDirectLookup("*"); - host_resolver_override_.reset( - new net::ScopedDefaultHostResolverProc(resolver)); - } - - void ResetAllowExternalDNS() { - host_resolver_override_.reset(); - } - - virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { - BrowserPerfTest::SetUpCommandLine(command_line); - ParseFlagsFromCommandLine(); - if (!local_cache_path_.value().empty()) { - // If --record-mode is already specified, don't set playback-mode. - if (!command_line->HasSwitch(switches::kRecordMode)) - command_line->AppendSwitch(switches::kPlaybackMode); - command_line->AppendSwitchNative(switches::kDiskCacheDir, - local_cache_path_.value()); - LOG(INFO) << local_cache_path_.value(); - } - // We are measuring throughput, so we don't want any FPS throttling. - command_line->AppendSwitch(switches::kDisableGpuVsync); - command_line->AppendSwitch(switches::kAllowFileAccessFromFiles); - // Enable or disable GPU acceleration. - if (!use_gpu_) { - command_line->AppendSwitch(switches::kDisableAcceleratedCompositing); - command_line->AppendSwitch(switches::kDisableExperimentalWebGL); - command_line->AppendSwitch(switches::kDisableAccelerated2dCanvas); - } - if (use_compositor_thread_) { - ASSERT_TRUE(use_gpu_); - command_line->AppendSwitch(switches::kEnableThreadedCompositing); - } else { - command_line->AppendSwitch(switches::kDisableThreadedCompositing); - } - } - - void Wait(int ms) { - base::RunLoop run_loop; - base::MessageLoop::current()->PostDelayedTask( - FROM_HERE, - run_loop.QuitClosure(), - base::TimeDelta::FromMilliseconds(ms)); - content::RunThisRunLoop(&run_loop); - } - - // Take snapshot of the current tab, encode it as PNG, and save to a SkBitmap. - bool TabSnapShotToImage(SkBitmap* bitmap) { - CHECK(bitmap); - std::vector<unsigned char> png; - - gfx::Rect root_bounds = browser()->window()->GetBounds(); - gfx::Rect tab_contents_bounds; - browser()->tab_strip_model()->GetActiveWebContents()->GetView()-> - GetContainerBounds(&tab_contents_bounds); - - gfx::Rect snapshot_bounds(tab_contents_bounds.x() - root_bounds.x(), - tab_contents_bounds.y() - root_bounds.y(), - tab_contents_bounds.width(), - tab_contents_bounds.height()); - - gfx::NativeWindow native_window = browser()->window()->GetNativeWindow(); - if (!chrome::GrabWindowSnapshotForUser(native_window, &png, - snapshot_bounds)) { - LOG(ERROR) << "browser::GrabWindowSnapShot() failed"; - return false; - } - - if (!gfx::PNGCodec::Decode(reinterpret_cast<unsigned char*>(&*png.begin()), - png.size(), bitmap)) { - LOG(ERROR) << "Decode PNG to a SkBitmap failed"; - return false; - } - return true; - } - - // Check a pixel color every second until it passes test. - void WaitForPixelColor() { - if (wait_for_pixel_.get()) { - bool success = false; - do { - SkBitmap bitmap; - ASSERT_TRUE(TabSnapShotToImage(&bitmap)); - success = wait_for_pixel_->IsDone(bitmap); - if (!success) - Wait(1000); - } while (!success); - } - } - - // flags is one or more of RunTestFlags OR'd together. - void RunTest(const std::string& test_name, int flags) { - // Set path to test html. - base::FilePath test_path; - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_path)); - test_path = test_path.Append(FILE_PATH_LITERAL("perf")); - if (flags & kInternal) - test_path = test_path.Append(FILE_PATH_LITERAL("private")); - test_path = test_path.Append(FILE_PATH_LITERAL("rendering")); - test_path = test_path.Append(FILE_PATH_LITERAL("throughput")); - test_path = test_path.AppendASCII(test_name); - test_path = test_path.Append(FILE_PATH_LITERAL("index.html")); - ASSERT_TRUE(base::PathExists(test_path)) - << "Missing test file: " << test_path.value(); - - gurl_ = net::FilePathToFileURL(test_path); - RunTestWithURL(test_name, flags); - } - - // flags is one or more of RunTestFlags OR'd together. - void RunCanvasBenchTest(const std::string& test_name, int flags) { - // Set path to test html. - base::FilePath test_path; - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_path)); - test_path = test_path.Append(FILE_PATH_LITERAL("perf")); - test_path = test_path.Append(FILE_PATH_LITERAL("canvas_bench")); - test_path = test_path.AppendASCII(test_name + ".html"); - ASSERT_TRUE(base::PathExists(test_path)) - << "Missing test file: " << test_path.value(); - - gurl_ = net::FilePathToFileURL(test_path); - RunTestWithURL(test_name, flags); - } - - // flags is one or more of RunTestFlags OR'd together. - void RunTestWithURL(int flags) { - RunTestWithURL(gurl_.possibly_invalid_spec(), flags); - } - - // flags is one or more of RunTestFlags OR'd together. - void RunTestWithURL(const std::string& test_name, int flags) { - using trace_analyzer::Query; - using trace_analyzer::TraceAnalyzer; - using trace_analyzer::TraceEventVector; - -#if defined(OS_WIN) - if (use_gpu_ && (flags & kIsGpuCanvasTest) && - base::win::OSInfo::GetInstance()->version() == base::win::VERSION_XP) { - // crbug.com/128208 - LOG(WARNING) << "Test skipped: GPU canvas tests do not run on XP."; - return; - } -#endif - - if (use_gpu_ && !IsGpuAvailable()) { - LOG(WARNING) << "Test skipped: requires gpu. Pass --enable-gpu on the " - "command line if use of GPU is desired."; - return; - } - - if (flags & kAllowExternalDNS) - AllowExternalDNS(); - - std::string json_events; - TraceEventVector events_sw, events_gpu; - scoped_ptr<TraceAnalyzer> analyzer; - - LOG(INFO) << gurl_.possibly_invalid_spec(); - ui_test_utils::NavigateToURLWithDisposition( - browser(), gurl_, CURRENT_TAB, ui_test_utils::BROWSER_TEST_NONE); - content::WaitForLoadStop( - browser()->tab_strip_model()->GetActiveWebContents()); - - // Let the test spin up. - LOG(INFO) << "Spinning up test..."; - ASSERT_TRUE(tracing::BeginTracing("test_gpu")); - Wait(spinup_time_ms_); - ASSERT_TRUE(tracing::EndTracing(&json_events)); - - // Wait for a pixel color to change (if requested). - WaitForPixelColor(); - - // Check if GPU is rendering: - analyzer.reset(TraceAnalyzer::Create(json_events)); - bool ran_on_gpu = (analyzer->FindEvents( - Query::EventNameIs("SwapBuffers"), &events_gpu) > 0u); - LOG(INFO) << "Mode: " << (ran_on_gpu ? "GPU" : "Software"); - EXPECT_EQ(use_gpu_, ran_on_gpu); - - // Let the test run for a while. - LOG(INFO) << "Running test..."; - ASSERT_TRUE(tracing::BeginTracing("test_fps")); - Wait(run_time_ms_); - ASSERT_TRUE(tracing::EndTracing(&json_events)); - - // Search for frame ticks. We look for both SW and GPU frame ticks so that - // the test can verify that only one or the other are found. - analyzer.reset(TraceAnalyzer::Create(json_events)); - Query query_sw = Query::EventNameIs("TestFrameTickSW"); - Query query_gpu = Query::EventNameIs("TestFrameTickGPU"); - analyzer->FindEvents(query_sw, &events_sw); - analyzer->FindEvents(query_gpu, &events_gpu); - TraceEventVector* frames = NULL; - if (use_gpu_) { - frames = &events_gpu; - EXPECT_EQ(0u, events_sw.size()); - } else { - frames = &events_sw; - EXPECT_EQ(0u, events_gpu.size()); - } - if (!(flags & kIsFlaky)) { - ASSERT_GT(frames->size(), 20u); - } - // Cull a few leading and trailing events as they might be unreliable. - TraceEventVector rate_events(frames->begin() + kIgnoreSomeFrames, - frames->end() - kIgnoreSomeFrames); - trace_analyzer::RateStats stats; - ASSERT_TRUE(GetRateStats(rate_events, &stats, NULL)); - LOG(INFO) << "FPS = " << 1000000.0 / stats.mean_us; - - // Print perf results. - double mean_ms = stats.mean_us / 1000.0; - double std_dev_ms = stats.standard_deviation_us / 1000.0; - std::string trace_name = use_compositor_thread_? "gpu_thread" : - ran_on_gpu ? "gpu" : "software"; - std::string mean_and_error = base::StringPrintf("%f,%f", mean_ms, - std_dev_ms); - perf_test::PrintResultMeanAndError(test_name, - std::string(), - trace_name, - mean_and_error, - "frame_time", - true); - - if (flags & kAllowExternalDNS) - ResetAllowExternalDNS(); - - // Close the tab so that we can quit without timing out during the - // wait-for-idle stage in browser_test framework. - browser()->tab_strip_model()->GetActiveWebContents()->Close(); - } - - private: - // WaitPixel checks a color against the color at the given pixel coordinates - // of an SkBitmap. - class WaitPixel { - enum Operator { - EQUAL, - NOT_EQUAL - }; - public: - WaitPixel(int x, int y, int r, int g, int b, const std::string& op) : - x_(x), y_(y), r_(r), g_(g), b_(b) { - if (op == "!=") - op_ = EQUAL; - else if (op == "==") - op_ = NOT_EQUAL; - else - CHECK(false) << "op value \"" << op << "\" is not supported"; - } - bool IsDone(const SkBitmap& bitmap) { - SkColor color = bitmap.getColor(x_, y_); - int r = SkColorGetR(color); - int g = SkColorGetG(color); - int b = SkColorGetB(color); - LOG(INFO) << "color(" << x_ << "," << y_ << "): " << - r << "," << g << "," << b; - switch (op_) { - case EQUAL: - return r != r_ || g != g_ || b != b_; - case NOT_EQUAL: - return r == r_ && g == g_ && b == b_; - default: - return false; - } - } - private: - int x_; - int y_; - int r_; - int g_; - int b_; - Operator op_; - }; - - bool use_gpu_; - bool use_compositor_thread_; - int spinup_time_ms_; - int run_time_ms_; - base::FilePath local_cache_path_; - GURL gurl_; - scoped_ptr<net::ScopedDefaultHostResolverProc> host_resolver_override_; - scoped_ptr<WaitPixel> wait_for_pixel_; -}; - -// For running tests on GPU: -class ThroughputTestGPU : public ThroughputTest { - public: - ThroughputTestGPU() : ThroughputTest(kGPU) {} -}; - -// For running tests on GPU with the compositor thread: -class ThroughputTestThread : public ThroughputTest { - public: - ThroughputTestThread() : ThroughputTest(kGPU | kCompositorThread) {} -}; - -// For running tests on Software: -class ThroughputTestSW : public ThroughputTest { - public: - ThroughputTestSW() : ThroughputTest(kSW) {} -}; - -//////////////////////////////////////////////////////////////////////////////// -/// Tests - -#if defined(OS_WIN) && defined(USE_AURA) -// crbug.com/292897 -#define MAYBE(x) DISABLED_ ## x -#else -#define MAYBE(x) x -#endif - -// Run this test with a URL on the command line: -// performance_browser_tests --gtest_also_run_disabled_tests --enable-gpu -// --gtest_filter=ThroughputTest*URL --extra-chrome-flags=http://... -// or, specify a json file with a list of tests, and the index of the test: -// --extra-chrome-flags=path/to/tests.json:0 -// The json format is an array of tests, for example: -// [ -// {"url":"http://...", -// "spinup_time":5, -// "run_time":10, -// "local_path":"path/to/disk-cache-dir", -// "wait_pixel":{"x":10,"y":10,"op":"!=","color":[24,24,24]}}, -// {"url":"http://..."} -// ] -// The only required argument is url. If local_path is set, the test goes into -// playback-mode and only loads files from the specified cache. If wait_pixel is -// specified, then after spinup_time the test waits for the color at the -// specified pixel coordinate to match the given color with the given operator. -IN_PROC_BROWSER_TEST_F(ThroughputTestSW, DISABLED_TestURL) { - RunTestWithURL(kAllowExternalDNS); -} - -IN_PROC_BROWSER_TEST_F(ThroughputTestGPU, DISABLED_TestURL) { - RunTestWithURL(kAllowExternalDNS); -} - -IN_PROC_BROWSER_TEST_F(ThroughputTestGPU, MAYBE(Particles)) { - RunTest("particles", kInternal); -} - -IN_PROC_BROWSER_TEST_F(ThroughputTestThread, MAYBE(Particles)) { - RunTest("particles", kInternal); -} - -IN_PROC_BROWSER_TEST_F(ThroughputTestSW, MAYBE(CanvasDemoSW)) { - RunTest("canvas-demo", kInternal); -} - -IN_PROC_BROWSER_TEST_F(ThroughputTestGPU, MAYBE(CanvasDemoGPU)) { - RunTest("canvas-demo", kInternal | kIsGpuCanvasTest); -} - -IN_PROC_BROWSER_TEST_F(ThroughputTestThread, MAYBE(CanvasDemoGPU)) { - RunTest("canvas-demo", kInternal | kIsGpuCanvasTest); -} - -// CompositingHugeDivSW timed out on Mac Intel Release GPU bot -// See crbug.com/114781 -// Stopped producing results in SW: crbug.com/127621 -IN_PROC_BROWSER_TEST_F(ThroughputTestSW, DISABLED_CompositingHugeDivSW) { - RunTest("compositing_huge_div", kNone); -} - -// Failing with insufficient frames: crbug.com/127595 -IN_PROC_BROWSER_TEST_F(ThroughputTestGPU, DISABLED_CompositingHugeDivGPU) { - RunTest("compositing_huge_div", kNone); -} - -IN_PROC_BROWSER_TEST_F(ThroughputTestSW, MAYBE(DrawImageShadowSW)) { - RunTest("canvas2d_balls_with_shadow", kNone); -} - -IN_PROC_BROWSER_TEST_F(ThroughputTestGPU, MAYBE(DrawImageShadowGPU)) { - // TODO(junov): Fix test flakiness crbug.com/272383 - RunTest("canvas2d_balls_with_shadow", kNone | kIsGpuCanvasTest | kIsFlaky); -} - -// Intermittent failure, should be fixed by converting to telemetry. -// See crbug.com/276500 for more details. -IN_PROC_BROWSER_TEST_F(ThroughputTestThread, DISABLED_DrawImageShadowGPU) { - // TODO(junov): Fix test flakiness crbug.com/272383 - RunTest("canvas2d_balls_with_shadow", kNone | kIsGpuCanvasTest | kIsFlaky); -} - -IN_PROC_BROWSER_TEST_F(ThroughputTestSW, MAYBE(CanvasToCanvasDrawSW)) { - if (IsGpuAvailable() && - gpu::GPUTestBotConfig::CurrentConfigMatches("MAC AMD")) - return; - RunTest("canvas2d_balls_draw_from_canvas", kNone); -} - -IN_PROC_BROWSER_TEST_F(ThroughputTestGPU, MAYBE(CanvasToCanvasDrawGPU)) { - if (IsGpuAvailable() && - gpu::GPUTestBotConfig::CurrentConfigMatches("MAC AMD")) - return; - RunTest("canvas2d_balls_draw_from_canvas", kNone | kIsGpuCanvasTest); -} - -// Failing on windows GPU bots: crbug.com/255192 -IN_PROC_BROWSER_TEST_F(ThroughputTestSW, DISABLED_CanvasTextSW) { - if (IsGpuAvailable() && - gpu::GPUTestBotConfig::CurrentConfigMatches("MAC AMD")) - return; - RunTest("canvas2d_balls_text", kNone); -} - -IN_PROC_BROWSER_TEST_F(ThroughputTestGPU, MAYBE(CanvasTextGPU)) { - RunTest("canvas2d_balls_text", kNone | kIsGpuCanvasTest); -} - -IN_PROC_BROWSER_TEST_F(ThroughputTestSW, MAYBE(CanvasFillPathSW)) { - RunTest("canvas2d_balls_fill_path", kNone); -} - -IN_PROC_BROWSER_TEST_F(ThroughputTestGPU, MAYBE(CanvasFillPathGPU)) { - RunTest("canvas2d_balls_fill_path", kNone | kIsGpuCanvasTest); -} - -IN_PROC_BROWSER_TEST_F(ThroughputTestSW, MAYBE(CanvasSingleImageSW)) { - RunCanvasBenchTest("single_image", kNone); -} - -IN_PROC_BROWSER_TEST_F(ThroughputTestGPU, MAYBE(CanvasSingleImageGPU)) { - if (IsGpuAvailable() && - gpu::GPUTestBotConfig::CurrentConfigMatches("MAC AMD")) - return; - RunCanvasBenchTest("single_image", kNone | kIsGpuCanvasTest); -} - -IN_PROC_BROWSER_TEST_F(ThroughputTestSW, MAYBE(CanvasManyImagesSW)) { - RunCanvasBenchTest("many_images", kNone); -} - -IN_PROC_BROWSER_TEST_F(ThroughputTestGPU, MAYBE(CanvasManyImagesGPU)) { - RunCanvasBenchTest("many_images", kNone | kIsGpuCanvasTest); -} - -IN_PROC_BROWSER_TEST_F(ThroughputTestThread, MAYBE(CanvasManyImagesGPU)) { - RunCanvasBenchTest("many_images", kNone | kIsGpuCanvasTest); -} - -} // namespace diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc index e0f7ccc..184e76a 100644 --- a/content/renderer/render_widget.cc +++ b/content/renderer/render_widget.cc @@ -1649,7 +1649,8 @@ void RenderWidget::DoDeferredUpdate() { } // Software FPS tick for performance tests. The accelerated path traces the - // frame events in didCommitAndDrawCompositorFrame. See throughput_tests.cc. + // frame events in didCommitAndDrawCompositorFrame. See + // tab_capture_performancetest.cc. // NOTE: Tests may break if this event is renamed or moved. UNSHIPPED_TRACE_EVENT_INSTANT0("test_fps", "TestFrameTickSW", TRACE_EVENT_SCOPE_THREAD); @@ -1897,8 +1898,9 @@ void RenderWidget::DidCommitCompositorFrame() { void RenderWidget::didCommitAndDrawCompositorFrame() { TRACE_EVENT0("gpu", "RenderWidget::didCommitAndDrawCompositorFrame"); - // Accelerated FPS tick for performance tests. See throughput_tests.cc. - // NOTE: Tests may break if this event is renamed or moved. + // Accelerated FPS tick for performance tests. See + // tab_capture_performancetest.cc. NOTE: Tests may break if this event is + // renamed or moved. UNSHIPPED_TRACE_EVENT_INSTANT0("test_fps", "TestFrameTickGPU", TRACE_EVENT_SCOPE_THREAD); // Notify subclasses that we initiated the paint operation. |