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

Unified Diff: third_party/WebKit/PerformanceTests/Canvas/draw-video-to-hw-accelerated-canvas-2d.html

Issue 2399013003: Tweaking the draw-video-to-hw-accelerated-canvas-2d to stay on GPU (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/PerformanceTests/Canvas/draw-video-to-hw-accelerated-canvas-2d.html
diff --git a/third_party/WebKit/PerformanceTests/Canvas/draw-video-to-hw-accelerated-canvas-2d.html b/third_party/WebKit/PerformanceTests/Canvas/draw-video-to-hw-accelerated-canvas-2d.html
index d4adbe96a4e9301b48c93b33eb457762f1076e59..f8d5945c3f32bac299cf5175d34ba4222a05c036 100644
--- a/third_party/WebKit/PerformanceTests/Canvas/draw-video-to-hw-accelerated-canvas-2d.html
+++ b/third_party/WebKit/PerformanceTests/Canvas/draw-video-to-hw-accelerated-canvas-2d.html
@@ -11,12 +11,11 @@ var destCtx2D = destCanvas2D.getContext("2d");
var dummyCanvas2D = document.createElement("canvas");
var dummyCtx2D = dummyCanvas2D.getContext("2d");
-dummyCanvas2D.width = 1;
-dummyCanvas2D.height = 1;
-
function setSize(width, height) {
destCanvas2D.width = width;
destCanvas2D.height = height;
+ dummyCanvas2D.width = width;
+ dummyCanvas2D.height = height;
}
function startPerfTest() {
@@ -33,7 +32,9 @@ function doRun() {
function ensureComplete() {
// Using destCanvas2D as a source image is just to flush out the content when
- // accelerated 2D canvas is in use.
+ // accelerated 2D canvas is in use.
+ // dummyCtx2D must also be accelerated to prevent destCanvas2D from becoming
+ // non-accelerated due to the DisableAccelerationToAvoidReadbacks heuristic.
dummyCtx2D.drawImage(destCanvas2D, 0, 0, 1, 1, 0, 0, 1, 1);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698