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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLVideoElement.cpp

Issue 2791813003: Fix broken draw/upload paths from videos to 2D canvas and WebGL. (Closed)
Patch Set: Fix per review feedback from sandersd@. Created 3 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 mediaFlags.setAlpha(0xFF); 303 mediaFlags.setAlpha(0xFF);
304 mediaFlags.setFilterQuality(kLow_SkFilterQuality); 304 mediaFlags.setFilterQuality(kLow_SkFilterQuality);
305 } 305 }
306 306
307 webMediaPlayer()->paint(canvas, destRect, mediaFlags); 307 webMediaPlayer()->paint(canvas, destRect, mediaFlags);
308 } 308 }
309 309
310 bool HTMLVideoElement::copyVideoTextureToPlatformTexture( 310 bool HTMLVideoElement::copyVideoTextureToPlatformTexture(
311 gpu::gles2::GLES2Interface* gl, 311 gpu::gles2::GLES2Interface* gl,
312 GLuint texture, 312 GLuint texture,
313 GLenum internalFormat,
314 GLenum type,
313 bool premultiplyAlpha, 315 bool premultiplyAlpha,
314 bool flipY) { 316 bool flipY) {
315 if (!webMediaPlayer()) 317 if (!webMediaPlayer())
316 return false; 318 return false;
317 319
318 return webMediaPlayer()->copyVideoTextureToPlatformTexture( 320 return webMediaPlayer()->copyVideoTextureToPlatformTexture(
319 gl, texture, premultiplyAlpha, flipY); 321 gl, texture, internalFormat, type, premultiplyAlpha, flipY);
320 } 322 }
321 323
322 bool HTMLVideoElement::texImageImpl( 324 bool HTMLVideoElement::texImageImpl(
323 WebMediaPlayer::TexImageFunctionID functionID, 325 WebMediaPlayer::TexImageFunctionID functionID,
324 GLenum target, 326 GLenum target,
325 gpu::gles2::GLES2Interface* gl, 327 gpu::gles2::GLES2Interface* gl,
326 GLint level, 328 GLint level,
327 GLint internalformat, 329 GLint internalformat,
328 GLenum format, 330 GLenum format,
329 GLenum type, 331 GLenum type,
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 return ScriptPromise(); 474 return ScriptPromise();
473 if (!ImageBitmap::isResizeOptionValid(options, exceptionState)) 475 if (!ImageBitmap::isResizeOptionValid(options, exceptionState))
474 return ScriptPromise(); 476 return ScriptPromise();
475 return ImageBitmapSource::fulfillImageBitmap( 477 return ImageBitmapSource::fulfillImageBitmap(
476 scriptState, 478 scriptState,
477 ImageBitmap::create(this, cropRect, 479 ImageBitmap::create(this, cropRect,
478 eventTarget.toLocalDOMWindow()->document(), options)); 480 eventTarget.toLocalDOMWindow()->document(), options));
479 } 481 }
480 482
481 } // namespace blink 483 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698