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

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

Issue 2121043002: 16 bpp video stream capture, render and WebGL usage - Realsense R200 & SR300 support. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tests: cc, skcanvas_video_renderer, wrtcrecorder... Fake capture supports Y16. 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 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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 206
207 // TODO(junov, foolip): crbug.com/456529 Pass the whole SkPaint instead of o nly alpha and xfermode 207 // TODO(junov, foolip): crbug.com/456529 Pass the whole SkPaint instead of o nly alpha and xfermode
208 webMediaPlayer()->paint(canvas, destRect, paint ? paint->getAlpha() : 0xFF, mode); 208 webMediaPlayer()->paint(canvas, destRect, paint ? paint->getAlpha() : 0xFF, mode);
209 } 209 }
210 210
211 bool HTMLVideoElement::copyVideoTextureToPlatformTexture(gpu::gles2::GLES2Interf ace* gl, GLuint texture, GLenum internalFormat, GLenum type, bool premultiplyAlp ha, bool flipY) 211 bool HTMLVideoElement::copyVideoTextureToPlatformTexture(gpu::gles2::GLES2Interf ace* gl, GLuint texture, GLenum internalFormat, GLenum type, bool premultiplyAlp ha, bool flipY)
212 { 212 {
213 if (!webMediaPlayer()) 213 if (!webMediaPlayer())
214 return false; 214 return false;
215 215
216 DCHECK(Extensions3DUtil::canUseCopyTextureCHROMIUM(GL_TEXTURE_2D, internalFo rmat, type, 0));
217 return webMediaPlayer()->copyVideoTextureToPlatformTexture(gl, texture, inte rnalFormat, type, premultiplyAlpha, flipY); 216 return webMediaPlayer()->copyVideoTextureToPlatformTexture(gl, texture, inte rnalFormat, type, premultiplyAlpha, flipY);
218 } 217 }
219 218
219 bool HTMLVideoElement::texImageImpl(const char* functionID, GLenum target, gpu:: gles2::GLES2Interface* gl, GLint level, GLint internalformat, GLenum format, GLe num type, GLint xoffset, GLint yoffset, GLint zoffset, bool flipY, bool premulti plyAlpha)
220 {
221 if (!webMediaPlayer())
222 return false;
223 return webMediaPlayer()->texImageImpl(functionID, target, gl, level, interna lformat, format, type, xoffset, yoffset, zoffset, flipY, premultiplyAlpha);
224 }
225
220 bool HTMLVideoElement::hasAvailableVideoFrame() const 226 bool HTMLVideoElement::hasAvailableVideoFrame() const
221 { 227 {
222 if (!webMediaPlayer()) 228 if (!webMediaPlayer())
223 return false; 229 return false;
224 230
225 return webMediaPlayer()->hasVideo() && webMediaPlayer()->getReadyState() >= WebMediaPlayer::ReadyStateHaveCurrentData; 231 return webMediaPlayer()->hasVideo() && webMediaPlayer()->getReadyState() >= WebMediaPlayer::ReadyStateHaveCurrentData;
226 } 232 }
227 233
228 void HTMLVideoElement::webkitEnterFullscreen() 234 void HTMLVideoElement::webkitEnterFullscreen()
229 { 235 {
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 } 346 }
341 if ((cropRect && !ImageBitmap::isSourceSizeValid(cropRect->width(), cropRect ->height(), exceptionState)) 347 if ((cropRect && !ImageBitmap::isSourceSizeValid(cropRect->width(), cropRect ->height(), exceptionState))
342 || !ImageBitmap::isSourceSizeValid(bitmapSourceSize().width(), bitmapSou rceSize().height(), exceptionState)) 348 || !ImageBitmap::isSourceSizeValid(bitmapSourceSize().width(), bitmapSou rceSize().height(), exceptionState))
343 return ScriptPromise(); 349 return ScriptPromise();
344 if (!ImageBitmap::isResizeOptionValid(options, exceptionState)) 350 if (!ImageBitmap::isResizeOptionValid(options, exceptionState))
345 return ScriptPromise(); 351 return ScriptPromise();
346 return ImageBitmapSource::fulfillImageBitmap(scriptState, ImageBitmap::creat e(this, cropRect, eventTarget.toLocalDOMWindow()->document(), options)); 352 return ImageBitmapSource::fulfillImageBitmap(scriptState, ImageBitmap::creat e(this, cropRect, eventTarget.toLocalDOMWindow()->document(), options));
347 } 353 }
348 354
349 } // namespace blink 355 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698