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

Unified Diff: LayoutTests/fast/canvas/yuv-video-on-accelerated-canvas-expected.html

Issue 1266113003: Rebaseline yuv-video-on-accelerated-canvas.html (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase on master. Created 5 years, 4 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
« LayoutTests/TestExpectations ('K') | « LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/canvas/yuv-video-on-accelerated-canvas-expected.html
diff --git a/LayoutTests/fast/canvas/yuv-video-on-accelerated-canvas-expected.html b/LayoutTests/fast/canvas/yuv-video-on-accelerated-canvas-expected.html
deleted file mode 100644
index ef1abd29a411546e7632a3564b65dc6fbe234ee1..0000000000000000000000000000000000000000
--- a/LayoutTests/fast/canvas/yuv-video-on-accelerated-canvas-expected.html
+++ /dev/null
@@ -1,83 +0,0 @@
-<html>
-<head>
- <title>Ensure correct behavior of drawImage video elements on both software canvas and accelerated canvas. crbug.com/424591</title>
- <style trpe="text/css">
- video {
- display: none;
- }
- </style>
-</head>
-<body>
- <canvas id="hw-canvas" width=300 height=300></canvas>
- <canvas id="sw-canvas" width=150 height=150></canvas>
- <!--
- If we creates two video elements for each canvas, each video caches sw bitmap or
- hw bitmap respectively. So the -expected.html creates two videos.
- -->
- <video id="video-for-hw-canvas" loop>
- <source src="resources/canvas_video.mp4" type='video/mp4' />
- <source src="resources/canvas_video.webm" type='video/webm' />
- <source src="resources/canvas_video.ogv" type='video/ogg' />
- </video>
- <video id="video-for-sw-canvas" loop>
- <source src="resources/canvas_video.mp4" type='video/mp4' />
- <source src="resources/canvas_video.webm" type='video/webm' />
- <source src="resources/canvas_video.ogv" type='video/ogg' />
- </video>
- <script>
- if (window.testRunner) {
- testRunner.waitUntilDone();
- }
- if (window.internals)
- window.internals.settings.setMinimumAccelerated2dCanvasSize(257*256);
-
- var hw_canvas = document.getElementById("hw-canvas");
- var hw_ctx = hw_canvas.getContext("2d");
- // Although enabling accelerated-2d-canvas, canvas with the dimension
- // less than 257*256 is not accelerated.
- var sw_canvas = document.getElementById("sw-canvas");
- var sw_ctx = sw_canvas.getContext("2d");
-
- var blockUntilPlayingBothVideo = true;
- var video_for_hw_canvas = document.getElementById("video-for-hw-canvas");
- video_for_hw_canvas.addEventListener("playing", onHwVideoPlaying, true);
- video_for_hw_canvas.play();
- function onHwVideoPlaying() {
- video_for_hw_canvas.removeEventListener("playing", onHwVideoPlaying, true);
- if (blockUntilPlayingBothVideo) {
- blockUntilPlayingBothVideo = false;
- } else {
- drawImageToCanvas();
- }
- }
- var video_for_sw_canvas = document.getElementById("video-for-sw-canvas");
- video_for_sw_canvas.addEventListener("playing", onSwVideoPlaying, true);
- video_for_sw_canvas.play();
- function onSwVideoPlaying() {
- video_for_sw_canvas.removeEventListener("playing", onSwVideoPlaying, true);
- if (blockUntilPlayingBothVideo) {
- blockUntilPlayingBothVideo = false;
- } else {
- drawImageToCanvas();
- }
- }
-
- function drawVideo(video, ctx, canvas) {
- ctx.globalAlpha = 1;
- ctx.fillStyle = "blue";
- ctx.fillRect(0, 0, canvas.width, canvas.width);
- ctx.drawImage(video, 0, 0);
- ctx.globalAlpha = 0.5;
- ctx.drawImage(video, 0, 60);
- }
-
- function drawImageToCanvas() {
- // draw a different video on a different canvas.
- drawVideo(video_for_sw_canvas, sw_ctx, sw_canvas);
- drawVideo(video_for_hw_canvas, hw_ctx, hw_canvas);
- if (window.testRunner)
- testRunner.notifyDone();
- }
- </script>
-</body>
-</html>
« LayoutTests/TestExpectations ('K') | « LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698