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

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: scoping Y8 out. 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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 bool HTMLVideoElement::copyVideoTextureToPlatformTexture( 215 bool HTMLVideoElement::copyVideoTextureToPlatformTexture(
216 gpu::gles2::GLES2Interface* gl, 216 gpu::gles2::GLES2Interface* gl,
217 GLuint texture, 217 GLuint texture,
218 GLenum internalFormat, 218 GLenum internalFormat,
219 GLenum type, 219 GLenum type,
220 bool premultiplyAlpha, 220 bool premultiplyAlpha,
221 bool flipY) { 221 bool flipY) {
222 if (!webMediaPlayer()) 222 if (!webMediaPlayer())
223 return false; 223 return false;
224 224
225 DCHECK(Extensions3DUtil::canUseCopyTextureCHROMIUM(GL_TEXTURE_2D,
226 internalFormat, type, 0));
227 return webMediaPlayer()->copyVideoTextureToPlatformTexture( 225 return webMediaPlayer()->copyVideoTextureToPlatformTexture(
228 gl, texture, internalFormat, type, premultiplyAlpha, flipY); 226 gl, texture, internalFormat, type, premultiplyAlpha, flipY);
229 } 227 }
230 228
229 bool HTMLVideoElement::texImageImpl(const char* functionID,
230 GLenum target,
231 gpu::gles2::GLES2Interface* gl,
232 GLint level,
233 GLint internalformat,
234 GLenum format,
235 GLenum type,
236 GLint xoffset,
237 GLint yoffset,
238 GLint zoffset,
239 bool flipY,
240 bool premultiplyAlpha) {
241 if (!webMediaPlayer())
242 return false;
243 return webMediaPlayer()->texImageImpl(
244 functionID, target, gl, level, internalformat, format, type, xoffset,
245 yoffset, zoffset, flipY, premultiplyAlpha);
246 }
247
231 bool HTMLVideoElement::hasAvailableVideoFrame() const { 248 bool HTMLVideoElement::hasAvailableVideoFrame() const {
232 if (!webMediaPlayer()) 249 if (!webMediaPlayer())
233 return false; 250 return false;
234 251
235 return webMediaPlayer()->hasVideo() && 252 return webMediaPlayer()->hasVideo() &&
236 webMediaPlayer()->getReadyState() >= 253 webMediaPlayer()->getReadyState() >=
237 WebMediaPlayer::ReadyStateHaveCurrentData; 254 WebMediaPlayer::ReadyStateHaveCurrentData;
238 } 255 }
239 256
240 void HTMLVideoElement::webkitEnterFullscreen() { 257 void HTMLVideoElement::webkitEnterFullscreen() {
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 return ScriptPromise(); 376 return ScriptPromise();
360 if (!ImageBitmap::isResizeOptionValid(options, exceptionState)) 377 if (!ImageBitmap::isResizeOptionValid(options, exceptionState))
361 return ScriptPromise(); 378 return ScriptPromise();
362 return ImageBitmapSource::fulfillImageBitmap( 379 return ImageBitmapSource::fulfillImageBitmap(
363 scriptState, 380 scriptState,
364 ImageBitmap::create(this, cropRect, 381 ImageBitmap::create(this, cropRect,
365 eventTarget.toLocalDOMWindow()->document(), options)); 382 eventTarget.toLocalDOMWindow()->document(), options));
366 } 383 }
367 384
368 } // namespace blink 385 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698